/* Generated by Cython 0.29.36 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "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 */
#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 < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
    #error Cython requires Python 2.6+ or Python 3.3+.
#else
#define CYTHON_ABI "0_29_36"
#define CYTHON_HEX_VERSION 0x001D24F0
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !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 HAVE_LONG_LONG
  #if PY_VERSION_HEX >= 0x02070000
    #define HAVE_LONG_LONG
  #endif
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#ifdef PYPY_VERSION
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_NOGIL 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #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_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #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_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00)
  #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
#elif defined(PYSTON_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_NOGIL 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_ASYNC_SLOTS
  #define CYTHON_USE_ASYNC_SLOTS 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #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_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 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 0
  #endif
#elif defined(PY_NOGIL)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_NOGIL 1
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #ifndef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #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_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 1
  #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
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #define CYTHON_COMPILING_IN_NOGIL 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYTYPE_LOOKUP
    #define CYTHON_USE_PYTYPE_LOOKUP 0
  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
    #define CYTHON_USE_PYTYPE_LOOKUP 1
  #endif
  #if PY_MAJOR_VERSION < 3
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 0
  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
    #define CYTHON_USE_PYLONG_INTERNALS (PY_VERSION_HEX < 0x030C00A5)
  #endif
  #ifndef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if PY_VERSION_HEX < 0x030300F0 || 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
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #if PY_VERSION_HEX >= 0x030B00A4
    #undef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 0
  #elif !defined(CYTHON_FAST_THREAD_STATE)
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030A0000)
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
  #endif
  #ifndef CYTHON_USE_DICT_VERSIONS
    #define CYTHON_USE_DICT_VERSIONS ((PY_VERSION_HEX >= 0x030600B1) && (PY_VERSION_HEX < 0x030C00A5))
  #endif
  #if PY_VERSION_HEX >= 0x030B00A4
    #undef CYTHON_USE_EXC_INFO_STACK
    #define CYTHON_USE_EXC_INFO_STACK 0
  #elif !defined(CYTHON_USE_EXC_INFO_STACK)
    #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
  #endif
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
  #endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #if PY_MAJOR_VERSION < 3
    #include "longintrepr.h"
  #endif
  #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(__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_MAYBE_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#ifdef _MSC_VER
    #ifndef _MSC_STDINT_H_
        #if _MSC_VER < 1300
           typedef unsigned char     uint8_t;
           typedef unsigned int      uint32_t;
        #else
           typedef unsigned __int8   uint8_t;
           typedef unsigned __int32  uint32_t;
        #endif
    #endif
#else
   #include <stdint.h>
#endif
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus) && __cplusplus >= 201103L
    #if __has_cpp_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH [[fallthrough]]
    #elif __has_cpp_attribute(clang::fallthrough)
      #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
    #elif __has_cpp_attribute(gnu::fallthrough)
      #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
    #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 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

#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_PyCode_New(a, 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)
  #define __Pyx_DefaultClassType PyClass_Type
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_DefaultClassType PyType_Type
#if PY_VERSION_HEX >= 0x030B00A1
    static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, 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 *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL;
        PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL;
        const char *fn_cstr=NULL;
        const char *name_cstr=NULL;
        PyCodeObject* co=NULL;
        PyObject *type, *value, *traceback;
        PyErr_Fetch(&type, &value, &traceback);
        if (!(kwds=PyDict_New())) goto end;
        if (!(argcount=PyLong_FromLong(a))) goto end;
        if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end;
        if (!(posonlyargcount=PyLong_FromLong(0))) goto end;
        if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end;
        if (!(kwonlyargcount=PyLong_FromLong(k))) goto end;
        if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end;
        if (!(nlocals=PyLong_FromLong(l))) goto end;
        if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end;
        if (!(stacksize=PyLong_FromLong(s))) goto end;
        if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end;
        if (!(flags=PyLong_FromLong(f))) goto end;
        if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end;
        if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end;
        if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end;
        if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end;
        if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too;
        if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here
        if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too;
        Py_XDECREF((PyObject*)co);
        co = (PyCodeObject*)call_result;
        call_result = NULL;
        if (0) {
            cleanup_code_too:
            Py_XDECREF((PyObject*)co);
            co = NULL;
        }
        end:
        Py_XDECREF(kwds);
        Py_XDECREF(argcount);
        Py_XDECREF(posonlyargcount);
        Py_XDECREF(kwonlyargcount);
        Py_XDECREF(nlocals);
        Py_XDECREF(stacksize);
        Py_XDECREF(replace);
        Py_XDECREF(call_result);
        Py_XDECREF(empty);
        if (type) {
            PyErr_Restore(type, value, traceback);
        }
        return co;
    }
#else
  #define __Pyx_PyCode_New(a, 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
  #define __Pyx_DefaultClassType PyType_Type
#endif
#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 METH_STACKLESS
  #define METH_STACKLESS 0
#endif
#if PY_VERSION_HEX <= 0x030700A3 || !defined(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
  #define __Pyx_PyCFunctionFast _PyCFunctionFast
  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
#endif
#if CYTHON_FAST_PYCCALL
#define __Pyx_PyFastCFunction_Check(func)\
    ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
#else
#define __Pyx_PyFastCFunction_Check(func) 0
#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_CPYTHON && PY_VERSION_HEX < 0x030400A1
  #define PyMem_RawMalloc(n)           PyMem_Malloc(n)
  #define PyMem_RawRealloc(p, n)       PyMem_Realloc(p, n)
  #define PyMem_RawFree(p)             PyMem_Free(p)
#endif
#if CYTHON_COMPILING_IN_PYSTON
  #define __Pyx_PyCode_HasFreeVars(co)  PyCode_HasFreeVars(co)
  #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_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x03060000
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#elif PY_VERSION_HEX >= 0x03000000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_Current
#endif
#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
#include "pythread.h"
#define Py_tss_NEEDS_INIT 0
typedef int Py_tss_t;
static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
  *key = PyThread_create_key();
  return 0;
}
static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
  *key = Py_tss_NEEDS_INIT;
  return key;
}
static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
  PyObject_Free(key);
}
static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
  return *key != Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
  PyThread_delete_key(*key);
  *key = Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
  return PyThread_set_key_value(*key, value);
}
static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
  return PyThread_get_key_value(*key);
}
#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
#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStr(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
#else
#define __Pyx_PyDict_GetItemStr(dict, name)  PyDict_GetItem(dict, name)
#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #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_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #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)         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, 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
#else
  #define CYTHON_PEP393_ENABLED 0
  #define PyUnicode_1BYTE_KIND  1
  #define PyUnicode_2BYTE_KIND  2
  #define PyUnicode_4BYTE_KIND  4
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
#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 && !defined(PyUnicode_Contains)
  #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
  #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
  #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
#endif
#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#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 PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
  #define PyObject_ASCII(o)            PyObject_Repr(o)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#ifndef PyObject_Unicode
  #define PyObject_Unicode             PyObject_Str
#endif
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_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
#if CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
#else
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define PyNumber_Int                 PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  #ifndef PyUnicode_InternFromString
    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  #endif
#endif
#if PY_VERSION_HEX < 0x030200A4
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsHash_t
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsSsize_t
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
#else
  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
#if CYTHON_USE_ASYNC_SLOTS
  #if PY_VERSION_HEX >= 0x030500B1
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
    #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
  #else
    #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
  #endif
#else
  #define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef __Pyx_PyAsyncMethodsStruct
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
    } __Pyx_PyAsyncMethodsStruct;
#endif

#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
  #if !defined(_USE_MATH_DEFINES)
    #define _USE_MATH_DEFINES
  #endif
#endif
#include <math.h>
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
  float value;
  memset(&value, 0xFF, sizeof(value));
  return value;
}
#endif
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
#define __Pyx_truncl trunc
#else
#define __Pyx_truncl truncl
#endif

#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; }
#define __PYX_ERR(f_index, lineno, Ln_error) \
    { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }

#ifndef __PYX_EXTERN_C
  #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 <stdint.h>
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
#define CYTHON_WITHOUT_ASSERTIONS
#endif

typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
#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 <cstdlib>
    #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 const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
#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 PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#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_PyObject_AsWritableString(s)    ((char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*) __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_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
    const Py_UNICODE *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
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_IntOrLong(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_PyInt_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))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#else
#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
#endif
#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    PyObject* ascii_chars_u = NULL;
    PyObject* ascii_chars_b = NULL;
    const char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    if (strcmp(default_encoding_c, "ascii") == 0) {
        __Pyx_sys_getdefaultencoding_not_ascii = 0;
    } else {
        char ascii_chars[128];
        int c;
        for (c = 0; c < 128; c++) {
            ascii_chars[c] = c;
        }
        __Pyx_sys_getdefaultencoding_not_ascii = 1;
        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
        if (!ascii_chars_u) goto bad;
        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
        if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
            PyErr_Format(
                PyExc_ValueError,
                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
                default_encoding_c);
            goto bad;
        }
        Py_DECREF(ascii_chars_u);
        Py_DECREF(ascii_chars_b);
    }
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#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__ */
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }

static PyObject *__pyx_m = NULL;
static PyObject *__pyx_d;
static PyObject *__pyx_b;
static PyObject *__pyx_cython_runtime = NULL;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static PyObject *__pyx_empty_unicode;
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;


static const char *__pyx_f[] = {
  "apache_beam/runners/common.py",
  "stringsource",
  "apache_beam/runners/common.pxd",
  "apache_beam/utils/windowed_value.pxd",
  "apache_beam/transforms/cy_dataflow_distribution_counter.pxd",
};

/*--- 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_7runners_6common___pyx_scope_struct___get_arg_placeholders;
struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_1_genexpr;
struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2___init__;
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_obj_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor;
struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph;
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":26
 * 
 * # 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":30
 * 
 * # 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;
struct __pyx_defaults;
typedef struct __pyx_defaults __pyx_defaults;

/* "apache_beam/runners/common.pxd":78
 *   cdef public object bundle_finalizer_param
 * 
 *   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":132
 *   @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":137
 *   @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":153
 *                  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":159
 *                  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":628
 *     self.process_batch_method = signature.process_batch_method.method_value
 * 
 *   def invoke_process(self,             # <<<<<<<<<<<<<<
 *                      windowed_value,  # type: WindowedValue
 *                      restriction=None,
 */
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":783
 *             signature.process_batch_method, input_args, input_kwargs)
 * 
 *   def invoke_process(self,             # <<<<<<<<<<<<<<
 *                      windowed_value,  # type: WindowedValue
 *                      restriction=None,
 */
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;
};
struct __pyx_defaults {
  PyObject *__pyx_arg_timestamp;
};

/* "apache_beam/utils/windowed_value.pxd":28
 * 
 * @cython.final
 * cdef class PaneInfo(object):             # <<<<<<<<<<<<<<
 *   cdef readonly bint _is_first
 *   cdef readonly bint _is_last
 */
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":37
 * 
 * @cython.final
 * cdef class WindowedValue(object):             # <<<<<<<<<<<<<<
 *   cdef public object value
 *   cdef public object windows
 */
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":33
 *   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;
};


/* "apache_beam/runners/common.pxd":88
 * 
 * 
 * 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":93
 * 
 * 
 * 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 cache_globally_windowed_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":118
 * 
 * 
 * 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":129
 * 
 * 
 * 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":141
 * 
 * 
 * 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":171
 *   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":178
 * 
 * 
 * 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":652
 * 
 * 
 * def _get_arg_placeholders(             # <<<<<<<<<<<<<<
 *     method: MethodWrapper,
 *     input_args: Optional[List[Any]],
 */
struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders {
  PyObject_HEAD
  PyObject *__pyx_v_default_arg_values;
};


/* "apache_beam/runners/common.py":669
 *       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_1_genexpr {
  PyObject_HEAD
  struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders *__pyx_outer_scope;
  PyObject *__pyx_v_arg;
};


/* "apache_beam/runners/common.py":726
 *   """An invoker that processes elements considering windowing information."""
 * 
 *   def __init__(self,             # <<<<<<<<<<<<<<
 *                output_handler,  # type: OutputHandler
 *                signature,  # type: DoFnSignature
 */
struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2___init__ {
  PyObject_HEAD
  PyObject *__pyx_v_default_arg_values;
  PyObject *__pyx_v_side_inputs;
  PyObject *__pyx_v_signature;
};


/* "apache_beam/runners/common.py":742
 *     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
  struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2___init__ *__pyx_outer_scope;
  PyObject *__pyx_v_si;
};


/* "apache_beam/runners/common.py":743
 *     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
  struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2___init__ *__pyx_outer_scope;
  PyObject *__pyx_v_arg;
};


/* "apache_beam/runners/common.py":745
 *             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
  struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2___init__ *__pyx_outer_scope;
  PyObject *__pyx_v_arg;
};


/* "apache_beam/runners/common.py":751
 *     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
  struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2___init__ *__pyx_outer_scope;
  PyObject *__pyx_v_arg;
};


/* "apache_beam/runners/common.py":1092
 * 
 *   @staticmethod
 *   def _try_split(fraction,             # <<<<<<<<<<<<<<
 *       window_index, # type: Optional[int]
 *       stop_window_index, # type: Optional[int]
 */
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/runners/common.py":1860
 * 
 * 
 * def group_by_key_input_visitor(deterministic_key_coders=True):             # <<<<<<<<<<<<<<
 *   # Importing here to avoid a circular dependency
 *   # pylint: disable=wrong-import-order, wrong-import-position
 */
struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor {
  PyObject_HEAD
  PyObject *__pyx_v_GroupByKey;
};


/* "apache_beam/runners/common.py":1897
 * 
 * 
 * def validate_pipeline_graph(pipeline_proto):             # <<<<<<<<<<<<<<
 *   """Ensures this is a correctly constructed Beam pipeline.
 *   """
 */
struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph {
  PyObject_HEAD
  PyObject *__pyx_v_get_coder;
  PyObject *__pyx_v_pipeline_proto;
  PyObject *__pyx_v_validate_transform;
};



/* "apache_beam/utils/windowed_value.pxd":37
 * 
 * @cython.final
 * cdef class WindowedValue(object):             # <<<<<<<<<<<<<<
 *   cdef public object value
 *   cdef public object 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;


/* "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":33
 *   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":119
 * 
 * 
 * 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":431
 * 
 * 
 * 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":616
 * 
 * 
 * class SimpleInvoker(DoFnInvoker):             # <<<<<<<<<<<<<<
 *   """An invoker that processes elements ignoring windowing information."""
 * 
 */

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":723
 * 
 * 
 * class PerWindowInvoker(DoFnInvoker):             # <<<<<<<<<<<<<<
 *   """An invoker that processes elements considering windowing information."""
 * 
 */

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":1336
 * 
 * 
 * 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":1550
 * 
 * 
 * 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":1562
 * 
 * 
 * class _OutputHandler(OutputHandler):             # <<<<<<<<<<<<<<
 *   """Processes output produced by DoFn method invocations."""
 * 
 */

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":1826
 * 
 * # 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":178
 * 
 * 
 * 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;

/* --- Runtime support code (head) --- */
/* Refnanny.proto */
#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, int);
    void (*DECREF)(void*, PyObject*, int);
    void (*GOTREF)(void*, PyObject*, int);
    void (*GIVEREF)(void*, PyObject*, int);
    void* (*SetupContext)(const char*, int, 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;
#ifdef WITH_THREAD
  #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__);\
          }
#else
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
#endif
  #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) {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #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_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)

/* PyObjectGetAttrStr.proto */
#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

/* GetBuiltinName.proto */
static PyObject *__Pyx_GetBuiltinName(PyObject *name);

/* 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);

/* RaiseDoubleKeywords.proto */
static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);

/* ParseKeywords.proto */
static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
    const char* function_name);

/* PyThreadStateGet.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
#define __Pyx_PyErr_Occurred()  __pyx_tstate->curexc_type
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#define __Pyx_PyErr_Occurred()  PyErr_Occurred()
#endif

/* PyErrFetchRestore.proto */
#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
#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

/* Profile.proto */
#ifndef CYTHON_PROFILE
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
  #define CYTHON_PROFILE 0
#else
  #define CYTHON_PROFILE 1
#endif
#endif
#ifndef CYTHON_TRACE_NOGIL
  #define CYTHON_TRACE_NOGIL 0
#else
  #if CYTHON_TRACE_NOGIL && !defined(CYTHON_TRACE)
    #define CYTHON_TRACE 1
  #endif
#endif
#ifndef CYTHON_TRACE
  #define CYTHON_TRACE 0
#endif
#if CYTHON_TRACE
  #undef CYTHON_PROFILE_REUSE_FRAME
#endif
#ifndef CYTHON_PROFILE_REUSE_FRAME
  #define CYTHON_PROFILE_REUSE_FRAME 0
#endif
#if CYTHON_PROFILE || CYTHON_TRACE
  #include "compile.h"
  #include "frameobject.h"
  #include "traceback.h"
#if PY_VERSION_HEX >= 0x030b00a6
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
  #if CYTHON_PROFILE_REUSE_FRAME
    #define CYTHON_FRAME_MODIFIER static
    #define CYTHON_FRAME_DEL(frame)
  #else
    #define CYTHON_FRAME_MODIFIER
    #define CYTHON_FRAME_DEL(frame) Py_CLEAR(frame)
  #endif
  #define __Pyx_TraceDeclarations\
      static PyCodeObject *__pyx_frame_code = NULL;\
      CYTHON_FRAME_MODIFIER PyFrameObject *__pyx_frame = NULL;\
      int __Pyx_use_tracing = 0;
  #define __Pyx_TraceFrameInit(codeobj)\
      if (codeobj) __pyx_frame_code = (PyCodeObject*) codeobj;
#if PY_VERSION_HEX >= 0x030b00a2
  #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
     (unlikely((tstate)->cframe->use_tracing) &&\
         (!(check_tracing) || !(tstate)->tracing) &&\
         (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
  #define __Pyx_EnterTracing(tstate) PyThreadState_EnterTracing(tstate)
  #define __Pyx_LeaveTracing(tstate) PyThreadState_LeaveTracing(tstate)
#elif PY_VERSION_HEX >= 0x030a00b1
  #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
     (unlikely((tstate)->cframe->use_tracing) &&\
         (!(check_tracing) || !(tstate)->tracing) &&\
         (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
  #define __Pyx_EnterTracing(tstate)\
      do { tstate->tracing++; tstate->cframe->use_tracing = 0; } while (0)
  #define __Pyx_LeaveTracing(tstate)\
      do {\
          tstate->tracing--;\
          tstate->cframe->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL)\
                                 || tstate->c_profilefunc != NULL);\
      } while (0)
#else
  #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
     (unlikely((tstate)->use_tracing) &&\
         (!(check_tracing) || !(tstate)->tracing) &&\
         (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
  #define __Pyx_EnterTracing(tstate)\
      do { tstate->tracing++; tstate->use_tracing = 0; } while (0)
  #define __Pyx_LeaveTracing(tstate)\
      do {\
          tstate->tracing--;\
          tstate->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL)\
                                         || tstate->c_profilefunc != NULL);\
      } while (0)
#endif
  #ifdef WITH_THREAD
  #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\
  if (nogil) {\
      if (CYTHON_TRACE_NOGIL) {\
          PyThreadState *tstate;\
          PyGILState_STATE state = PyGILState_Ensure();\
          tstate = __Pyx_PyThreadState_Current;\
          if (__Pyx_IsTracing(tstate, 1, 1)) {\
              __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
          }\
          PyGILState_Release(state);\
          if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
      }\
  } else {\
      PyThreadState* tstate = PyThreadState_GET();\
      if (__Pyx_IsTracing(tstate, 1, 1)) {\
          __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
          if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
      }\
  }
  #else
  #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\
  {   PyThreadState* tstate = PyThreadState_GET();\
      if (__Pyx_IsTracing(tstate, 1, 1)) {\
          __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
          if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
      }\
  }
  #endif
  #define __Pyx_TraceException()\
  if (likely(!__Pyx_use_tracing)); else {\
      PyThreadState* tstate = __Pyx_PyThreadState_Current;\
      if (__Pyx_IsTracing(tstate, 0, 1)) {\
          __Pyx_EnterTracing(tstate);\
          PyObject *exc_info = __Pyx_GetExceptionTuple(tstate);\
          if (exc_info) {\
              if (CYTHON_TRACE && tstate->c_tracefunc)\
                  tstate->c_tracefunc(\
                      tstate->c_traceobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\
              tstate->c_profilefunc(\
                  tstate->c_profileobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\
              Py_DECREF(exc_info);\
          }\
          __Pyx_LeaveTracing(tstate);\
      }\
  }
  static void __Pyx_call_return_trace_func(PyThreadState *tstate, PyFrameObject *frame, PyObject *result) {
      PyObject *type, *value, *traceback;
      __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
      __Pyx_EnterTracing(tstate);
      if (CYTHON_TRACE && tstate->c_tracefunc)
          tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_RETURN, result);
      if (tstate->c_profilefunc)
          tstate->c_profilefunc(tstate->c_profileobj, frame, PyTrace_RETURN, result);
      CYTHON_FRAME_DEL(frame);
      __Pyx_LeaveTracing(tstate);
      __Pyx_ErrRestoreInState(tstate, type, value, traceback);
  }
  #ifdef WITH_THREAD
  #define __Pyx_TraceReturn(result, nogil)\
  if (likely(!__Pyx_use_tracing)); else {\
      if (nogil) {\
          if (CYTHON_TRACE_NOGIL) {\
              PyThreadState *tstate;\
              PyGILState_STATE state = PyGILState_Ensure();\
              tstate = __Pyx_PyThreadState_Current;\
              if (__Pyx_IsTracing(tstate, 0, 0)) {\
                  __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
              }\
              PyGILState_Release(state);\
          }\
      } else {\
          PyThreadState* tstate = __Pyx_PyThreadState_Current;\
          if (__Pyx_IsTracing(tstate, 0, 0)) {\
              __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
          }\
      }\
  }
  #else
  #define __Pyx_TraceReturn(result, nogil)\
  if (likely(!__Pyx_use_tracing)); else {\
      PyThreadState* tstate = __Pyx_PyThreadState_Current;\
      if (__Pyx_IsTracing(tstate, 0, 0)) {\
          __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
      }\
  }
  #endif
  static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno);
  static int __Pyx_TraceSetupAndCall(PyCodeObject** code, PyFrameObject** frame, PyThreadState* tstate, const char *funcname, const char *srcfile, int firstlineno);
#else
  #define __Pyx_TraceDeclarations
  #define __Pyx_TraceFrameInit(codeobj)
  #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)   if ((1)); else goto_error;
  #define __Pyx_TraceException()
  #define __Pyx_TraceReturn(result, nogil)
#endif
#if CYTHON_TRACE
  static int __Pyx_call_line_trace_func(PyThreadState *tstate, PyFrameObject *frame, int lineno) {
      int ret;
      PyObject *type, *value, *traceback;
      __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
      __Pyx_PyFrame_SetLineNumber(frame, lineno);
      __Pyx_EnterTracing(tstate);
      ret = tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_LINE, NULL);
      __Pyx_LeaveTracing(tstate);
      if (likely(!ret)) {
          __Pyx_ErrRestoreInState(tstate, type, value, traceback);
      } else {
          Py_XDECREF(type);
          Py_XDECREF(value);
          Py_XDECREF(traceback);
      }
      return ret;
  }
  #ifdef WITH_THREAD
  #define __Pyx_TraceLine(lineno, nogil, goto_error)\
  if (likely(!__Pyx_use_tracing)); else {\
      if (nogil) {\
          if (CYTHON_TRACE_NOGIL) {\
              int ret = 0;\
              PyThreadState *tstate;\
              PyGILState_STATE state = PyGILState_Ensure();\
              tstate = __Pyx_PyThreadState_Current;\
              if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\
                  ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
              }\
              PyGILState_Release(state);\
              if (unlikely(ret)) goto_error;\
          }\
      } else {\
          PyThreadState* tstate = __Pyx_PyThreadState_Current;\
          if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\
              int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
              if (unlikely(ret)) goto_error;\
          }\
      }\
  }
  #else
  #define __Pyx_TraceLine(lineno, nogil, goto_error)\
  if (likely(!__Pyx_use_tracing)); else {\
      PyThreadState* tstate = __Pyx_PyThreadState_Current;\
      if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\
          int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
          if (unlikely(ret)) goto_error;\
      }\
  }
  #endif
#else
  #define __Pyx_TraceLine(lineno, nogil, goto_error)   if ((1)); else goto_error;
#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)   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_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

/* PyCFunctionFastCall.proto */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
#else
#define __Pyx_PyCFunction_FastCall(func, args, nargs)  (assert(0), NULL)
#endif

/* PyFunctionFastCall.proto */
#if CYTHON_FAST_PYCALL
#define __Pyx_PyFunction_FastCall(func, args, nargs)\
    __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
#else
#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
#endif
#define __Pyx_BUILD_ASSERT_EXPR(cond)\
    (sizeof(char [1 - 2*!(cond)]) - 1)
#ifndef Py_MEMBER_SIZE
#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
#endif
#if CYTHON_FAST_PYCALL
  static size_t __pyx_pyframe_localsplus_offset = 0;
  #include "frameobject.h"
#if PY_VERSION_HEX >= 0x030b00a6
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
  #define __Pxy_PyFrame_Initialize_Offsets()\
    ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
     (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
  #define __Pyx_PyFrame_GetLocalsplus(frame)\
    (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
#endif // CYTHON_FAST_PYCALL
#endif

/* PyObjectCall.proto */
#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

/* PyObjectCall2Args.proto */
static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);

/* PyObjectCallMethO.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif

/* PyObjectCallOneArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);

/* RaiseException.proto */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);

/* ArgTypeTest.proto */
#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
    ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
        __Pyx__ArgTypeTest(obj, type, name, exact))
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);

/* PyObjectCallNoArg.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
#else
#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
#endif

/* PyErrExceptionMatches.proto */
#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

/* GetAttr.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);

/* 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_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

/* 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);

/* HasAttr.proto */
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);

/* 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);

/* PyObjectGetMethod.proto */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);

/* PyObjectCallMethod0.proto */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);

/* RaiseNoneIterError.proto */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);

/* UnpackTupleError.proto */
static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index);

/* UnpackTuple2.proto */
#define __Pyx_unpack_tuple2(tuple, value1, value2, is_tuple, has_known_size, decref_tuple)\
    (likely(is_tuple || PyTuple_Check(tuple)) ?\
        (likely(has_known_size || PyTuple_GET_SIZE(tuple) == 2) ?\
            __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple) :\
            (__Pyx_UnpackTupleError(tuple, 2), -1)) :\
        __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, 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);

/* AssertionsEnabled.proto */
#define __Pyx_init_assertions_enabled()
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
  #define __pyx_assertions_enabled() (1)
#elif PY_VERSION_HEX < 0x03080000  ||  CYTHON_COMPILING_IN_PYPY  ||  defined(Py_LIMITED_API)
  #define __pyx_assertions_enabled() (!Py_OptimizeFlag)
#elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030900A6
  static int __pyx_assertions_enabled_flag;
  #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag)
  #undef __Pyx_init_assertions_enabled
  static void __Pyx_init_assertions_enabled(void) {
    __pyx_assertions_enabled_flag = ! _PyInterpreterState_GetConfig(__Pyx_PyThreadState_Current->interp)->optimization_level;
  }
#else
  #define __pyx_assertions_enabled() (!Py_OptimizeFlag)
#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);
        PyList_SET_ITEM(list, len, x);
        __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);

/* IncludeStringH.proto */
#include <string.h>

/* JoinPyUnicode.proto */
static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, 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 PY_MAJOR_VERSION < 3
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        likely(PyString_CheckExact(s)) ? PyUnicode_FromEncodedObject(s, NULL, "strict") :\
        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_str(s) :\
        likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_str(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 */
#if CYTHON_USE_EXC_INFO_STACK
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

/* ExtTypeTest.proto */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);

/* GetItemInt.proto */
#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
    (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)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (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);
#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (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);
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);

/* 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

/* None.proto */
static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);

/* CalculateMetaclass.proto */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);

/* FetchCommonType.proto */
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);

/* CythonFunctionShared.proto */
#define __Pyx_CyFunction_USED 1
#define __Pyx_CYFUNCTION_STATICMETHOD  0x01
#define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
#define __Pyx_CYFUNCTION_CCLASS        0x04
#define __Pyx_CyFunction_GetClosure(f)\
    (((__pyx_CyFunctionObject *) (f))->func_closure)
#define __Pyx_CyFunction_GetClassObj(f)\
    (((__pyx_CyFunctionObject *) (f))->func_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 {
    PyCFunctionObject func;
#if PY_VERSION_HEX < 0x030500A0
    PyObject *func_weakreflist;
#endif
    PyObject *func_dict;
    PyObject *func_name;
    PyObject *func_qualname;
    PyObject *func_doc;
    PyObject *func_globals;
    PyObject *func_code;
    PyObject *func_closure;
    PyObject *func_classobj;
    void *defaults;
    int defaults_pyobjects;
    size_t defaults_size;  // used by FusedFunction for copying defaults
    int flags;
    PyObject *defaults_tuple;
    PyObject *defaults_kwdict;
    PyObject *(*defaults_getter)(PyObject *);
    PyObject *func_annotations;
} __pyx_CyFunctionObject;
static PyTypeObject *__pyx_CyFunctionType = 0;
#define __Pyx_CyFunction_Check(obj)  (__Pyx_TypeCheck(obj, __pyx_CyFunctionType))
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *self,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
                                                         size_t size,
                                                         int pyobjects);
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(void);

/* 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 >= 0x030500A1
#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);

/* 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);
        PyList_SET_ITEM(list, len, x);
        __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 */
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);

/* IterNext.proto */
#define __Pyx_PyIter_Next(obj) __Pyx_PyIter_Next2(obj, NULL)
static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject *, PyObject *);

/* 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

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_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
static CYTHON_INLINE PyObject* __Pyx_PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name) {
    PyObject *res;
    PyTypeObject *tp = Py_TYPE(obj);
#if PY_MAJOR_VERSION < 3
    if (unlikely(PyInstance_Check(obj)))
        return __Pyx_PyObject_GetAttrStr(obj, attr_name);
#endif
    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 {
        PyErr_SetObject(PyExc_AttributeError, attr_name);
    }
    return res;
}
#else
#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n)
#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

/* PyIntCompare.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace);

/* ListExtend.proto */
static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) {
#if CYTHON_COMPILING_IN_CPYTHON
    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
}

/* None.proto */
static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_SubtractObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
#endif

/* Import.proto */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);

/* ImportFrom.proto */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);

/* 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_dealloc);

/* PyObject_GenericGetAttrNoDict.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
#endif

/* PyObject_GenericGetAttr.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
#endif

/* SetVTable.proto */
static int __Pyx_SetVtable(PyObject *dict, void *vtable);

/* PyObjectGetAttrStrNoError.proto */
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_0_29_36
#define __PYX_HAVE_RT_ImportType_proto_0_29_36
#if __STDC_VERSION__ >= 201112L
#include <stdalign.h>
#endif
#if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L
#define __PYX_GET_STRUCT_ALIGNMENT_0_29_36(s) alignof(s)
#else
#define __PYX_GET_STRUCT_ALIGNMENT_0_29_36(s) sizeof(void*)
#endif
enum __Pyx_ImportType_CheckSize_0_29_36 {
   __Pyx_ImportType_CheckSize_Error_0_29_36 = 0,
   __Pyx_ImportType_CheckSize_Warn_0_29_36 = 1,
   __Pyx_ImportType_CheckSize_Ignore_0_29_36 = 2
};
static PyTypeObject *__Pyx_ImportType_0_29_36(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_0_29_36 check_size);
#endif

/* GetVTable.proto */
static void* __Pyx_GetVtable(PyObject *dict);

/* GetNameInClass.proto */
#define __Pyx_GetNameInClass(var, nmspace, name)  (var) = __Pyx__GetNameInClass(nmspace, name)
static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name);

/* CLineInTraceback.proto */
#ifdef CYTHON_CLINE_IN_TRACEBACK
#define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
#else
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
#endif

/* CodeObjectCache.proto */
typedef struct {
    PyCodeObject* code_object;
    int code_line;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
};
static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static PyCodeObject *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);

/* AddTraceback.proto */
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename);

/* GCCDiagnostics.proto */
#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
#define __Pyx_HAS_GCC_DIAGNOSTIC
#endif

/* CIntFromPy.proto */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value);

/* CIntFromPy.proto */
static CYTHON_INLINE int64_t __Pyx_PyInt_As_int64_t(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);

/* FastTypeChecks.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
static CYTHON_INLINE int __Pyx_IsSubtype(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_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
#endif
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)

/* CoroutineBase.proto */
typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, 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 {
    PyObject_HEAD
    __pyx_coroutine_body_t body;
    PyObject *closure;
    __Pyx_ExcInfoStruct gi_exc_state;
    PyObject *gi_weakreflist;
    PyObject *classobj;
    PyObject *yieldfrom;
    PyObject *gi_name;
    PyObject *gi_qualname;
    PyObject *gi_modulename;
    PyObject *gi_code;
    PyObject *gi_frame;
    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 PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
static PyObject *__Pyx_Coroutine_Close(PyObject *self);
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);

/* PatchModuleWithCoroutine.proto */
static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);

/* PatchGeneratorABC.proto */
static int __Pyx_patch_abc(void);

/* Generator.proto */
#define __Pyx_Generator_USED
static PyTypeObject *__pyx_GeneratorType = 0;
#define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
#define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\
    __Pyx__Coroutine_New(__pyx_GeneratorType, body, code, closure, name, qualname, module_name)
static PyObject *__Pyx_Generator_Next(PyObject *self);
static int __pyx_Generator_init(void);

/* CheckBinaryVersion.proto */
static int __Pyx_check_binary_version(void);

/* VoidPtrExport.proto */
static int __Pyx_ExportVoidPtr(PyObject *name, void *p, const char *sig);

/* VoidPtrImport.proto */
static int __Pyx_ImportVoidPtr_0_29_36(PyObject *module, const char *name, void **p, const char *sig);

/* InitStrings.proto */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);

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_ptype_11apache_beam_5utils_14windowed_value_PaneInfo = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase = 0;
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' */
static PyTypeObject *__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter = 0;

/* Module declarations from 'apache_beam.runners.common' */
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common_Receiver = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common_OutputHandler = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common__OutputHandler = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common_DoFnContext = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common__ReceiverAdapter = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_1_genexpr = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_2___init__ = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph = 0;
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*/
#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' */
static PyObject *__pyx_builtin_object;
static PyObject *__pyx_builtin_property;
static PyObject *__pyx_builtin_staticmethod;
static PyObject *__pyx_builtin_any;
static PyObject *__pyx_builtin_BaseException;
static PyObject *__pyx_builtin_NotImplementedError;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_zip;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_super;
static PyObject *__pyx_builtin_StopIteration;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_round;
static PyObject *__pyx_builtin_RuntimeError;
static PyObject *__pyx_builtin_AttributeError;
static const char __pyx_k_a[] = "a";
static const char __pyx_k_d[] = "d";
static const char __pyx_k_i[] = "i";
static const char __pyx_k_p[] = "p";
static const char __pyx_k_t[] = "t";
static const char __pyx_k_w[] = "w";
static const char __pyx_k_x[] = "x";
static const char __pyx_k_In[] = "In ";
static const char __pyx_k_KV[] = "KV";
static const char __pyx_k_eq[] = "__eq__";
static const char __pyx_k_fn[] = "fn";
static const char __pyx_k_kw[] = "kw";
static const char __pyx_k_of[] = "of";
static const char __pyx_k_si[] = "si";
static const char __pyx_k_tb[] = "tb";
static const char __pyx_k_Any[] = "Any";
static const char __pyx_k__23[] = ".";
static const char __pyx_k__64[] = "'.";
static const char __pyx_k_any[] = "any";
static const char __pyx_k_doc[] = "__doc__";
static const char __pyx_k_exn[] = "exn";
static const char __pyx_k_key[] = "key";
static const char __pyx_k_new[] = "__new__";
static const char __pyx_k_sig[] = "sig";
static const char __pyx_k_sys[] = "sys";
static const char __pyx_k_tag[] = "tag";
static const char __pyx_k_urn[] = "urn";
static const char __pyx_k_zip[] = "zip";
static const char __pyx_k_Dict[] = "Dict";
static const char __pyx_k_DoFn[] = "DoFn";
static const char __pyx_k_Enum[] = "Enum";
static const char __pyx_k_List[] = "List";
static const char __pyx_k_Lock[] = "Lock";
static const char __pyx_k__111[] = "";
static const char __pyx_k__127[] = ": ";
static const char __pyx_k__184[] = "_";
static const char __pyx_k_args[] = "args";
static const char __pyx_k_core[] = "core";
static const char __pyx_k_dict[] = "__dict__";
static const char __pyx_k_enum[] = "enum";
static const char __pyx_k_exit[] = "__exit__";
static const char __pyx_k_hash[] = "__hash__";
static const char __pyx_k_init[] = "__init__";
static const char __pyx_k_keys[] = "keys";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_name[] = "__name__";
static const char __pyx_k_repr[] = "__repr__";
static const char __pyx_k_self[] = "self";
static const char __pyx_k_send[] = "send";
static const char __pyx_k_size[] = "size";
static const char __pyx_k_spec[] = "spec";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_util[] = "util";
static const char __pyx_k_Tuple[] = "Tuple";
static const char __pyx_k_batch[] = "batch";
static const char __pyx_k_close[] = "close";
static const char __pyx_k_do_fn[] = "do_fn";
static const char __pyx_k_enter[] = "__enter__";
static const char __pyx_k_flush[] = "flush";
static const char __pyx_k_items[] = "items";
static const char __pyx_k_label[] = "label";
static const char __pyx_k_other[] = "other";
static const char __pyx_k_param[] = "param";
static const char __pyx_k_pcoll[] = "pcoll";
static const char __pyx_k_round[] = "round";
static const char __pyx_k_setup[] = "setup";
static const char __pyx_k_split[] = "split";
static const char __pyx_k_start[] = "start";
static const char __pyx_k_state[] = "state";
static const char __pyx_k_strip[] = "strip";
static const char __pyx_k_super[] = "super";
static const char __pyx_k_tag_2[] = ", tag ";
static const char __pyx_k_throw[] = "throw";
static const char __pyx_k_value[] = "value";
static const char __pyx_k_DoFn_2[] = "DoFn ";
static const char __pyx_k_LOGGER[] = "_LOGGER";
static const char __pyx_k_PAR_DO[] = "PAR_DO";
static const char __pyx_k_append[] = "append";
static const char __pyx_k_assign[] = "assign";
static const char __pyx_k_coders[] = "coders";
static const char __pyx_k_dict_2[] = "_dict";
static const char __pyx_k_extend[] = "extend";
static const char __pyx_k_finish[] = "finish";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_inputs[] = "inputs";
static const char __pyx_k_kwargs[] = "kwargs";
static const char __pyx_k_method[] = "method";
static const char __pyx_k_module[] = "__module__";
static const char __pyx_k_object[] = "object";
static const char __pyx_k_pickle[] = "pickle";
static const char __pyx_k_reduce[] = "__reduce__";
static const char __pyx_k_result[] = "result";
static const char __pyx_k_return[] = "return";
static const char __pyx_k_typing[] = "typing";
static const char __pyx_k_update[] = "update";
static const char __pyx_k_values[] = "values";
static const char __pyx_k_window[] = "window";
static const char __pyx_k_Counter[] = "Counter";
static const char __pyx_k_Mapping[] = "Mapping";
static const char __pyx_k_context[] = "context";
static const char __pyx_k_element[] = "element";
static const char __pyx_k_genexpr[] = "genexpr";
static const char __pyx_k_logging[] = "logging";
static const char __pyx_k_new_exn[] = "new_exn";
static const char __pyx_k_outputs[] = "outputs";
static const char __pyx_k_prepare[] = "__prepare__";
static const char __pyx_k_primary[] = "primary";
static const char __pyx_k_process[] = "process";
static const char __pyx_k_receive[] = "receive";
static const char __pyx_k_results[] = "results";
static const char __pyx_k_windows[] = "windows";
static const char __pyx_k_ITERABLE[] = "ITERABLE";
static const char __pyx_k_Iterable[] = "Iterable";
static const char __pyx_k_KeyParam[] = "KeyParam";
static const char __pyx_k_NO_VALUE[] = "NO_VALUE";
static const char __pyx_k_Optional[] = "Optional";
static const char __pyx_k_Received[] = "Received ";
static const char __pyx_k_Receiver[] = "Receiver";
static const char __pyx_k_WindowFn[] = "WindowFn";
static const char __pyx_k_coder_id[] = "coder_id";
static const char __pyx_k_defaults[] = "defaults";
static const char __pyx_k_exc_info[] = "exc_info";
static const char __pyx_k_finalize[] = "finalize";
static const char __pyx_k_fraction[] = "fraction";
static const char __pyx_k_get_impl[] = "get_impl";
static const char __pyx_k_getstate[] = "__getstate__";
static const char __pyx_k_key_type[] = "key_type";
static const char __pyx_k_param_id[] = "param_id";
static const char __pyx_k_pcoll_id[] = "pcoll_id";
static const char __pyx_k_progress[] = "progress";
static const char __pyx_k_property[] = "property";
static const char __pyx_k_pyx_capi[] = "__pyx_capi__";
static const char __pyx_k_pyx_type[] = "__pyx_type";
static const char __pyx_k_qualname[] = "__qualname__";
static const char __pyx_k_residual[] = "residual";
static const char __pyx_k_setstate[] = "__setstate__";
static const char __pyx_k_teardown[] = "teardown";
static const char __pyx_k_to_index[] = "to_index";
static const char __pyx_k_validate[] = "_validate";
static const char __pyx_k_windowfn[] = "windowfn";
static const char __pyx_k_DoFnParam[] = "_DoFnParam";
static const char __pyx_k_DoFnState[] = "DoFnState";
static const char __pyx_k_NoContext[] = "_NoContext";
static const char __pyx_k_TimerSpec[] = "TimerSpec";
static const char __pyx_k_Timestamp[] = "Timestamp";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_arg_names[] = "arg_names";
static const char __pyx_k_completed[] = "completed";
static const char __pyx_k_enumerate[] = "enumerate";
static const char __pyx_k_exception[] = "exception";
static const char __pyx_k_getLogger[] = "getLogger";
static const char __pyx_k_get_coder[] = "get_coder";
static const char __pyx_k_get_state[] = "get_state";
static const char __pyx_k_get_timer[] = "get_timer";
static const char __pyx_k_metaclass[] = "__metaclass__";
static const char __pyx_k_pane_info[] = "pane_info";
static const char __pyx_k_param_ids[] = "param_ids";
static const char __pyx_k_primaries[] = "primaries";
static const char __pyx_k_pyx_state[] = "__pyx_state";
static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
static const char __pyx_k_remaining[] = "remaining";
static const char __pyx_k_residuals[] = "residuals";
static const char __pyx_k_signature[] = "signature";
static const char __pyx_k_step_name[] = "step_name";
static const char __pyx_k_threading[] = "threading";
static const char __pyx_k_timestamp[] = "timestamp";
static const char __pyx_k_traceback[] = "traceback";
static const char __pyx_k_transform[] = "transform";
static const char __pyx_k_try_split[] = "try_split";
static const char __pyx_k_typehints[] = "typehints";
static const char __pyx_k_userstate[] = "userstate";
static const char __pyx_k_window_fn[] = "window_fn";
static const char __pyx_k_windowing[] = "windowing";
static const char __pyx_k_BytesCoder[] = "BytesCoder";
static const char __pyx_k_DoFnRunner[] = "DoFnRunner";
static const char __pyx_k_GroupByKey[] = "GroupByKey";
static const char __pyx_k_StateParam[] = "StateParam";
static const char __pyx_k_TimerParam[] = "TimerParam";
static const char __pyx_k_TupleCoder[] = "TupleCoder";
static const char __pyx_k_ValueError[] = "ValueError";
static const char __pyx_k_aggregator[] = "aggregator";
static const char __pyx_k_check_done[] = "check_done";
static const char __pyx_k_components[] = "components";
static const char __pyx_k_from_index[] = "from_index";
static const char __pyx_k_full_label[] = "full_label";
static const char __pyx_k_get_length[] = "get_length";
static const char __pyx_k_has_timers[] = "has_timers";
static const char __pyx_k_input_args[] = "input_args";
static const char __pyx_k_primitives[] = "primitives";
static const char __pyx_k_pyx_result[] = "__pyx_result";
static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
static const char __pyx_k_sideinputs[] = "sideinputs";
static const char __pyx_k_state_spec[] = "state_spec";
static const char __pyx_k_timer_spec[] = "timer_spec";
static const char __pyx_k_timestamps[] = "timestamps";
static const char __pyx_k_total_work[] = "total_work";
static const char __pyx_k_transforms[] = "transforms";
static const char __pyx_k_value_type[] = "value_type";
static const char __pyx_k_with_value[] = "with_value";
static const char __pyx_k_CounterName[] = "CounterName";
static const char __pyx_k_DO_NOT_CARE[] = "DO_NOT_CARE";
static const char __pyx_k_DoFnContext[] = "DoFnContext";
static const char __pyx_k_DoFnInvoker[] = "DoFnInvoker";
static const char __pyx_k_NameContext[] = "NameContext";
static const char __pyx_k_PickleError[] = "PickleError";
static const char __pyx_k_WindowParam[] = "WindowParam";
static const char __pyx_k_accumulator[] = "accumulator";
static const char __pyx_k_common_urns[] = "common_urns";
static const char __pyx_k_counter_for[] = "counter_for";
static const char __pyx_k_experiments[] = "experiments";
static const char __pyx_k_get_counter[] = "get_counter";
static const char __pyx_k_input_coder[] = "input_coder";
static const char __pyx_k_method_name[] = "method_name";
static const char __pyx_k_placeholder[] = "placeholder";
static const char __pyx_k_restriction[] = "restriction";
static const char __pyx_k_set_element[] = "set_element";
static const char __pyx_k_side_inputs[] = "side_inputs";
static const char __pyx_k_timestamp_2[] = "_timestamp";
static const char __pyx_k_try_split_2[] = "_try_split";
static const char __pyx_k_tuple_types[] = "tuple_types";
static const char __pyx_k_ElementParam[] = "ElementParam";
static const char __pyx_k_GROUP_BY_KEY[] = "GROUP_BY_KEY";
static const char __pyx_k_GlobalWindow[] = "GlobalWindow";
static const char __pyx_k_RuntimeError[] = "RuntimeError";
static const char __pyx_k_TaggedOutput[] = "TaggedOutput";
static const char __pyx_k_args_to_pick[] = "args_to_pick";
static const char __pyx_k_element_type[] = "element_type";
static const char __pyx_k_input_kwargs[] = "input_kwargs";
static const char __pyx_k_invoke_setup[] = "invoke_setup";
static const char __pyx_k_invoke_split[] = "invoke_split";
static const char __pyx_k_logging_name[] = "logging_name";
static const char __pyx_k_method_value[] = "method_value";
static const char __pyx_k_metrics_name[] = "metrics_name";
static const char __pyx_k_output_coder[] = "output_coder";
static const char __pyx_k_pcollections[] = "pcollections";
static const char __pyx_k_placeholders[] = "placeholders";
static const char __pyx_k_primary_size[] = "primary_size";
static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
static const char __pyx_k_start_bundle[] = "start_bundle";
static const char __pyx_k_staticmethod[] = "staticmethod";
static const char __pyx_k_stringsource[] = "stringsource";
static const char __pyx_k_transform_id[] = "transform_id";
static const char __pyx_k_unused_value[] = "unused_value";
static const char __pyx_k_use_setstate[] = "use_setstate";
static const char __pyx_k_window_index[] = "window_index";
static const char __pyx_k_AssignContext[] = "AssignContext";
static const char __pyx_k_BaseException[] = "BaseException";
static const char __pyx_k_DoFnSignature[] = "DoFnSignature";
static const char __pyx_k_GlobalWindows[] = "GlobalWindows";
static const char __pyx_k_MethodWrapper[] = "MethodWrapper";
static const char __pyx_k_NameContext_s[] = "NameContext(%s)";
static const char __pyx_k_OutputHandler[] = "OutputHandler";
static const char __pyx_k_PaneInfoParam[] = "PaneInfoParam";
static const char __pyx_k_SimpleInvoker[] = "SimpleInvoker";
static const char __pyx_k_StopIteration[] = "StopIteration";
static const char __pyx_k_TYPE_CHECKING[] = "TYPE_CHECKING";
static const char __pyx_k_WindowedBatch[] = "WindowedBatch";
static const char __pyx_k_WindowedValue[] = "WindowedValue";
static const char __pyx_k_bundle_method[] = "bundle_method";
static const char __pyx_k_encode_nested[] = "encode_nested";
static const char __pyx_k_finish_bundle[] = "finish_bundle";
static const char __pyx_k_for_transform[] = " for transform ";
static const char __pyx_k_global_window[] = "global_window";
static const char __pyx_k_has_duplicate[] = " has duplicate ";
static const char __pyx_k_is_cythonized[] = "is_cythonized";
static const char __pyx_k_obj_to_invoke[] = "obj_to_invoke";
static const char __pyx_k_primary_value[] = "primary_value";
static const char __pyx_k_process_batch[] = "process_batch";
static const char __pyx_k_receive_batch[] = "receive_batch";
static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
static const char __pyx_k_residual_size[] = "residual_size";
static const char __pyx_k_subtransforms[] = "subtransforms";
static const char __pyx_k_ASSIGN_WINDOWS[] = "ASSIGN_WINDOWS";
static const char __pyx_k_ArgPlaceholder[] = "ArgPlaceholder";
static const char __pyx_k_AttributeError[] = "AttributeError";
static const char __pyx_k_BATCH_REQUIRED[] = "BATCH_REQUIRED";
static const char __pyx_k_BatchConverter[] = "BatchConverter";
static const char __pyx_k_Receiver_flush[] = "Receiver.flush";
static const char __pyx_k_SideInputParam[] = "SideInputParam";
static const char __pyx_k_TimestampParam[] = "TimestampParam";
static const char __pyx_k_completed_work[] = "completed_work";
static const char __pyx_k_create_invoker[] = "create_invoker";
static const char __pyx_k_create_tracker[] = "create_tracker";
static const char __pyx_k_get_dofn_specs[] = "get_dofn_specs";
static const char __pyx_k_instruction_id[] = "instruction_id";
static const char __pyx_k_invoke_process[] = "invoke_process";
static const char __pyx_k_main_receivers[] = "main_receivers";
static const char __pyx_k_method_wrapper[] = "method_wrapper";
static const char __pyx_k_operation_name[] = "operation_name";
static const char __pyx_k_output_handler[] = "output_handler";
static const char __pyx_k_output_sampler[] = "output_sampler";
static const char __pyx_k_pipeline_proto[] = "pipeline_proto";
static const char __pyx_k_process_method[] = "process_method";
static const char __pyx_k_remaining_work[] = "remaining_work";
static const char __pyx_k_residual_value[] = "residual_value";
static const char __pyx_k_scale_progress[] = "_scale_progress";
static const char __pyx_k_transform_node[] = "transform_node";
static const char __pyx_k_type_but_got_s[] = "type but got %s";
static const char __pyx_k_windowed_batch[] = "windowed_batch";
static const char __pyx_k_windowed_value[] = "windowed_value";
static const char __pyx_k_with_traceback[] = "with_traceback";
static const char __pyx_k_BATCH_FORBIDDEN[] = "BATCH_FORBIDDEN";
static const char __pyx_k_OutputHandler_2[] = "_OutputHandler";
static const char __pyx_k_PipelineVisitor[] = "PipelineVisitor";
static const char __pyx_k_ReceiverAdapter[] = "_ReceiverAdapter";
static const char __pyx_k_additional_args[] = "additional_args";
static const char __pyx_k_all_timer_specs[] = "all_timer_specs";
static const char __pyx_k_counter_factory[] = "_counter_factory";
static const char __pyx_k_deferred_status[] = "deferred_status";
static const char __pyx_k_estimator_state[] = "estimator_state";
static const char __pyx_k_finalize_bundle[] = "finalize_bundle";
static const char __pyx_k_invoke_teardown[] = "invoke_teardown";
static const char __pyx_k_is_not_a_string[] = " is not a string";
static const char __pyx_k_logging_context[] = "logging_context";
static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
static const char __pyx_k_scaled_progress[] = "scaled_progress";
static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
static const char __pyx_k_step_annotation[] = "step_annotation";
static const char __pyx_k_transform_proto[] = "transform_proto";
static const char __pyx_k_visit_transform[] = "visit_transform";
static const char __pyx_k_watermark_param[] = "watermark_param";
static const char __pyx_k_while_running_s[] = " [while running '%s']";
static const char __pyx_k_DoFnRunner_setup[] = "DoFnRunner.setup";
static const char __pyx_k_DoFnRunner_start[] = "DoFnRunner.start";
static const char __pyx_k_DoFnState___init[] = "DoFnState.__init__";
static const char __pyx_k_ExecutionContext[] = "ExecutionContext";
static const char __pyx_k_NameContext___eq[] = "NameContext.__eq__";
static const char __pyx_k_NoContext___init[] = "_NoContext.__init__";
static const char __pyx_k_PerWindowInvoker[] = "PerWindowInvoker";
static const char __pyx_k_Receiver_receive[] = "Receiver.receive";
static const char __pyx_k_RestrictionParam[] = "RestrictionParam";
static const char __pyx_k_TimestampedValue[] = "TimestampedValue";
static const char __pyx_k_and_output_coder[] = " and output coder ";
static const char __pyx_k_args_for_process[] = "args_for_process";
static const char __pyx_k_current_progress[] = "current_progress";
static const char __pyx_k_existing_windows[] = "existing_windows";
static const char __pyx_k_is_stateful_dofn[] = "is_stateful_dofn";
static const char __pyx_k_lifecycle_method[] = "lifecycle_method";
static const char __pyx_k_requires_batches[] = "requires_batches";
static const char __pyx_k_restriction_size[] = "restriction_size";
static const char __pyx_k_sample_exception[] = "sample_exception";
static const char __pyx_k_supports_batches[] = "supports_batches";
static const char __pyx_k_tagged_receivers[] = "tagged_receivers";
static const char __pyx_k_tagged_with_step[] = "_tagged_with_step";
static const char __pyx_k_validate_process[] = "_validate_process";
static const char __pyx_k_window_observing[] = "window_observing";
static const char __pyx_k_DoFnProcessParams[] = "DoFnProcessParams";
static const char __pyx_k_DoFnRunner_finish[] = "DoFnRunner.finish";
static const char __pyx_k_GlobalWindowCoder[] = "GlobalWindowCoder";
static const char __pyx_k_additional_kwargs[] = "additional_kwargs";
static const char __pyx_k_attached_callback[] = "_attached_callback";
static const char __pyx_k_cannot_be_used_in[] = " cannot be used in ";
static const char __pyx_k_coerce_to_kv_type[] = "coerce_to_kv_type";
static const char __pyx_k_counter_factory_2[] = "counter_factory";
static const char __pyx_k_current_watermark[] = "current_watermark";
static const char __pyx_k_dynamic_timer_tag[] = "dynamic_timer_tag";
static const char __pyx_k_invoke_user_timer[] = "invoke_user_timer";
static const char __pyx_k_method_parameters[] = " method parameters: ";
static const char __pyx_k_observe_timestamp[] = "observe_timestamp";
static const char __pyx_k_reraise_augmented[] = "_reraise_augmented";
static const char __pyx_k_restriction_coder[] = "restriction_coder";
static const char __pyx_k_stop_window_index[] = "stop_window_index";
static const char __pyx_k_supports_elements[] = "supports_elements";
static const char __pyx_k_BatchingPreference[] = "BatchingPreference";
static const char __pyx_k_DoFnRunner_process[] = "DoFnRunner.process";
static const char __pyx_k_NameContext___hash[] = "NameContext.__hash__";
static const char __pyx_k_NameContext___init[] = "NameContext.__init__";
static const char __pyx_k_NameContext___repr[] = "NameContext.__repr__";
static const char __pyx_k_RestrictionTracker[] = "RestrictionTracker";
static const char __pyx_k_SplitResultPrimary[] = "SplitResultPrimary";
static const char __pyx_k_WatermarkEstimator[] = "WatermarkEstimator";
static const char __pyx_k_WindowedValueCoder[] = "WindowedValueCoder";
static const char __pyx_k_apache_beam_coders[] = "apache_beam.coders";
static const char __pyx_k_apache_beam_iobase[] = "apache_beam.iobase";
static const char __pyx_k_apache_beam_pvalue[] = "apache_beam.pvalue";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_default_arg_values[] = "default_arg_values";
static const char __pyx_k_deferred_timestamp[] = "deferred_timestamp";
static const char __pyx_k_is_splittable_dofn[] = "is_splittable_dofn";
static const char __pyx_k_kwargs_for_process[] = "kwargs_for_process";
static const char __pyx_k_process_invocation[] = "process_invocation";
static const char __pyx_k_process_user_timer[] = "process_user_timer";
static const char __pyx_k_root_transform_ids[] = "root_transform_ids";
static const char __pyx_k_user_state_context[] = "user_state_context";
static const char __pyx_k_validate_transform[] = "validate_transform";
static const char __pyx_k_DoFnRunner_finalize[] = "DoFnRunner.finalize";
static const char __pyx_k_DoFnRunner_teardown[] = "DoFnRunner.teardown";
static const char __pyx_k_NoContext_timestamp[] = "_NoContext.timestamp";
static const char __pyx_k_NotImplementedError[] = "NotImplementedError";
static const char __pyx_k_RestrictionProgress[] = "RestrictionProgress";
static const char __pyx_k_RestrictionProvider[] = "RestrictionProvider";
static const char __pyx_k_SplitResultResidual[] = "SplitResultResidual";
static const char __pyx_k_beam_yields_batches[] = "_beam_yields_batches";
static const char __pyx_k_component_coder_ids[] = "component_coder_ids";
static const char __pyx_k_get_estimator_state[] = "get_estimator_state";
static const char __pyx_k_initial_restriction[] = "initial_restriction";
static const char __pyx_k_invoke_start_bundle[] = "invoke_start_bundle";
static const char __pyx_k_output_values_coder[] = "output_values_coder";
static const char __pyx_k_primary_restriction[] = "primary_restriction";
static const char __pyx_k_primary_split_value[] = "primary_split_value";
static const char __pyx_k_remaining_args_iter[] = "remaining_args_iter";
static const char __pyx_k_restriction_tracker[] = "restriction_tracker";
static const char __pyx_k_watermark_estimator[] = "watermark_estimator";
static const char __pyx_k_BundleFinalizerParam[] = "BundleFinalizerParam";
static const char __pyx_k_DoFnRunner_try_split[] = "DoFnRunner.try_split";
static const char __pyx_k_DynamicTimerTagParam[] = "DynamicTimerTagParam";
static const char __pyx_k_RuntimeValueProvider[] = "RuntimeValueProvider";
static const char __pyx_k_apache_beam_internal[] = "apache_beam.internal";
static const char __pyx_k_apache_beam_pipeline[] = "apache_beam.pipeline";
static const char __pyx_k_beam_yields_elements[] = "_beam_yields_elements";
static const char __pyx_k_current_window_index[] = "current_window_index";
static const char __pyx_k_deferred_restriction[] = "deferred_restriction";
static const char __pyx_k_get_arg_placeholders[] = "_get_arg_placeholders";
static const char __pyx_k_invoke_bundle_method[] = "_invoke_bundle_method";
static const char __pyx_k_invoke_finish_bundle[] = "invoke_finish_bundle";
static const char __pyx_k_invoke_process_batch[] = "invoke_process_batch";
static const char __pyx_k_is_globally_windowed[] = "is_globally_windowed";
static const char __pyx_k_primary_restrictions[] = "primary_restrictions";
static const char __pyx_k_process_batch_method[] = "process_batch_method";
static const char __pyx_k_residual_restriction[] = "residual_restriction";
static const char __pyx_k_residual_split_value[] = "residual_split_value";
static const char __pyx_k_restriction_provider[] = "restriction_provider";
static const char __pyx_k_start_bundle_outputs[] = "start_bundle_outputs";
static const char __pyx_k_windowed_input_batch[] = "windowed_input_batch";
static const char __pyx_k_DATAFLOW_DISTRIBUTION[] = "DATAFLOW_DISTRIBUTION";
static const char __pyx_k_DoFnState_counter_for[] = "DoFnState.counter_for";
static const char __pyx_k_ENCODED_IMPULSE_VALUE[] = "ENCODED_IMPULSE_VALUE";
static const char __pyx_k_apache_beam_io_iobase[] = "apache_beam.io.iobase";
static const char __pyx_k_apache_beam_typehints[] = "apache_beam.typehints";
static const char __pyx_k_estimator_state_coder[] = "estimator_state_coder";
static const char __pyx_k_finish_bundle_outputs[] = "finish_bundle_outputs";
static const char __pyx_k_format_exception_only[] = "format_exception_only";
static const char __pyx_k_fraction_of_remainder[] = "fraction_of_remainder";
static const char __pyx_k_get_restriction_coder[] = "get_restriction_coder";
static const char __pyx_k_init___locals_genexpr[] = "__init__.<locals>.genexpr";
static const char __pyx_k_insert_values_in_args[] = "insert_values_in_args";
static const char __pyx_k_invoke_create_tracker[] = "invoke_create_tracker";
static const char __pyx_k_invoke_timer_callback[] = "invoke_timer_callback";
static const char __pyx_k_new_stop_window_index[] = "new_stop_window_index";
static const char __pyx_k_pyx_unpickle_Receiver[] = "__pyx_unpickle_Receiver";
static const char __pyx_k_residual_restrictions[] = "residual_restrictions";
static const char __pyx_k_unbounded_per_element[] = "unbounded_per_element";
static const char __pyx_k_Bad_coder_for_input_of[] = "Bad coder for input of ";
static const char __pyx_k_GroupByKeyInputVisitor[] = "GroupByKeyInputVisitor";
static const char __pyx_k_Receiver_receive_batch[] = "Receiver.receive_batch";
static const char __pyx_k_RestrictionTrackerView[] = "RestrictionTrackerView";
static const char __pyx_k_apache_beam_transforms[] = "apache_beam.transforms";
static const char __pyx_k_args_for_process_batch[] = "args_for_process_batch";
static const char __pyx_k_args_with_placeholders[] = "args_with_placeholders";
static const char __pyx_k_bundle_finalizer_param[] = "bundle_finalizer_param";
static const char __pyx_k_get_aggregator_counter[] = "get_aggregator_counter";
static const char __pyx_k_get_function_arguments[] = "get_function_arguments";
static const char __pyx_k_handle_process_outputs[] = "handle_process_outputs";
static const char __pyx_k_maybe_sample_exception[] = "_maybe_sample_exception";
static const char __pyx_k_output_batch_converter[] = "output_batch_converter";
static const char __pyx_k_process_yields_batches[] = "process_yields_batches";
static const char __pyx_k_use_per_window_invoker[] = "use_per_window_invoker";
static const char __pyx_k_validate_bundle_method[] = "_validate_bundle_method";
static const char __pyx_k_validate_process_batch[] = "_validate_process_batch";
static const char __pyx_k_validate_stateful_dofn[] = "_validate_stateful_dofn";
static const char __pyx_k_windowed_input_element[] = "windowed_input_element";
static const char __pyx_k_Bad_coder_for_output_of[] = "Bad coder for output of ";
static const char __pyx_k_DoFnContext_set_element[] = "DoFnContext.set_element";
static const char __pyx_k_DoFnSignature__validate[] = "DoFnSignature._validate";
static const char __pyx_k_WatermarkEstimatorParam[] = "WatermarkEstimatorParam";
static const char __pyx_k_apache_beam_portability[] = "apache_beam.portability";
static const char __pyx_k_as_empty_windowed_value[] = "as_empty_windowed_value";
static const char __pyx_k_current_estimator_state[] = "current_estimator_state";
static const char __pyx_k_has_bundle_finalization[] = "has_bundle_finalization";
static const char __pyx_k_invoke_lifecycle_method[] = "_invoke_lifecycle_method";
static const char __pyx_k_pyx_unpickle_DoFnRunner[] = "__pyx_unpickle_DoFnRunner";
static const char __pyx_k_validate_pipeline_graph[] = "validate_pipeline_graph";
static const char __pyx_k_DoFnInvoker_invoke_setup[] = "DoFnInvoker.invoke_setup";
static const char __pyx_k_DoFnInvoker_invoke_split[] = "DoFnInvoker.invoke_split";
static const char __pyx_k_DoFnRunner_process_batch[] = "DoFnRunner.process_batch";
static const char __pyx_k_DoFnSignature_has_timers[] = "DoFnSignature.has_timers";
static const char __pyx_k_HomogeneousWindowedBatch[] = "HomogeneousWindowedBatch";
static const char __pyx_k_IMPULSE_VALUE_CODER_IMPL[] = "IMPULSE_VALUE_CODER_IMPL";
static const char __pyx_k_Incompatible_input_coder[] = "Incompatible input coder ";
static const char __pyx_k_NameContext_logging_name[] = "NameContext.logging_name";
static const char __pyx_k_NameContext_metrics_name[] = "NameContext.metrics_name";
static const char __pyx_k_Receiver___reduce_cython[] = "Receiver.__reduce_cython__";
static const char __pyx_k_current_element_progress[] = "current_element_progress";
static const char __pyx_k_deterministic_key_coders[] = "deterministic_key_coders";
static const char __pyx_k_get_restriction_provider[] = "get_restriction_provider";
static const char __pyx_k_is_unbounded_per_element[] = "is_unbounded_per_element";
static const char __pyx_k_kwargs_for_process_batch[] = "kwargs_for_process_batch";
static const char __pyx_k_per_element_output_count[] = "per-element-output-count";
static const char __pyx_k_pyx_unpickle_DoFnContext[] = "__pyx_unpickle_DoFnContext";
static const char __pyx_k_pyx_unpickle_DoFnInvoker[] = "__pyx_unpickle_DoFnInvoker";
static const char __pyx_k_scoped_metrics_container[] = "scoped_metrics_container";
static const char __pyx_k_validate_stateful_dofn_2[] = "validate_stateful_dofn";
static const char __pyx_k_enter_composite_transform[] = "enter_composite_transform";
static const char __pyx_k_invoke_process_per_window[] = "_invoke_process_per_window";
static const char __pyx_k_restriction_tracker_param[] = "restriction_tracker_param";
static const char __pyx_k_watermark_estimator_state[] = "watermark_estimator_state";
static const char __pyx_k_DoFnInvoker_create_invoker[] = "DoFnInvoker.create_invoker";
static const char __pyx_k_DoFnInvoker_invoke_process[] = "DoFnInvoker.invoke_process";
static const char __pyx_k_DoFnRunner___reduce_cython[] = "DoFnRunner.__reduce_cython__";
static const char __pyx_k_NoContext_existing_windows[] = "_NoContext.existing_windows";
static const char __pyx_k_PerWindowInvoker_try_split[] = "PerWindowInvoker.try_split";
static const char __pyx_k_Receiver___setstate_cython[] = "Receiver.__setstate_cython__";
static const char __pyx_k_WatermarkEstimatorProvider[] = "WatermarkEstimatorProvider";
static const char __pyx_k_apache_beam_runners_common[] = "apache_beam.runners.common";
static const char __pyx_k_apache_beam_utils_counters[] = "apache_beam.utils.counters";
static const char __pyx_k_compute_whole_window_split[] = "compute_whole_window_split";
static const char __pyx_k_create_watermark_estimator[] = "create_watermark_estimator";
static const char __pyx_k_group_by_key_input_visitor[] = "group_by_key_input_visitor";
static const char __pyx_k_invoke_initial_restriction[] = "invoke_initial_restriction";
static const char __pyx_k_per_element_output_counter[] = "per_element_output_counter";
static const char __pyx_k_pyx_unpickle_DoFnSignature[] = "__pyx_unpickle_DoFnSignature";
static const char __pyx_k_pyx_unpickle_MethodWrapper[] = "__pyx_unpickle_MethodWrapper";
static const char __pyx_k_pyx_unpickle_OutputHandler[] = "__pyx_unpickle_OutputHandler";
static const char __pyx_k_pyx_unpickle_SimpleInvoker[] = "__pyx_unpickle_SimpleInvoker";
static const char __pyx_k_DoFnContext___reduce_cython[] = "DoFnContext.__reduce_cython__";
static const char __pyx_k_DoFnInvoker___reduce_cython[] = "DoFnInvoker.__reduce_cython__";
static const char __pyx_k_DoFnInvoker_invoke_teardown[] = "DoFnInvoker.invoke_teardown";
static const char __pyx_k_PerWindowInvoker__try_split[] = "PerWindowInvoker._try_split";
static const char __pyx_k_apache_beam_transforms_core[] = "apache_beam.transforms.core";
static const char __pyx_k_apache_beam_typehints_batch[] = "apache_beam.typehints.batch";
static const char __pyx_k_apache_beam_utils_timestamp[] = "apache_beam.utils.timestamp";
static const char __pyx_k_check_duplicate_dofn_params[] = "_check_duplicate_dofn_params";
static const char __pyx_k_outputs_per_element_counter[] = "outputs_per_element_counter";
static const char __pyx_k_pyx_unpickle__OutputHandler[] = "__pyx_unpickle__OutputHandler";
static const char __pyx_k_DoFnRunner___setstate_cython[] = "DoFnRunner.__setstate_cython__";
static const char __pyx_k_No_timestamp_in_this_context[] = "No timestamp in this context.";
static const char __pyx_k_SimpleInvoker_invoke_process[] = "SimpleInvoker.invoke_process";
static const char __pyx_k_ThreadsafeRestrictionTracker[] = "ThreadsafeRestrictionTracker";
static const char __pyx_k_ThreadsafeWatermarkEstimator[] = "ThreadsafeWatermarkEstimator";
static const char __pyx_k_handle_process_batch_outputs[] = "handle_process_batch_outputs";
static const char __pyx_k_watermark_estimator_provider[] = "watermark_estimator_provider";
static const char __pyx_k_DoFnContext___setstate_cython[] = "DoFnContext.__setstate_cython__";
static const char __pyx_k_DoFnInvoker___setstate_cython[] = "DoFnInvoker.__setstate_cython__";
static const char __pyx_k_DoFnInvoker_invoke_user_timer[] = "DoFnInvoker.invoke_user_timer";
static const char __pyx_k_DoFnRunner__reraise_augmented[] = "DoFnRunner._reraise_augmented";
static const char __pyx_k_DoFnRunner_process_user_timer[] = "DoFnRunner.process_user_timer";
static const char __pyx_k_DoFnSignature___reduce_cython[] = "DoFnSignature.__reduce_cython__";
static const char __pyx_k_MethodWrapper___reduce_cython[] = "MethodWrapper.__reduce_cython__";
static const char __pyx_k_Missing_input_for_transform_s[] = "Missing input for transform: %s";
static const char __pyx_k_OutputHandler___reduce_cython[] = "OutputHandler.__reduce_cython__";
static const char __pyx_k_SimpleInvoker___reduce_cython[] = "SimpleInvoker.__reduce_cython__";
static const char __pyx_k_Unexpected_number_of_inputs_s[] = "Unexpected number of inputs: %s";
static const char __pyx_k_apache_beam_runners_common_py[] = "apache_beam/runners/common.py";
static const char __pyx_k_apache_beam_runners_sdf_utils[] = "apache_beam.runners.sdf_utils";
static const char __pyx_k_apache_beam_transforms_window[] = "apache_beam.transforms.window";
static const char __pyx_k_from_batch_and_windowed_value[] = "from_batch_and_windowed_value";
static const char __pyx_k_process_batch_yields_elements[] = "process_batch_yields_elements";
static const char __pyx_k_pyx_unpickle_PerWindowInvoker[] = "__pyx_unpickle_PerWindowInvoker";
static const char __pyx_k_should_process_window_for_sdf[] = "_should_process_window_for_sdf";
static const char __pyx_k_DoFnSignature_is_stateful_dofn[] = "DoFnSignature.is_stateful_dofn";
static const char __pyx_k_Expected_size_0_but_received_s[] = "Expected size >= 0 but received %s.";
static const char __pyx_k_NoOpWatermarkEstimatorProvider[] = "NoOpWatermarkEstimatorProvider";
static const char __pyx_k_Unexpected_number_of_outputs_s[] = "Unexpected number of outputs: %s";
static const char __pyx_k_from_DoFn_that_was_expected_to[] = " from DoFn that was expected to produce a batch.";
static const char __pyx_k_obj_to_invoke_has_to_be_either[] = "'obj_to_invoke' has to be either a 'DoFn' or a 'RestrictionProvider'. Received %r instead.";
static const char __pyx_k_process_with_sized_restriction[] = "process_with_sized_restriction";
static const char __pyx_k_threadsafe_restriction_tracker[] = "threadsafe_restriction_tracker";
static const char __pyx_k_try_split_locals_compute_whole[] = "_try_split.<locals>.compute_whole_window_split";
static const char __pyx_k_DoFnInvoker_invoke_start_bundle[] = "DoFnInvoker.invoke_start_bundle";
static const char __pyx_k_DoFnSignature___setstate_cython[] = "DoFnSignature.__setstate_cython__";
static const char __pyx_k_DoFnSignature__validate_process[] = "DoFnSignature._validate_process";
static const char __pyx_k_MethodWrapper___setstate_cython[] = "MethodWrapper.__setstate_cython__";
static const char __pyx_k_OutputHandler___reduce_cython_2[] = "_OutputHandler.__reduce_cython__";
static const char __pyx_k_OutputHandler___setstate_cython[] = "OutputHandler.__setstate_cython__";
static const char __pyx_k_OutputHandler_finish_bundle_out[] = "_OutputHandler.finish_bundle_outputs";
static const char __pyx_k_OutputHandler_handle_process_ba[] = "_OutputHandler.handle_process_batch_outputs";
static const char __pyx_k_OutputHandler_handle_process_ou[] = "_OutputHandler.handle_process_outputs";
static const char __pyx_k_OutputHandler_start_bundle_outp[] = "_OutputHandler.start_bundle_outputs";
static const char __pyx_k_PerWindowInvoker_invoke_process[] = "PerWindowInvoker.invoke_process";
static const char __pyx_k_Per_key_DoFn_params_are_not_yet[] = ". Per-key DoFn params are not yet supported for process_batch (https://github.com/apache/beam/issues/21653).";
static const char __pyx_k_SimpleInvoker___setstate_cython[] = "SimpleInvoker.__setstate_cython__";
static const char __pyx_k_get_arg_placeholders_locals_Arg[] = "_get_arg_placeholders.<locals>.ArgPlaceholder";
static const char __pyx_k_get_arg_placeholders_locals_gen[] = "_get_arg_placeholders.<locals>.genexpr";
static const char __pyx_k_has_unsupported_per_key_DoFn_pa[] = " has unsupported per-key DoFn param ";
static const char __pyx_k_has_unsupported_process_batch_m[] = " has unsupported process_batch method parameter ";
static const char __pyx_k_invoke_process_batch_per_window[] = "_invoke_process_batch_per_window";
static const char __pyx_k_uses_unsupported_DoFn_param_Ele[] = " uses unsupported DoFn param ElementParam.";
static const char __pyx_k_A_visitor_that_replaces_Any_elem[] = "A visitor that replaces `Any` element type for input `PCollection` of\n    a `GroupByKey` with a `KV` type.\n\n    TODO(BEAM-115): Once Python SDK is compatible with the new Runner API,\n    we could directly replace the coder instead of mutating the element type.\n    ";
static const char __pyx_k_An_uninspectable_WindowFn_Assign[] = "An uninspectable WindowFn.AssignContext.";
static const char __pyx_k_BatchingPreference_requires_batc[] = "BatchingPreference.requires_batches";
static const char __pyx_k_BatchingPreference_supports_batc[] = "BatchingPreference.supports_batches";
static const char __pyx_k_BatchingPreference_supports_elem[] = "BatchingPreference.supports_elements";
static const char __pyx_k_DoFnInvoker_invoke_create_tracke[] = "DoFnInvoker.invoke_create_tracker";
static const char __pyx_k_DoFnInvoker_invoke_create_waterm[] = "DoFnInvoker.invoke_create_watermark_estimator";
static const char __pyx_k_DoFnInvoker_invoke_finish_bundle[] = "DoFnInvoker.invoke_finish_bundle";
static const char __pyx_k_DoFnInvoker_invoke_initial_restr[] = "DoFnInvoker.invoke_initial_restriction";
static const char __pyx_k_DoFnInvoker_invoke_process_batch[] = "DoFnInvoker.invoke_process_batch";
static const char __pyx_k_DoFnRunner__invoke_bundle_method[] = "DoFnRunner._invoke_bundle_method";
static const char __pyx_k_DoFnRunner__invoke_lifecycle_met[] = "DoFnRunner._invoke_lifecycle_method";
static const char __pyx_k_DoFnRunner__maybe_sample_excepti[] = "DoFnRunner._maybe_sample_exception";
static const char __pyx_k_DoFnRunner_current_element_progr[] = "DoFnRunner.current_element_progress";
static const char __pyx_k_DoFnRunner_process_with_sized_re[] = "DoFnRunner.process_with_sized_restriction";
static const char __pyx_k_DoFnSignature__check_duplicate_d[] = "DoFnSignature._check_duplicate_dofn_params";
static const char __pyx_k_DoFnSignature__validate_bundle_m[] = "DoFnSignature._validate_bundle_method";
static const char __pyx_k_DoFnSignature__validate_stateful[] = "DoFnSignature._validate_stateful_dofn";
static const char __pyx_k_DoFnSignature_get_restriction_co[] = "DoFnSignature.get_restriction_coder";
static const char __pyx_k_DoFnSignature_get_restriction_pr[] = "DoFnSignature.get_restriction_provider";
static const char __pyx_k_DoFnSignature_get_watermark_esti[] = "DoFnSignature.get_watermark_estimator_provider";
static const char __pyx_k_DoFnSignature_has_bundle_finaliz[] = "DoFnSignature.has_bundle_finalization";
static const char __pyx_k_DoFnSignature_is_splittable_dofn[] = "DoFnSignature.is_splittable_dofn";
static const char __pyx_k_DoFnSignature_is_unbounded_per_e[] = "DoFnSignature.is_unbounded_per_element";
static const char __pyx_k_DoFn_is_splittable_but_DoFn_does[] = "DoFn is splittable but DoFn does not have a RestrictionTrackerParam defined";
static const char __pyx_k_DoFn_process_method_only_paramet[] = "DoFn.process() method-only parameter ";
static const char __pyx_k_Finish_Bundle_should_only_output[] = "Finish Bundle should only output WindowedValue ";
static const char __pyx_k_For_internal_use_only_no_backwar[] = "For internal use only; no backwards-compatibility guarantees.\n\n  Keeps track of state that DoFns want, currently, user counters.\n  ";
static const char __pyx_k_Holds_the_name_information_for_a[] = "Holds the name information for a step.";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] = "Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())";
static const char __pyx_k_Input_value_to_a_stateful_DoFn_o[] = "Input value to a stateful DoFn or KeyParam must be a KV tuple; instead, got '";
static const char __pyx_k_MethodWrapper_invoke_timer_callb[] = "MethodWrapper.invoke_timer_callback";
static const char __pyx_k_Must_provide_context_when_not_us[] = "Must provide context when not using SimpleInvoker";
static const char __pyx_k_No_existing_windows_in_this_cont[] = "No existing_windows in this context.";
static const char __pyx_k_OutputHandler_handle_process_bat[] = "OutputHandler.handle_process_batch_outputs";
static const char __pyx_k_OutputHandler_handle_process_out[] = "OutputHandler.handle_process_outputs";
static const char __pyx_k_PerWindowInvoker___reduce_cython[] = "PerWindowInvoker.__reduce_cython__";
static const char __pyx_k_PerWindowInvoker___setstate_cyth[] = "PerWindowInvoker.__setstate_cython__";
static const char __pyx_k_PerWindowInvoker__invoke_process[] = "PerWindowInvoker._invoke_process_per_window";
static const char __pyx_k_PerWindowInvoker__scale_progress[] = "PerWindowInvoker._scale_progress";
static const char __pyx_k_PerWindowInvoker__should_process[] = "PerWindowInvoker._should_process_window_for_sdf";
static const char __pyx_k_PerWindowInvoker_current_element[] = "PerWindowInvoker.current_element_progress";
static const char __pyx_k_Requested_execution_of_a_statefu[] = "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.";
static const char __pyx_k_SimpleInvoker_invoke_process_bat[] = "SimpleInvoker.invoke_process_batch";
static const char __pyx_k_Start_Bundle_should_not_output_a[] = "Start Bundle should not output any elements but got %s";
static const char __pyx_k_Value_for_sideinput_s_not_provid[] = "Value for sideinput %s not provided";
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_apache_beam_options_value_provid[] = "apache_beam.options.value_provider";
static const char __pyx_k_apache_beam_runners_worker_bundl[] = "apache_beam.runners.worker.bundle_processor";
static const char __pyx_k_apache_beam_utils_windowed_value[] = "apache_beam.utils.windowed_value";
static const char __pyx_k_element_not_accessible_in_this_c[] = "element not accessible in this context";
static const char __pyx_k_get_watermark_estimator_provider[] = "get_watermark_estimator_provider";
static const char __pyx_k_group_by_key_input_visitor_local[] = "group_by_key_input_visitor.<locals>.GroupByKeyInputVisitor";
static const char __pyx_k_https_github_com_apache_beam_iss[] = "https://github.com/apache/beam/issues/21653: Per-key process_batch";
static const char __pyx_k_invoke_create_watermark_estimato[] = "invoke_create_watermark_estimator";
static const char __pyx_k_requires_deterministic_key_coder[] = "requires_deterministic_key_coder";
static const char __pyx_k_timestamp_not_accessible_in_this[] = "timestamp not accessible in this context";
static const char __pyx_k_validate_pipeline_graph_locals_g[] = "validate_pipeline_graph.<locals>.get_coder";
static const char __pyx_k_validate_pipeline_graph_locals_v[] = "validate_pipeline_graph.<locals>.validate_transform";
static const char __pyx_k_windows_not_accessible_in_this_c[] = "windows not accessible in this context";
static const char __pyx_k_DoFnSignature__validate_process_2[] = "DoFnSignature._validate_process_batch";
static const char __pyx_k_OutputHandler___setstate_cython_2[] = "_OutputHandler.__setstate_cython__";
static const char __pyx_k_PerWindowInvoker_invoke_process_2[] = "PerWindowInvoker.invoke_process_batch";
static const char __pyx_k_get_arg_placeholders_locals_Arg_2[] = "_get_arg_placeholders.<locals>.ArgPlaceholder.__init__";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_2[] = "Incompatible checksums (0x%x vs (0xed3c1c6, 0x49bc0f9, 0xc8b0c72) = (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_Incompatible_checksums_0x_x_vs_0_3[] = "Incompatible checksums (0x%x vs (0x87afe8e, 0x8b80bb7, 0xe7c08a8) = (_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_Incompatible_checksums_0x_x_vs_0_4[] = "Incompatible checksums (0x%x vs (0x24f2bc5, 0x09ba3a5, 0x838897a) = (bundle_finalizer_param, output_handler, signature, user_state_context))";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_5[] = "Incompatible checksums (0x%x vs (0x7bd7f82, 0x157f725, 0x3b947d9) = (bundle_finalizer_param, output_handler, process_batch_method, process_method, signature, user_state_context))";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_6[] = "Incompatible checksums (0x%x vs (0xb7d4fae, 0xcfd00ef, 0xf533ced) = (args_for_process, args_for_process_batch, bundle_finalizer_param, cache_globally_windowed_args, context, current_window_index, current_windowed_value, 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, restriction, side_inputs, signature, splitting_lock, stop_window_index, threadsafe_restriction_tracker, threadsafe_watermark_estimator, user_state_context, watermark_estimator_state))";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_7[] = "Incompatible checksums (0x%x vs (0x503639a, 0x177d0a4, 0x8a5d4de) = (bundle_finalizer_param, context, do_fn_invoker, execution_context, side_inputs, step_name, transform_id))";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_8[] = "Incompatible checksums (0x%x vs (0xca1400f, 0xa5be297, 0x46a3542) = (_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_Incompatible_checksums_0x_x_vs_0_9[] = "Incompatible checksums (0x%x vs (0x1b535c7, 0x3a8e3cf, 0xba3ce3b) = (label, state, windowed_value))";
static const char __pyx_k_PerWindowInvoker__invoke_process_2[] = "PerWindowInvoker._invoke_process_batch_per_window";
static const char __pyx_k_group_by_key_input_visitor_local_2[] = "group_by_key_input_visitor.<locals>.GroupByKeyInputVisitor.__init__";
static const char __pyx_k_group_by_key_input_visitor_local_3[] = "group_by_key_input_visitor.<locals>.GroupByKeyInputVisitor.enter_composite_transform";
static const char __pyx_k_group_by_key_input_visitor_local_4[] = "group_by_key_input_visitor.<locals>.GroupByKeyInputVisitor.visit_transform";
static PyObject *__pyx_n_s_ASSIGN_WINDOWS;
static PyObject *__pyx_kp_s_A_visitor_that_replaces_Any_elem;
static PyObject *__pyx_kp_s_An_uninspectable_WindowFn_Assign;
static PyObject *__pyx_n_s_Any;
static PyObject *__pyx_n_s_ArgPlaceholder;
static PyObject *__pyx_n_s_AssignContext;
static PyObject *__pyx_n_s_AttributeError;
static PyObject *__pyx_n_s_BATCH_FORBIDDEN;
static PyObject *__pyx_n_s_BATCH_REQUIRED;
static PyObject *__pyx_kp_u_Bad_coder_for_input_of;
static PyObject *__pyx_kp_u_Bad_coder_for_output_of;
static PyObject *__pyx_n_s_BaseException;
static PyObject *__pyx_n_s_BatchConverter;
static PyObject *__pyx_n_s_BatchingPreference;
static PyObject *__pyx_n_s_BatchingPreference_requires_batc;
static PyObject *__pyx_n_s_BatchingPreference_supports_batc;
static PyObject *__pyx_n_s_BatchingPreference_supports_elem;
static PyObject *__pyx_n_s_BundleFinalizerParam;
static PyObject *__pyx_n_s_BytesCoder;
static PyObject *__pyx_n_s_Counter;
static PyObject *__pyx_n_s_CounterName;
static PyObject *__pyx_n_s_DATAFLOW_DISTRIBUTION;
static PyObject *__pyx_n_s_DO_NOT_CARE;
static PyObject *__pyx_n_s_Dict;
static PyObject *__pyx_n_s_DoFn;
static PyObject *__pyx_n_s_DoFnContext;
static PyObject *__pyx_n_s_DoFnContext___reduce_cython;
static PyObject *__pyx_n_s_DoFnContext___setstate_cython;
static PyObject *__pyx_n_s_DoFnContext_set_element;
static PyObject *__pyx_n_s_DoFnInvoker;
static PyObject *__pyx_n_s_DoFnInvoker___reduce_cython;
static PyObject *__pyx_n_s_DoFnInvoker___setstate_cython;
static PyObject *__pyx_n_s_DoFnInvoker_create_invoker;
static PyObject *__pyx_n_s_DoFnInvoker_invoke_create_tracke;
static PyObject *__pyx_n_s_DoFnInvoker_invoke_create_waterm;
static PyObject *__pyx_n_s_DoFnInvoker_invoke_finish_bundle;
static PyObject *__pyx_n_s_DoFnInvoker_invoke_initial_restr;
static PyObject *__pyx_n_s_DoFnInvoker_invoke_process;
static PyObject *__pyx_n_s_DoFnInvoker_invoke_process_batch;
static PyObject *__pyx_n_s_DoFnInvoker_invoke_setup;
static PyObject *__pyx_n_s_DoFnInvoker_invoke_split;
static PyObject *__pyx_n_s_DoFnInvoker_invoke_start_bundle;
static PyObject *__pyx_n_s_DoFnInvoker_invoke_teardown;
static PyObject *__pyx_n_s_DoFnInvoker_invoke_user_timer;
static PyObject *__pyx_n_s_DoFnParam;
static PyObject *__pyx_n_s_DoFnProcessParams;
static PyObject *__pyx_n_s_DoFnRunner;
static PyObject *__pyx_n_s_DoFnRunner___reduce_cython;
static PyObject *__pyx_n_s_DoFnRunner___setstate_cython;
static PyObject *__pyx_n_s_DoFnRunner__invoke_bundle_method;
static PyObject *__pyx_n_s_DoFnRunner__invoke_lifecycle_met;
static PyObject *__pyx_n_s_DoFnRunner__maybe_sample_excepti;
static PyObject *__pyx_n_s_DoFnRunner__reraise_augmented;
static PyObject *__pyx_n_s_DoFnRunner_current_element_progr;
static PyObject *__pyx_n_s_DoFnRunner_finalize;
static PyObject *__pyx_n_s_DoFnRunner_finish;
static PyObject *__pyx_n_s_DoFnRunner_process;
static PyObject *__pyx_n_s_DoFnRunner_process_batch;
static PyObject *__pyx_n_s_DoFnRunner_process_user_timer;
static PyObject *__pyx_n_s_DoFnRunner_process_with_sized_re;
static PyObject *__pyx_n_s_DoFnRunner_setup;
static PyObject *__pyx_n_s_DoFnRunner_start;
static PyObject *__pyx_n_s_DoFnRunner_teardown;
static PyObject *__pyx_n_s_DoFnRunner_try_split;
static PyObject *__pyx_n_s_DoFnSignature;
static PyObject *__pyx_n_s_DoFnSignature___reduce_cython;
static PyObject *__pyx_n_s_DoFnSignature___setstate_cython;
static PyObject *__pyx_n_s_DoFnSignature__check_duplicate_d;
static PyObject *__pyx_n_s_DoFnSignature__validate;
static PyObject *__pyx_n_s_DoFnSignature__validate_bundle_m;
static PyObject *__pyx_n_s_DoFnSignature__validate_process;
static PyObject *__pyx_n_s_DoFnSignature__validate_process_2;
static PyObject *__pyx_n_s_DoFnSignature__validate_stateful;
static PyObject *__pyx_n_s_DoFnSignature_get_restriction_co;
static PyObject *__pyx_n_s_DoFnSignature_get_restriction_pr;
static PyObject *__pyx_n_s_DoFnSignature_get_watermark_esti;
static PyObject *__pyx_n_s_DoFnSignature_has_bundle_finaliz;
static PyObject *__pyx_n_s_DoFnSignature_has_timers;
static PyObject *__pyx_n_s_DoFnSignature_is_splittable_dofn;
static PyObject *__pyx_n_s_DoFnSignature_is_stateful_dofn;
static PyObject *__pyx_n_s_DoFnSignature_is_unbounded_per_e;
static PyObject *__pyx_n_s_DoFnState;
static PyObject *__pyx_n_s_DoFnState___init;
static PyObject *__pyx_n_s_DoFnState_counter_for;
static PyObject *__pyx_kp_u_DoFn_2;
static PyObject *__pyx_kp_u_DoFn_is_splittable_but_DoFn_does;
static PyObject *__pyx_kp_u_DoFn_process_method_only_paramet;
static PyObject *__pyx_n_s_DynamicTimerTagParam;
static PyObject *__pyx_n_s_ENCODED_IMPULSE_VALUE;
static PyObject *__pyx_n_s_ElementParam;
static PyObject *__pyx_n_s_Enum;
static PyObject *__pyx_n_s_ExecutionContext;
static PyObject *__pyx_kp_u_Expected_size_0_but_received_s;
static PyObject *__pyx_kp_u_Finish_Bundle_should_only_output;
static PyObject *__pyx_kp_s_For_internal_use_only_no_backwar;
static PyObject *__pyx_n_s_GROUP_BY_KEY;
static PyObject *__pyx_n_s_GlobalWindow;
static PyObject *__pyx_n_s_GlobalWindowCoder;
static PyObject *__pyx_n_s_GlobalWindows;
static PyObject *__pyx_n_s_GroupByKey;
static PyObject *__pyx_n_s_GroupByKeyInputVisitor;
static PyObject *__pyx_kp_s_Holds_the_name_information_for_a;
static PyObject *__pyx_n_s_HomogeneousWindowedBatch;
static PyObject *__pyx_n_s_IMPULSE_VALUE_CODER_IMPL;
static PyObject *__pyx_n_s_ITERABLE;
static PyObject *__pyx_kp_u_In;
static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0;
static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2;
static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3;
static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_4;
static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_5;
static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_6;
static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_7;
static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_8;
static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_9;
static PyObject *__pyx_kp_u_Incompatible_input_coder;
static PyObject *__pyx_kp_u_Input_value_to_a_stateful_DoFn_o;
static PyObject *__pyx_n_s_Iterable;
static PyObject *__pyx_n_s_KV;
static PyObject *__pyx_n_s_KeyParam;
static PyObject *__pyx_n_s_LOGGER;
static PyObject *__pyx_n_s_List;
static PyObject *__pyx_n_s_Lock;
static PyObject *__pyx_n_s_Mapping;
static PyObject *__pyx_n_s_MethodWrapper;
static PyObject *__pyx_n_u_MethodWrapper;
static PyObject *__pyx_n_s_MethodWrapper___reduce_cython;
static PyObject *__pyx_n_s_MethodWrapper___setstate_cython;
static PyObject *__pyx_n_s_MethodWrapper_invoke_timer_callb;
static PyObject *__pyx_kp_u_Missing_input_for_transform_s;
static PyObject *__pyx_kp_u_Must_provide_context_when_not_us;
static PyObject *__pyx_n_s_NO_VALUE;
static PyObject *__pyx_n_s_NameContext;
static PyObject *__pyx_n_s_NameContext___eq;
static PyObject *__pyx_n_s_NameContext___hash;
static PyObject *__pyx_n_s_NameContext___init;
static PyObject *__pyx_n_s_NameContext___repr;
static PyObject *__pyx_n_s_NameContext_logging_name;
static PyObject *__pyx_n_s_NameContext_metrics_name;
static PyObject *__pyx_kp_u_NameContext_s;
static PyObject *__pyx_n_s_NoContext;
static PyObject *__pyx_n_s_NoContext___init;
static PyObject *__pyx_n_s_NoContext_existing_windows;
static PyObject *__pyx_n_s_NoContext_timestamp;
static PyObject *__pyx_n_s_NoOpWatermarkEstimatorProvider;
static PyObject *__pyx_kp_u_No_existing_windows_in_this_cont;
static PyObject *__pyx_kp_u_No_timestamp_in_this_context;
static PyObject *__pyx_n_s_NotImplementedError;
static PyObject *__pyx_n_s_Optional;
static PyObject *__pyx_n_s_OutputHandler;
static PyObject *__pyx_n_s_OutputHandler_2;
static PyObject *__pyx_n_s_OutputHandler___reduce_cython;
static PyObject *__pyx_n_s_OutputHandler___reduce_cython_2;
static PyObject *__pyx_n_s_OutputHandler___setstate_cython;
static PyObject *__pyx_n_s_OutputHandler___setstate_cython_2;
static PyObject *__pyx_n_s_OutputHandler_finish_bundle_out;
static PyObject *__pyx_n_s_OutputHandler_handle_process_ba;
static PyObject *__pyx_n_s_OutputHandler_handle_process_bat;
static PyObject *__pyx_n_s_OutputHandler_handle_process_ou;
static PyObject *__pyx_n_s_OutputHandler_handle_process_out;
static PyObject *__pyx_n_s_OutputHandler_start_bundle_outp;
static PyObject *__pyx_n_s_PAR_DO;
static PyObject *__pyx_n_s_PaneInfoParam;
static PyObject *__pyx_n_s_PerWindowInvoker;
static PyObject *__pyx_n_s_PerWindowInvoker___reduce_cython;
static PyObject *__pyx_n_s_PerWindowInvoker___setstate_cyth;
static PyObject *__pyx_n_s_PerWindowInvoker__invoke_process;
static PyObject *__pyx_n_s_PerWindowInvoker__invoke_process_2;
static PyObject *__pyx_n_s_PerWindowInvoker__scale_progress;
static PyObject *__pyx_n_s_PerWindowInvoker__should_process;
static PyObject *__pyx_n_s_PerWindowInvoker__try_split;
static PyObject *__pyx_n_s_PerWindowInvoker_current_element;
static PyObject *__pyx_n_s_PerWindowInvoker_invoke_process;
static PyObject *__pyx_n_s_PerWindowInvoker_invoke_process_2;
static PyObject *__pyx_n_s_PerWindowInvoker_try_split;
static PyObject *__pyx_kp_u_Per_key_DoFn_params_are_not_yet;
static PyObject *__pyx_n_s_PickleError;
static PyObject *__pyx_n_s_PipelineVisitor;
static PyObject *__pyx_kp_u_Received;
static PyObject *__pyx_n_s_Receiver;
static PyObject *__pyx_n_s_ReceiverAdapter;
static PyObject *__pyx_n_s_Receiver___reduce_cython;
static PyObject *__pyx_n_s_Receiver___setstate_cython;
static PyObject *__pyx_n_s_Receiver_flush;
static PyObject *__pyx_n_s_Receiver_receive;
static PyObject *__pyx_n_s_Receiver_receive_batch;
static PyObject *__pyx_kp_u_Requested_execution_of_a_statefu;
static PyObject *__pyx_n_s_RestrictionParam;
static PyObject *__pyx_n_s_RestrictionProgress;
static PyObject *__pyx_n_s_RestrictionProvider;
static PyObject *__pyx_n_s_RestrictionTracker;
static PyObject *__pyx_n_s_RestrictionTrackerView;
static PyObject *__pyx_n_s_RuntimeError;
static PyObject *__pyx_n_s_RuntimeValueProvider;
static PyObject *__pyx_n_s_SideInputParam;
static PyObject *__pyx_n_s_SimpleInvoker;
static PyObject *__pyx_n_s_SimpleInvoker___reduce_cython;
static PyObject *__pyx_n_s_SimpleInvoker___setstate_cython;
static PyObject *__pyx_n_s_SimpleInvoker_invoke_process;
static PyObject *__pyx_n_s_SimpleInvoker_invoke_process_bat;
static PyObject *__pyx_n_s_SplitResultPrimary;
static PyObject *__pyx_n_s_SplitResultResidual;
static PyObject *__pyx_kp_u_Start_Bundle_should_not_output_a;
static PyObject *__pyx_n_s_StateParam;
static PyObject *__pyx_n_s_StopIteration;
static PyObject *__pyx_n_s_TYPE_CHECKING;
static PyObject *__pyx_n_s_TaggedOutput;
static PyObject *__pyx_n_s_ThreadsafeRestrictionTracker;
static PyObject *__pyx_n_s_ThreadsafeWatermarkEstimator;
static PyObject *__pyx_n_s_TimerParam;
static PyObject *__pyx_n_s_TimerSpec;
static PyObject *__pyx_n_s_Timestamp;
static PyObject *__pyx_n_s_TimestampParam;
static PyObject *__pyx_n_s_TimestampedValue;
static PyObject *__pyx_n_s_Tuple;
static PyObject *__pyx_n_s_TupleCoder;
static PyObject *__pyx_n_s_TypeError;
static PyObject *__pyx_kp_u_Unexpected_number_of_inputs_s;
static PyObject *__pyx_kp_u_Unexpected_number_of_outputs_s;
static PyObject *__pyx_n_s_ValueError;
static PyObject *__pyx_kp_u_Value_for_sideinput_s_not_provid;
static PyObject *__pyx_n_s_WatermarkEstimator;
static PyObject *__pyx_n_s_WatermarkEstimatorParam;
static PyObject *__pyx_n_s_WatermarkEstimatorProvider;
static PyObject *__pyx_n_s_WindowFn;
static PyObject *__pyx_n_s_WindowParam;
static PyObject *__pyx_n_s_WindowedBatch;
static PyObject *__pyx_n_u_WindowedBatch;
static PyObject *__pyx_n_s_WindowedValue;
static PyObject *__pyx_n_s_WindowedValueCoder;
static PyObject *__pyx_kp_b__111;
static PyObject *__pyx_kp_u__111;
static PyObject *__pyx_kp_u__127;
static PyObject *__pyx_n_s__184;
static PyObject *__pyx_kp_u__23;
static PyObject *__pyx_kp_u__64;
static PyObject *__pyx_n_s_a;
static PyObject *__pyx_n_s_accumulator;
static PyObject *__pyx_n_s_additional_args;
static PyObject *__pyx_n_s_additional_kwargs;
static PyObject *__pyx_n_s_aggregator;
static PyObject *__pyx_n_s_all_timer_specs;
static PyObject *__pyx_kp_u_and_output_coder;
static PyObject *__pyx_n_s_any;
static PyObject *__pyx_n_s_apache_beam_coders;
static PyObject *__pyx_n_s_apache_beam_internal;
static PyObject *__pyx_n_s_apache_beam_io_iobase;
static PyObject *__pyx_n_s_apache_beam_iobase;
static PyObject *__pyx_n_s_apache_beam_options_value_provid;
static PyObject *__pyx_n_s_apache_beam_pipeline;
static PyObject *__pyx_n_s_apache_beam_portability;
static PyObject *__pyx_n_s_apache_beam_pvalue;
static PyObject *__pyx_n_s_apache_beam_runners_common;
static PyObject *__pyx_kp_s_apache_beam_runners_common_py;
static PyObject *__pyx_n_s_apache_beam_runners_sdf_utils;
static PyObject *__pyx_n_s_apache_beam_runners_worker_bundl;
static PyObject *__pyx_n_s_apache_beam_transforms;
static PyObject *__pyx_n_s_apache_beam_transforms_core;
static PyObject *__pyx_n_s_apache_beam_transforms_window;
static PyObject *__pyx_n_s_apache_beam_typehints;
static PyObject *__pyx_n_s_apache_beam_typehints_batch;
static PyObject *__pyx_n_s_apache_beam_utils_counters;
static PyObject *__pyx_n_s_apache_beam_utils_timestamp;
static PyObject *__pyx_n_s_apache_beam_utils_windowed_value;
static PyObject *__pyx_n_s_append;
static PyObject *__pyx_n_s_arg_names;
static PyObject *__pyx_n_s_args;
static PyObject *__pyx_n_s_args_for_process;
static PyObject *__pyx_n_s_args_for_process_batch;
static PyObject *__pyx_n_s_args_to_pick;
static PyObject *__pyx_n_s_args_with_placeholders;
static PyObject *__pyx_n_s_as_empty_windowed_value;
static PyObject *__pyx_n_s_assign;
static PyObject *__pyx_n_s_attached_callback;
static PyObject *__pyx_n_s_batch;
static PyObject *__pyx_n_u_beam_yields_batches;
static PyObject *__pyx_n_u_beam_yields_elements;
static PyObject *__pyx_n_s_bundle_finalizer_param;
static PyObject *__pyx_n_s_bundle_method;
static PyObject *__pyx_kp_u_cannot_be_used_in;
static PyObject *__pyx_n_s_check_done;
static PyObject *__pyx_n_s_check_duplicate_dofn_params;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_close;
static PyObject *__pyx_n_s_coder_id;
static PyObject *__pyx_n_s_coders;
static PyObject *__pyx_n_s_coerce_to_kv_type;
static PyObject *__pyx_n_s_common_urns;
static PyObject *__pyx_n_s_completed;
static PyObject *__pyx_n_s_completed_work;
static PyObject *__pyx_n_s_component_coder_ids;
static PyObject *__pyx_n_s_components;
static PyObject *__pyx_n_s_compute_whole_window_split;
static PyObject *__pyx_n_s_context;
static PyObject *__pyx_n_s_core;
static PyObject *__pyx_n_s_counter_factory;
static PyObject *__pyx_n_s_counter_factory_2;
static PyObject *__pyx_n_s_counter_for;
static PyObject *__pyx_n_s_create_invoker;
static PyObject *__pyx_n_u_create_tracker;
static PyObject *__pyx_n_u_create_watermark_estimator;
static PyObject *__pyx_n_s_current_element_progress;
static PyObject *__pyx_n_s_current_estimator_state;
static PyObject *__pyx_n_s_current_progress;
static PyObject *__pyx_n_s_current_watermark;
static PyObject *__pyx_n_s_current_window_index;
static PyObject *__pyx_n_s_d;
static PyObject *__pyx_n_s_default_arg_values;
static PyObject *__pyx_n_s_defaults;
static PyObject *__pyx_n_s_deferred_restriction;
static PyObject *__pyx_n_s_deferred_status;
static PyObject *__pyx_n_s_deferred_timestamp;
static PyObject *__pyx_n_s_deterministic_key_coders;
static PyObject *__pyx_n_s_dict;
static PyObject *__pyx_n_s_dict_2;
static PyObject *__pyx_n_s_do_fn;
static PyObject *__pyx_n_s_doc;
static PyObject *__pyx_n_s_dynamic_timer_tag;
static PyObject *__pyx_n_s_element;
static PyObject *__pyx_kp_u_element_not_accessible_in_this_c;
static PyObject *__pyx_n_s_element_type;
static PyObject *__pyx_n_s_encode_nested;
static PyObject *__pyx_n_s_enter;
static PyObject *__pyx_n_s_enter_composite_transform;
static PyObject *__pyx_n_s_enum;
static PyObject *__pyx_n_s_enumerate;
static PyObject *__pyx_n_s_eq;
static PyObject *__pyx_n_s_estimator_state;
static PyObject *__pyx_n_s_estimator_state_coder;
static PyObject *__pyx_n_s_exc_info;
static PyObject *__pyx_n_s_exception;
static PyObject *__pyx_n_s_existing_windows;
static PyObject *__pyx_n_s_exit;
static PyObject *__pyx_n_s_exn;
static PyObject *__pyx_n_s_experiments;
static PyObject *__pyx_n_s_extend;
static PyObject *__pyx_n_s_finalize;
static PyObject *__pyx_n_s_finalize_bundle;
static PyObject *__pyx_n_s_finish;
static PyObject *__pyx_n_u_finish_bundle;
static PyObject *__pyx_n_s_finish_bundle_outputs;
static PyObject *__pyx_n_s_flush;
static PyObject *__pyx_n_s_fn;
static PyObject *__pyx_kp_u_for_transform;
static PyObject *__pyx_n_s_format_exception_only;
static PyObject *__pyx_n_s_fraction;
static PyObject *__pyx_n_s_fraction_of_remainder;
static PyObject *__pyx_kp_u_from_DoFn_that_was_expected_to;
static PyObject *__pyx_n_s_from_batch_and_windowed_value;
static PyObject *__pyx_n_s_from_index;
static PyObject *__pyx_n_s_full_label;
static PyObject *__pyx_n_s_genexpr;
static PyObject *__pyx_n_s_getLogger;
static PyObject *__pyx_n_s_get_aggregator_counter;
static PyObject *__pyx_n_s_get_arg_placeholders;
static PyObject *__pyx_n_s_get_arg_placeholders_locals_Arg;
static PyObject *__pyx_n_s_get_arg_placeholders_locals_Arg_2;
static PyObject *__pyx_n_s_get_arg_placeholders_locals_gen;
static PyObject *__pyx_n_s_get_coder;
static PyObject *__pyx_n_s_get_counter;
static PyObject *__pyx_n_s_get_dofn_specs;
static PyObject *__pyx_n_s_get_estimator_state;
static PyObject *__pyx_n_s_get_function_arguments;
static PyObject *__pyx_n_s_get_impl;
static PyObject *__pyx_n_s_get_length;
static PyObject *__pyx_n_s_get_restriction_coder;
static PyObject *__pyx_n_s_get_restriction_provider;
static PyObject *__pyx_n_s_get_state;
static PyObject *__pyx_n_s_get_timer;
static PyObject *__pyx_n_s_get_watermark_estimator_provider;
static PyObject *__pyx_n_s_getstate;
static PyObject *__pyx_n_s_global_window;
static PyObject *__pyx_n_s_group_by_key_input_visitor;
static PyObject *__pyx_n_s_group_by_key_input_visitor_local;
static PyObject *__pyx_n_s_group_by_key_input_visitor_local_2;
static PyObject *__pyx_n_s_group_by_key_input_visitor_local_3;
static PyObject *__pyx_n_s_group_by_key_input_visitor_local_4;
static PyObject *__pyx_n_s_handle_process_batch_outputs;
static PyObject *__pyx_n_s_handle_process_outputs;
static PyObject *__pyx_n_s_has_bundle_finalization;
static PyObject *__pyx_kp_u_has_duplicate;
static PyObject *__pyx_n_s_has_timers;
static PyObject *__pyx_kp_u_has_unsupported_per_key_DoFn_pa;
static PyObject *__pyx_kp_u_has_unsupported_process_batch_m;
static PyObject *__pyx_n_s_hash;
static PyObject *__pyx_kp_u_https_github_com_apache_beam_iss;
static PyObject *__pyx_n_s_i;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_init;
static PyObject *__pyx_n_s_init___locals_genexpr;
static PyObject *__pyx_n_u_initial_restriction;
static PyObject *__pyx_n_s_input_args;
static PyObject *__pyx_n_s_input_coder;
static PyObject *__pyx_n_s_input_kwargs;
static PyObject *__pyx_n_s_inputs;
static PyObject *__pyx_n_s_insert_values_in_args;
static PyObject *__pyx_n_s_instruction_id;
static PyObject *__pyx_n_s_invoke_bundle_method;
static PyObject *__pyx_n_s_invoke_create_tracker;
static PyObject *__pyx_n_s_invoke_create_watermark_estimato;
static PyObject *__pyx_n_s_invoke_finish_bundle;
static PyObject *__pyx_n_s_invoke_initial_restriction;
static PyObject *__pyx_n_s_invoke_lifecycle_method;
static PyObject *__pyx_n_s_invoke_process;
static PyObject *__pyx_n_s_invoke_process_batch;
static PyObject *__pyx_n_s_invoke_process_batch_per_window;
static PyObject *__pyx_n_s_invoke_process_per_window;
static PyObject *__pyx_n_s_invoke_setup;
static PyObject *__pyx_n_s_invoke_split;
static PyObject *__pyx_n_s_invoke_start_bundle;
static PyObject *__pyx_n_s_invoke_teardown;
static PyObject *__pyx_n_s_invoke_timer_callback;
static PyObject *__pyx_n_s_invoke_user_timer;
static PyObject *__pyx_n_s_is_cythonized;
static PyObject *__pyx_n_s_is_globally_windowed;
static PyObject *__pyx_kp_u_is_not_a_string;
static PyObject *__pyx_n_s_is_splittable_dofn;
static PyObject *__pyx_n_s_is_stateful_dofn;
static PyObject *__pyx_n_s_is_unbounded_per_element;
static PyObject *__pyx_n_s_items;
static PyObject *__pyx_n_s_key;
static PyObject *__pyx_n_s_key_type;
static PyObject *__pyx_n_s_keys;
static PyObject *__pyx_n_s_kw;
static PyObject *__pyx_n_s_kwargs;
static PyObject *__pyx_n_s_kwargs_for_process;
static PyObject *__pyx_n_s_kwargs_for_process_batch;
static PyObject *__pyx_n_s_label;
static PyObject *__pyx_n_s_lifecycle_method;
static PyObject *__pyx_n_s_logging;
static PyObject *__pyx_n_s_logging_context;
static PyObject *__pyx_n_s_logging_name;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_main_receivers;
static PyObject *__pyx_n_s_maybe_sample_exception;
static PyObject *__pyx_n_s_metaclass;
static PyObject *__pyx_n_s_method;
static PyObject *__pyx_n_s_method_name;
static PyObject *__pyx_kp_u_method_parameters;
static PyObject *__pyx_n_s_method_value;
static PyObject *__pyx_n_s_method_wrapper;
static PyObject *__pyx_n_s_metrics_name;
static PyObject *__pyx_n_s_module;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_new;
static PyObject *__pyx_n_s_new_exn;
static PyObject *__pyx_n_s_new_stop_window_index;
static PyObject *__pyx_n_s_obj_to_invoke;
static PyObject *__pyx_kp_u_obj_to_invoke_has_to_be_either;
static PyObject *__pyx_n_s_object;
static PyObject *__pyx_n_s_observe_timestamp;
static PyObject *__pyx_n_s_of;
static PyObject *__pyx_n_s_operation_name;
static PyObject *__pyx_n_s_other;
static PyObject *__pyx_n_s_output_batch_converter;
static PyObject *__pyx_n_u_output_batch_converter;
static PyObject *__pyx_n_s_output_coder;
static PyObject *__pyx_n_s_output_handler;
static PyObject *__pyx_n_s_output_sampler;
static PyObject *__pyx_n_s_output_values_coder;
static PyObject *__pyx_n_s_outputs;
static PyObject *__pyx_n_u_outputs_per_element_counter;
static PyObject *__pyx_n_s_p;
static PyObject *__pyx_n_s_pane_info;
static PyObject *__pyx_n_s_param;
static PyObject *__pyx_n_s_param_id;
static PyObject *__pyx_n_s_param_ids;
static PyObject *__pyx_n_s_pcoll;
static PyObject *__pyx_n_s_pcoll_id;
static PyObject *__pyx_n_s_pcollections;
static PyObject *__pyx_kp_u_per_element_output_count;
static PyObject *__pyx_n_s_per_element_output_counter;
static PyObject *__pyx_n_s_pickle;
static PyObject *__pyx_n_s_pipeline_proto;
static PyObject *__pyx_n_s_placeholder;
static PyObject *__pyx_n_s_placeholders;
static PyObject *__pyx_n_s_prepare;
static PyObject *__pyx_n_s_primaries;
static PyObject *__pyx_n_s_primary;
static PyObject *__pyx_n_s_primary_restriction;
static PyObject *__pyx_n_s_primary_restrictions;
static PyObject *__pyx_n_s_primary_size;
static PyObject *__pyx_n_s_primary_split_value;
static PyObject *__pyx_n_s_primary_value;
static PyObject *__pyx_n_s_primitives;
static PyObject *__pyx_n_s_process;
static PyObject *__pyx_n_u_process;
static PyObject *__pyx_n_s_process_batch;
static PyObject *__pyx_n_u_process_batch;
static PyObject *__pyx_n_s_process_batch_method;
static PyObject *__pyx_n_s_process_batch_yields_elements;
static PyObject *__pyx_n_s_process_invocation;
static PyObject *__pyx_n_s_process_method;
static PyObject *__pyx_n_s_process_user_timer;
static PyObject *__pyx_n_s_process_with_sized_restriction;
static PyObject *__pyx_n_s_process_yields_batches;
static PyObject *__pyx_n_s_progress;
static PyObject *__pyx_n_s_property;
static PyObject *__pyx_n_s_pyx_PickleError;
static PyObject *__pyx_n_s_pyx_capi;
static PyObject *__pyx_n_s_pyx_checksum;
static PyObject *__pyx_n_s_pyx_result;
static PyObject *__pyx_n_s_pyx_state;
static PyObject *__pyx_n_s_pyx_type;
static PyObject *__pyx_n_s_pyx_unpickle_DoFnContext;
static PyObject *__pyx_n_s_pyx_unpickle_DoFnInvoker;
static PyObject *__pyx_n_s_pyx_unpickle_DoFnRunner;
static PyObject *__pyx_n_s_pyx_unpickle_DoFnSignature;
static PyObject *__pyx_n_s_pyx_unpickle_MethodWrapper;
static PyObject *__pyx_n_s_pyx_unpickle_OutputHandler;
static PyObject *__pyx_n_s_pyx_unpickle_PerWindowInvoker;
static PyObject *__pyx_n_s_pyx_unpickle_Receiver;
static PyObject *__pyx_n_s_pyx_unpickle_SimpleInvoker;
static PyObject *__pyx_n_s_pyx_unpickle__OutputHandler;
static PyObject *__pyx_n_s_pyx_vtable;
static PyObject *__pyx_n_s_qualname;
static PyObject *__pyx_n_s_receive;
static PyObject *__pyx_n_s_receive_batch;
static PyObject *__pyx_n_s_reduce;
static PyObject *__pyx_n_s_reduce_cython;
static PyObject *__pyx_n_s_reduce_ex;
static PyObject *__pyx_n_s_remaining;
static PyObject *__pyx_n_s_remaining_args_iter;
static PyObject *__pyx_n_s_remaining_work;
static PyObject *__pyx_n_s_repr;
static PyObject *__pyx_n_s_requires_batches;
static PyObject *__pyx_n_s_requires_deterministic_key_coder;
static PyObject *__pyx_n_s_reraise_augmented;
static PyObject *__pyx_n_s_residual;
static PyObject *__pyx_n_s_residual_restriction;
static PyObject *__pyx_n_s_residual_restrictions;
static PyObject *__pyx_n_s_residual_size;
static PyObject *__pyx_n_s_residual_split_value;
static PyObject *__pyx_n_s_residual_value;
static PyObject *__pyx_n_s_residuals;
static PyObject *__pyx_n_s_restriction;
static PyObject *__pyx_n_s_restriction_coder;
static PyObject *__pyx_n_s_restriction_provider;
static PyObject *__pyx_n_s_restriction_size;
static PyObject *__pyx_n_s_restriction_tracker;
static PyObject *__pyx_n_s_restriction_tracker_param;
static PyObject *__pyx_n_s_result;
static PyObject *__pyx_n_s_results;
static PyObject *__pyx_n_s_return;
static PyObject *__pyx_n_s_root_transform_ids;
static PyObject *__pyx_n_s_round;
static PyObject *__pyx_n_s_sample_exception;
static PyObject *__pyx_n_s_scale_progress;
static PyObject *__pyx_n_s_scaled_progress;
static PyObject *__pyx_n_s_scoped_metrics_container;
static PyObject *__pyx_n_s_self;
static PyObject *__pyx_n_s_send;
static PyObject *__pyx_n_s_set_element;
static PyObject *__pyx_n_s_setstate;
static PyObject *__pyx_n_s_setstate_cython;
static PyObject *__pyx_n_s_setup;
static PyObject *__pyx_n_u_setup;
static PyObject *__pyx_n_s_should_process_window_for_sdf;
static PyObject *__pyx_n_s_si;
static PyObject *__pyx_n_s_side_inputs;
static PyObject *__pyx_n_s_sideinputs;
static PyObject *__pyx_n_s_sig;
static PyObject *__pyx_n_s_signature;
static PyObject *__pyx_n_s_size;
static PyObject *__pyx_n_s_spec;
static PyObject *__pyx_n_s_split;
static PyObject *__pyx_n_u_split;
static PyObject *__pyx_n_s_start;
static PyObject *__pyx_n_u_start_bundle;
static PyObject *__pyx_n_s_start_bundle_outputs;
static PyObject *__pyx_n_s_state;
static PyObject *__pyx_n_s_state_spec;
static PyObject *__pyx_n_s_staticmethod;
static PyObject *__pyx_n_s_step_annotation;
static PyObject *__pyx_n_s_step_name;
static PyObject *__pyx_n_s_stop_window_index;
static PyObject *__pyx_kp_s_stringsource;
static PyObject *__pyx_n_s_strip;
static PyObject *__pyx_n_s_subtransforms;
static PyObject *__pyx_n_s_super;
static PyObject *__pyx_n_s_supports_batches;
static PyObject *__pyx_n_s_supports_elements;
static PyObject *__pyx_n_s_sys;
static PyObject *__pyx_n_s_t;
static PyObject *__pyx_n_s_tag;
static PyObject *__pyx_kp_u_tag_2;
static PyObject *__pyx_n_s_tagged_receivers;
static PyObject *__pyx_n_s_tagged_with_step;
static PyObject *__pyx_n_u_tagged_with_step;
static PyObject *__pyx_n_s_tb;
static PyObject *__pyx_n_s_teardown;
static PyObject *__pyx_n_u_teardown;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_threading;
static PyObject *__pyx_n_s_threadsafe_restriction_tracker;
static PyObject *__pyx_n_s_throw;
static PyObject *__pyx_n_s_timer_spec;
static PyObject *__pyx_n_s_timestamp;
static PyObject *__pyx_n_s_timestamp_2;
static PyObject *__pyx_kp_u_timestamp_not_accessible_in_this;
static PyObject *__pyx_n_s_timestamps;
static PyObject *__pyx_n_s_to_index;
static PyObject *__pyx_n_s_total_work;
static PyObject *__pyx_n_s_traceback;
static PyObject *__pyx_n_s_transform;
static PyObject *__pyx_n_s_transform_id;
static PyObject *__pyx_n_s_transform_node;
static PyObject *__pyx_n_s_transform_proto;
static PyObject *__pyx_n_s_transforms;
static PyObject *__pyx_n_s_try_split;
static PyObject *__pyx_n_s_try_split_2;
static PyObject *__pyx_n_s_try_split_locals_compute_whole;
static PyObject *__pyx_n_s_tuple_types;
static PyObject *__pyx_kp_u_type_but_got_s;
static PyObject *__pyx_n_s_typehints;
static PyObject *__pyx_n_s_typing;
static PyObject *__pyx_n_u_unbounded_per_element;
static PyObject *__pyx_n_s_unused_value;
static PyObject *__pyx_n_s_update;
static PyObject *__pyx_n_s_urn;
static PyObject *__pyx_n_s_use_per_window_invoker;
static PyObject *__pyx_n_s_use_setstate;
static PyObject *__pyx_n_s_user_state_context;
static PyObject *__pyx_n_s_userstate;
static PyObject *__pyx_kp_u_uses_unsupported_DoFn_param_Ele;
static PyObject *__pyx_n_s_util;
static PyObject *__pyx_n_s_validate;
static PyObject *__pyx_n_s_validate_bundle_method;
static PyObject *__pyx_n_s_validate_pipeline_graph;
static PyObject *__pyx_n_s_validate_pipeline_graph_locals_g;
static PyObject *__pyx_n_s_validate_pipeline_graph_locals_v;
static PyObject *__pyx_n_s_validate_process;
static PyObject *__pyx_n_s_validate_process_batch;
static PyObject *__pyx_n_s_validate_stateful_dofn;
static PyObject *__pyx_n_s_validate_stateful_dofn_2;
static PyObject *__pyx_n_s_validate_transform;
static PyObject *__pyx_n_s_value;
static PyObject *__pyx_n_s_value_type;
static PyObject *__pyx_n_s_values;
static PyObject *__pyx_n_s_visit_transform;
static PyObject *__pyx_n_s_w;
static PyObject *__pyx_n_s_watermark_estimator;
static PyObject *__pyx_n_s_watermark_estimator_provider;
static PyObject *__pyx_n_s_watermark_estimator_state;
static PyObject *__pyx_n_s_watermark_param;
static PyObject *__pyx_kp_u_while_running_s;
static PyObject *__pyx_n_s_window;
static PyObject *__pyx_n_s_window_fn;
static PyObject *__pyx_n_s_window_index;
static PyObject *__pyx_n_s_window_observing;
static PyObject *__pyx_n_s_windowed_batch;
static PyObject *__pyx_n_s_windowed_input_batch;
static PyObject *__pyx_n_s_windowed_input_element;
static PyObject *__pyx_n_s_windowed_value;
static PyObject *__pyx_n_s_windowfn;
static PyObject *__pyx_n_s_windowing;
static PyObject *__pyx_n_s_windows;
static PyObject *__pyx_kp_u_windows_not_accessible_in_this_c;
static PyObject *__pyx_n_s_with_traceback;
static PyObject *__pyx_n_s_with_value;
static PyObject *__pyx_n_s_x;
static PyObject *__pyx_n_s_zip;
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_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_30__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_32__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(PyObject *__pyx_self); /* 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(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___3genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___6genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___9genexpr(PyObject *__pyx_self); /* 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, CYTHON_UNUSED 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_exn, PyObject *__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_26__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_26group_by_key_input_visitor_22GroupByKeyInputVisitor___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_deterministic_key_coders); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6common_26group_by_key_input_visitor_22GroupByKeyInputVisitor_2enter_composite_transform(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_transform_node); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6common_26group_by_key_input_visitor_22GroupByKeyInputVisitor_4visit_transform(PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_transform_node); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6common_2group_by_key_input_visitor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_deterministic_key_coders); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6common_23validate_pipeline_graph_get_coder(PyObject *__pyx_self, PyObject *__pyx_v_pcoll_id); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6common_23validate_pipeline_graph_2validate_transform(PyObject *__pyx_self, PyObject *__pyx_v_transform_id); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6common_4validate_pipeline_graph(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pipeline_proto); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6common_6__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_8__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_10__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_12__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_14__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_16__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_18__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_20__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_22__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_24__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_scope_struct___get_arg_placeholders(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_1_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_2___init__(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*/
static PyObject *__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_2;
static PyObject *__pyx_int_3;
static PyObject *__pyx_int_10199973;
static PyObject *__pyx_int_22542117;
static PyObject *__pyx_int_24629412;
static PyObject *__pyx_int_28652999;
static PyObject *__pyx_int_38742981;
static PyObject *__pyx_int_61400015;
static PyObject *__pyx_int_62474201;
static PyObject *__pyx_int_74069314;
static PyObject *__pyx_int_77316345;
static PyObject *__pyx_int_84108186;
static PyObject *__pyx_int_129859458;
static PyObject *__pyx_int_137922938;
static PyObject *__pyx_int_142278286;
static PyObject *__pyx_int_145085662;
static PyObject *__pyx_int_146279351;
static PyObject *__pyx_int_173793943;
static PyObject *__pyx_int_192761774;
static PyObject *__pyx_int_195284539;
static PyObject *__pyx_int_210439282;
static PyObject *__pyx_int_211894287;
static PyObject *__pyx_int_217907439;
static PyObject *__pyx_int_222419149;
static PyObject *__pyx_int_228825662;
static PyObject *__pyx_int_238750788;
static PyObject *__pyx_int_243009704;
static PyObject *__pyx_int_248758726;
static PyObject *__pyx_int_257113325;
static PyObject *__pyx_codeobj_;
static PyObject *__pyx_slice__92;
static PyObject *__pyx_tuple__36;
static PyObject *__pyx_tuple__55;
static PyObject *__pyx_tuple__56;
static PyObject *__pyx_tuple__59;
static PyObject *__pyx_tuple__62;
static PyObject *__pyx_tuple__66;
static PyObject *__pyx_tuple__68;
static PyObject *__pyx_tuple__75;
static PyObject *__pyx_tuple__76;
static PyObject *__pyx_codeobj__2;
static PyObject *__pyx_codeobj__3;
static PyObject *__pyx_codeobj__4;
static PyObject *__pyx_codeobj__5;
static PyObject *__pyx_codeobj__6;
static PyObject *__pyx_codeobj__7;
static PyObject *__pyx_codeobj__8;
static PyObject *__pyx_codeobj__9;
static PyObject *__pyx_tuple__107;
static PyObject *__pyx_tuple__109;
static PyObject *__pyx_tuple__114;
static PyObject *__pyx_tuple__115;
static PyObject *__pyx_tuple__116;
static PyObject *__pyx_tuple__120;
static PyObject *__pyx_tuple__122;
static PyObject *__pyx_tuple__123;
static PyObject *__pyx_tuple__125;
static PyObject *__pyx_tuple__129;
static PyObject *__pyx_tuple__131;
static PyObject *__pyx_tuple__134;
static PyObject *__pyx_tuple__136;
static PyObject *__pyx_tuple__138;
static PyObject *__pyx_tuple__140;
static PyObject *__pyx_tuple__142;
static PyObject *__pyx_tuple__144;
static PyObject *__pyx_tuple__146;
static PyObject *__pyx_tuple__149;
static PyObject *__pyx_tuple__151;
static PyObject *__pyx_tuple__152;
static PyObject *__pyx_tuple__153;
static PyObject *__pyx_tuple__154;
static PyObject *__pyx_tuple__155;
static PyObject *__pyx_tuple__156;
static PyObject *__pyx_tuple__157;
static PyObject *__pyx_tuple__158;
static PyObject *__pyx_tuple__159;
static PyObject *__pyx_tuple__160;
static PyObject *__pyx_tuple__161;
static PyObject *__pyx_tuple__162;
static PyObject *__pyx_tuple__163;
static PyObject *__pyx_tuple__164;
static PyObject *__pyx_tuple__165;
static PyObject *__pyx_tuple__166;
static PyObject *__pyx_tuple__167;
static PyObject *__pyx_tuple__168;
static PyObject *__pyx_tuple__169;
static PyObject *__pyx_tuple__170;
static PyObject *__pyx_tuple__171;
static PyObject *__pyx_tuple__172;
static PyObject *__pyx_tuple__173;
static PyObject *__pyx_tuple__174;
static PyObject *__pyx_tuple__175;
static PyObject *__pyx_tuple__176;
static PyObject *__pyx_tuple__177;
static PyObject *__pyx_tuple__178;
static PyObject *__pyx_tuple__179;
static PyObject *__pyx_tuple__180;
static PyObject *__pyx_tuple__181;
static PyObject *__pyx_tuple__182;
static PyObject *__pyx_tuple__183;
static PyObject *__pyx_tuple__185;
static PyObject *__pyx_tuple__186;
static PyObject *__pyx_tuple__187;
static PyObject *__pyx_tuple__188;
static PyObject *__pyx_tuple__189;
static PyObject *__pyx_tuple__190;
static PyObject *__pyx_tuple__191;
static PyObject *__pyx_tuple__192;
static PyObject *__pyx_tuple__193;
static PyObject *__pyx_tuple__194;
static PyObject *__pyx_tuple__195;
static PyObject *__pyx_tuple__196;
static PyObject *__pyx_tuple__197;
static PyObject *__pyx_tuple__198;
static PyObject *__pyx_tuple__199;
static PyObject *__pyx_tuple__200;
static PyObject *__pyx_tuple__201;
static PyObject *__pyx_tuple__202;
static PyObject *__pyx_tuple__203;
static PyObject *__pyx_tuple__204;
static PyObject *__pyx_tuple__205;
static PyObject *__pyx_tuple__206;
static PyObject *__pyx_tuple__207;
static PyObject *__pyx_tuple__208;
static PyObject *__pyx_tuple__209;
static PyObject *__pyx_tuple__210;
static PyObject *__pyx_tuple__211;
static PyObject *__pyx_tuple__212;
static PyObject *__pyx_tuple__213;
static PyObject *__pyx_tuple__214;
static PyObject *__pyx_tuple__215;
static PyObject *__pyx_tuple__216;
static PyObject *__pyx_tuple__217;
static PyObject *__pyx_tuple__218;
static PyObject *__pyx_tuple__219;
static PyObject *__pyx_tuple__220;
static PyObject *__pyx_tuple__221;
static PyObject *__pyx_tuple__222;
static PyObject *__pyx_tuple__223;
static PyObject *__pyx_tuple__224;
static PyObject *__pyx_tuple__225;
static PyObject *__pyx_tuple__226;
static PyObject *__pyx_tuple__227;
static PyObject *__pyx_tuple__228;
static PyObject *__pyx_tuple__229;
static PyObject *__pyx_tuple__230;
static PyObject *__pyx_tuple__231;
static PyObject *__pyx_tuple__232;
static PyObject *__pyx_tuple__233;
static PyObject *__pyx_tuple__234;
static PyObject *__pyx_tuple__235;
static PyObject *__pyx_tuple__236;
static PyObject *__pyx_tuple__237;
static PyObject *__pyx_tuple__238;
static PyObject *__pyx_tuple__239;
static PyObject *__pyx_tuple__240;
static PyObject *__pyx_tuple__241;
static PyObject *__pyx_tuple__242;
static PyObject *__pyx_tuple__243;
static PyObject *__pyx_tuple__244;
static PyObject *__pyx_tuple__245;
static PyObject *__pyx_tuple__246;
static PyObject *__pyx_tuple__247;
static PyObject *__pyx_tuple__248;
static PyObject *__pyx_tuple__249;
static PyObject *__pyx_tuple__250;
static PyObject *__pyx_tuple__251;
static PyObject *__pyx_tuple__252;
static PyObject *__pyx_tuple__253;
static PyObject *__pyx_tuple__254;
static PyObject *__pyx_tuple__255;
static PyObject *__pyx_tuple__256;
static PyObject *__pyx_tuple__257;
static PyObject *__pyx_tuple__258;
static PyObject *__pyx_tuple__259;
static PyObject *__pyx_tuple__260;
static PyObject *__pyx_tuple__261;
static PyObject *__pyx_tuple__262;
static PyObject *__pyx_tuple__263;
static PyObject *__pyx_tuple__264;
static PyObject *__pyx_tuple__265;
static PyObject *__pyx_tuple__266;
static PyObject *__pyx_tuple__267;
static PyObject *__pyx_codeobj__10;
static PyObject *__pyx_codeobj__11;
static PyObject *__pyx_codeobj__12;
static PyObject *__pyx_codeobj__13;
static PyObject *__pyx_codeobj__14;
static PyObject *__pyx_codeobj__15;
static PyObject *__pyx_codeobj__16;
static PyObject *__pyx_codeobj__17;
static PyObject *__pyx_codeobj__18;
static PyObject *__pyx_codeobj__19;
static PyObject *__pyx_codeobj__20;
static PyObject *__pyx_codeobj__21;
static PyObject *__pyx_codeobj__22;
static PyObject *__pyx_codeobj__24;
static PyObject *__pyx_codeobj__25;
static PyObject *__pyx_codeobj__26;
static PyObject *__pyx_codeobj__27;
static PyObject *__pyx_codeobj__28;
static PyObject *__pyx_codeobj__29;
static PyObject *__pyx_codeobj__30;
static PyObject *__pyx_codeobj__31;
static PyObject *__pyx_codeobj__32;
static PyObject *__pyx_codeobj__33;
static PyObject *__pyx_codeobj__34;
static PyObject *__pyx_codeobj__35;
static PyObject *__pyx_codeobj__37;
static PyObject *__pyx_codeobj__38;
static PyObject *__pyx_codeobj__39;
static PyObject *__pyx_codeobj__40;
static PyObject *__pyx_codeobj__41;
static PyObject *__pyx_codeobj__42;
static PyObject *__pyx_codeobj__43;
static PyObject *__pyx_codeobj__44;
static PyObject *__pyx_codeobj__45;
static PyObject *__pyx_codeobj__46;
static PyObject *__pyx_codeobj__47;
static PyObject *__pyx_codeobj__48;
static PyObject *__pyx_codeobj__49;
static PyObject *__pyx_codeobj__50;
static PyObject *__pyx_codeobj__51;
static PyObject *__pyx_codeobj__52;
static PyObject *__pyx_codeobj__53;
static PyObject *__pyx_codeobj__54;
static PyObject *__pyx_codeobj__57;
static PyObject *__pyx_codeobj__58;
static PyObject *__pyx_codeobj__60;
static PyObject *__pyx_codeobj__61;
static PyObject *__pyx_codeobj__63;
static PyObject *__pyx_codeobj__65;
static PyObject *__pyx_codeobj__67;
static PyObject *__pyx_codeobj__69;
static PyObject *__pyx_codeobj__70;
static PyObject *__pyx_codeobj__71;
static PyObject *__pyx_codeobj__72;
static PyObject *__pyx_codeobj__73;
static PyObject *__pyx_codeobj__74;
static PyObject *__pyx_codeobj__77;
static PyObject *__pyx_codeobj__78;
static PyObject *__pyx_codeobj__79;
static PyObject *__pyx_codeobj__80;
static PyObject *__pyx_codeobj__81;
static PyObject *__pyx_codeobj__82;
static PyObject *__pyx_codeobj__83;
static PyObject *__pyx_codeobj__84;
static PyObject *__pyx_codeobj__85;
static PyObject *__pyx_codeobj__86;
static PyObject *__pyx_codeobj__87;
static PyObject *__pyx_codeobj__88;
static PyObject *__pyx_codeobj__89;
static PyObject *__pyx_codeobj__90;
static PyObject *__pyx_codeobj__91;
static PyObject *__pyx_codeobj__93;
static PyObject *__pyx_codeobj__94;
static PyObject *__pyx_codeobj__95;
static PyObject *__pyx_codeobj__96;
static PyObject *__pyx_codeobj__97;
static PyObject *__pyx_codeobj__98;
static PyObject *__pyx_codeobj__99;
static PyObject *__pyx_codeobj__100;
static PyObject *__pyx_codeobj__101;
static PyObject *__pyx_codeobj__102;
static PyObject *__pyx_codeobj__103;
static PyObject *__pyx_codeobj__104;
static PyObject *__pyx_codeobj__105;
static PyObject *__pyx_codeobj__106;
static PyObject *__pyx_codeobj__108;
static PyObject *__pyx_codeobj__110;
static PyObject *__pyx_codeobj__112;
static PyObject *__pyx_codeobj__113;
static PyObject *__pyx_codeobj__117;
static PyObject *__pyx_codeobj__118;
static PyObject *__pyx_codeobj__119;
static PyObject *__pyx_codeobj__121;
static PyObject *__pyx_codeobj__124;
static PyObject *__pyx_codeobj__126;
static PyObject *__pyx_codeobj__128;
static PyObject *__pyx_codeobj__130;
static PyObject *__pyx_codeobj__132;
static PyObject *__pyx_codeobj__133;
static PyObject *__pyx_codeobj__135;
static PyObject *__pyx_codeobj__137;
static PyObject *__pyx_codeobj__139;
static PyObject *__pyx_codeobj__141;
static PyObject *__pyx_codeobj__143;
static PyObject *__pyx_codeobj__145;
static PyObject *__pyx_codeobj__147;
static PyObject *__pyx_codeobj__148;
static PyObject *__pyx_codeobj__150;
/* Late includes */

/* "apache_beam/runners/common.py":90
 * 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, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __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*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11NameContext_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6common_11NameContext___init__};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_11NameContext_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_step_name = 0;
  PyObject *__pyx_v_transform_id = 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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_step_name,&__pyx_n_s_transform_id,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_step_name)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); __PYX_ERR(0, 90, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_transform_id);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 90, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_step_name = values[1];
    __pyx_v_transform_id = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 90, __pyx_L3_error)
  __pyx_L3_error:;
  __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 */
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj_)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 90, 0, __PYX_ERR(0, 90, __pyx_L1_error));

  /* "apache_beam/runners/common.py":98
 *       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_n_s_step_name, __pyx_v_step_name) < 0) __PYX_ERR(0, 98, __pyx_L1_error)

  /* "apache_beam/runners/common.py":99
 *     """
 *     self.step_name = step_name
 *     self.transform_id = transform_id             # <<<<<<<<<<<<<<
 * 
 *   def __eq__(self, other):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_transform_id, __pyx_v_transform_id) < 0) __PYX_ERR(0, 99, __pyx_L1_error)

  /* "apache_beam/runners/common.py":90
 * 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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":101
 *     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, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_11NameContext_3__eq__ = {"__eq__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11NameContext_3__eq__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_11NameContext_3__eq__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_other = 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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_other,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, 1); __PYX_ERR(0, 101, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__eq__") < 0)) __PYX_ERR(0, 101, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_other = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 101, __pyx_L3_error)
  __pyx_L3_error:;
  __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 */
  __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_TraceDeclarations
  __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_TraceFrameInit(__pyx_codeobj__2)
  __Pyx_RefNannySetupContext("__eq__", 0);
  __Pyx_TraceCall("__eq__", __pyx_f[0], 101, 0, __PYX_ERR(0, 101, __pyx_L1_error));

  /* "apache_beam/runners/common.py":102
 * 
 *   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_n_s_step_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_step_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 102, __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, 102, __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":101
 *     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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":104
 *     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, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_11NameContext_5__repr__ = {"__repr__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_11NameContext_5__repr__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_11NameContext_5__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6common_11NameContext_4__repr__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __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_TraceDeclarations
  __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_TraceFrameInit(__pyx_codeobj__3)
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 104, 0, __PYX_ERR(0, 104, __pyx_L1_error));

  /* "apache_beam/runners/common.py":105
 * 
 *   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_n_s_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_NameContext_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 105, __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":104
 *     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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":107
 *     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, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_11NameContext_7__hash__ = {"__hash__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_11NameContext_7__hash__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_11NameContext_7__hash__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6common_11NameContext_6__hash__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __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_TraceDeclarations
  __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_TraceFrameInit(__pyx_codeobj__4)
  __Pyx_RefNannySetupContext("__hash__", 0);
  __Pyx_TraceCall("__hash__", __pyx_f[0], 107, 0, __PYX_ERR(0, 107, __pyx_L1_error));

  /* "apache_beam/runners/common.py":108
 * 
 *   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_n_s_step_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __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, 108, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_FromHash_t(__pyx_t_2); 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":107
 *     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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":110
 *     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, PyObject *__pyx_v_self); /*proto*/
static char __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)__pyx_pw_11apache_beam_7runners_6common_11NameContext_9metrics_name, METH_O, __pyx_doc_11apache_beam_7runners_6common_11NameContext_8metrics_name};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_11NameContext_9metrics_name(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("metrics_name (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6common_11NameContext_8metrics_name(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__5)
  __Pyx_RefNannySetupContext("metrics_name", 0);
  __Pyx_TraceCall("metrics_name", __pyx_f[0], 110, 0, __PYX_ERR(0, 110, __pyx_L1_error));

  /* "apache_beam/runners/common.py":112
 *   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_n_s_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 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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":114
 *     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, PyObject *__pyx_v_self); /*proto*/
static char __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)__pyx_pw_11apache_beam_7runners_6common_11NameContext_11logging_name, METH_O, __pyx_doc_11apache_beam_7runners_6common_11NameContext_10logging_name};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_11NameContext_11logging_name(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("logging_name (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6common_11NameContext_10logging_name(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__6)
  __Pyx_RefNannySetupContext("logging_name", 0);
  __Pyx_TraceCall("logging_name", __pyx_f[0], 114, 0, __PYX_ERR(0, 114, __pyx_L1_error));

  /* "apache_beam/runners/common.py":116
 *   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_n_s_step_name); 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/runners/common.py":114
 *     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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":127
 *   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, PyObject *__pyx_v_windowed_value); /*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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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_TraceFrameInit(__pyx_codeobj__7)
  __Pyx_RefNannySetupContext("receive", 0);
  __Pyx_TraceCall("receive", __pyx_f[0], 127, 0, __PYX_ERR(0, 127, __pyx_L1_error));
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_receive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_7runners_6common_8Receiver_1receive)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_windowed_value)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_windowed_value));
        __Pyx_XDECREF(__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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __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_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_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(self, windowed_value):
 *     # type: (WindowedValue) -> None
 *     raise NotImplementedError             # <<<<<<<<<<<<<<
 * 
 *   def receive_batch(self, windowed_batch):
 */
  __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
  __PYX_ERR(0, 129, __pyx_L1_error)

  /* "apache_beam/runners/common.py":127
 *   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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_8Receiver_1receive(PyObject *__pyx_v_self, PyObject *__pyx_v_windowed_value); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_8Receiver_1receive = {"receive", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_8Receiver_1receive, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_8Receiver_1receive(PyObject *__pyx_v_self, PyObject *__pyx_v_windowed_value) {
  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 (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_windowed_value), __pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, 1, "windowed_value", 0))) __PYX_ERR(0, 127, __pyx_L1_error)
  __pyx_r = __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));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__7)
  __Pyx_RefNannySetupContext("receive", 0);
  __Pyx_TraceCall("receive (wrapper)", __pyx_f[0], 127, 0, __PYX_ERR(0, 127, __pyx_L1_error));
  __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, 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", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":131
 *     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, PyObject *__pyx_v_windowed_batch); /*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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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_TraceFrameInit(__pyx_codeobj__8)
  __Pyx_RefNannySetupContext("receive_batch", 0);
  __Pyx_TraceCall("receive_batch", __pyx_f[0], 131, 0, __PYX_ERR(0, 131, __pyx_L1_error));
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_receive_batch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_7runners_6common_8Receiver_3receive_batch)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_windowed_batch)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_windowed_batch));
        __Pyx_XDECREF(__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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __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_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_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":133
 *   def receive_batch(self, windowed_batch):
 *     # type: (WindowedBatch) -> None
 *     raise NotImplementedError             # <<<<<<<<<<<<<<
 * 
 *   def flush(self):
 */
  __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
  __PYX_ERR(0, 133, __pyx_L1_error)

  /* "apache_beam/runners/common.py":131
 *     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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_8Receiver_3receive_batch(PyObject *__pyx_v_self, PyObject *__pyx_v_windowed_batch); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_8Receiver_3receive_batch = {"receive_batch", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_8Receiver_3receive_batch, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_8Receiver_3receive_batch(PyObject *__pyx_v_self, PyObject *__pyx_v_windowed_batch) {
  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 (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_windowed_batch), __pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch, 1, "windowed_batch", 0))) __PYX_ERR(0, 131, __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), ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *)__pyx_v_windowed_batch));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__8)
  __Pyx_RefNannySetupContext("receive_batch", 0);
  __Pyx_TraceCall("receive_batch (wrapper)", __pyx_f[0], 131, 0, __PYX_ERR(0, 131, __pyx_L1_error));
  __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, 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.receive_batch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":135
 *     raise NotImplementedError
 * 
 *   def flush(self):             # <<<<<<<<<<<<<<
 *     raise NotImplementedError
 * 
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6common_8Receiver_5flush(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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_TraceFrameInit(__pyx_codeobj__9)
  __Pyx_RefNannySetupContext("flush", 0);
  __Pyx_TraceCall("flush", __pyx_f[0], 135, 0, __PYX_ERR(0, 135, __pyx_L1_error));
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flush); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_7runners_6common_8Receiver_5flush)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        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_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_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_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":136
 * 
 *   def flush(self):
 *     raise NotImplementedError             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
  __PYX_ERR(0, 136, __pyx_L1_error)

  /* "apache_beam/runners/common.py":135
 *     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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_8Receiver_5flush(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_8Receiver_5flush = {"flush", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_8Receiver_5flush, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_8Receiver_5flush(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("flush (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__9)
  __Pyx_RefNannySetupContext("flush", 0);
  __Pyx_TraceCall("flush (wrapper)", __pyx_f[0], 135, 0, __PYX_ERR(0, 135, __pyx_L1_error));
  __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, 135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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_TraceReturn(__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_8Receiver_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_8Receiver_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_8Receiver_7__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_8Receiver_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __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_TraceDeclarations
  __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_TraceFrameInit(__pyx_codeobj__10)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = ()             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __Pyx_INCREF(__pyx_empty_tuple);
  __pyx_v_state = __pyx_empty_tuple;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_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:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         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);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __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:
 *         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:             # <<<<<<<<<<<<<<
 *         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), 0xd41d8cd, 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), 0xd41d8cd, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = False
 *     if use_setstate:
 *         return __pyx_unpickle_Receiver, (type(self), 0xd41d8cd, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_Receiver, (type(self), 0xd41d8cd, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_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))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222419149);
    __Pyx_GIVEREF(__pyx_int_222419149);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __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);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __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), 0xd41d8cd, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_Receiver, (type(self), 0xd41d8cd, None), state
 *     else:
 *         return __pyx_unpickle_Receiver, (type(self), 0xd41d8cd, 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_n_s_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))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222419149);
    __Pyx_GIVEREF(__pyx_int_222419149);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __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);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Receiver, (type(self), 0xd41d8cd, 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, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_8Receiver_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_8Receiver_9__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_8Receiver_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __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));

  /* function exit code */
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__11)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 16, 0, __PYX_ERR(1, 16, __pyx_L1_error));

  /* "(tree fragment)":17
 *         return __pyx_unpickle_Receiver, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Receiver__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6common___pyx_unpickle_Receiver__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Receiver, (type(self), 0xd41d8cd, 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_AddTraceback("apache_beam.runners.common.Receiver.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":143
 * 
 *   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*/
static char __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj_to_invoke,&__pyx_n_s_method_name,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj_to_invoke)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_method_name)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 143, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 143, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_obj_to_invoke = values[0];
    __pyx_v_method_name = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 143, __pyx_L3_error)
  __pyx_L3_error:;
  __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 */
  __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_TraceDeclarations
  __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_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  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("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 143, 0, __PYX_ERR(0, 143, __pyx_L1_error));

  /* "apache_beam/runners/common.py":154
 * 
 *     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_n_s_DoFn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_RestrictionProvider); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_WatermarkEstimatorProvider); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "apache_beam/runners/common.py":153
 *     """
 * 
 *     if not isinstance(obj_to_invoke,             # <<<<<<<<<<<<<<
 *                       (DoFn, RestrictionProvider, WatermarkEstimatorProvider)):
 *       raise ValueError(
 */
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_obj_to_invoke, __pyx_t_1); 

  /* "apache_beam/runners/common.py":154
 * 
 *     if not isinstance(obj_to_invoke,
 *                       (DoFn, RestrictionProvider, WatermarkEstimatorProvider)):             # <<<<<<<<<<<<<<
 *       raise ValueError(
 *           '\'obj_to_invoke\' has to be either a \'DoFn\' or '
 */
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (!__pyx_t_6) {
  } else {
    __pyx_t_4 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }

  /* "apache_beam/runners/common.py":153
 *     """
 * 
 *     if not isinstance(obj_to_invoke,             # <<<<<<<<<<<<<<
 *                       (DoFn, RestrictionProvider, WatermarkEstimatorProvider)):
 *       raise ValueError(
 */
  __pyx_t_6 = PyObject_IsInstance(__pyx_v_obj_to_invoke, __pyx_t_2); 

  /* "apache_beam/runners/common.py":154
 * 
 *     if not isinstance(obj_to_invoke,
 *                       (DoFn, RestrictionProvider, WatermarkEstimatorProvider)):             # <<<<<<<<<<<<<<
 *       raise ValueError(
 *           '\'obj_to_invoke\' has to be either a \'DoFn\' or '
 */
  __pyx_t_5 = (__pyx_t_6 != 0);
  if (!__pyx_t_5) {
  } else {
    __pyx_t_4 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }

  /* "apache_beam/runners/common.py":153
 *     """
 * 
 *     if not isinstance(obj_to_invoke,             # <<<<<<<<<<<<<<
 *                       (DoFn, RestrictionProvider, WatermarkEstimatorProvider)):
 *       raise ValueError(
 */
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_obj_to_invoke, __pyx_t_3); 

  /* "apache_beam/runners/common.py":154
 * 
 *     if not isinstance(obj_to_invoke,
 *                       (DoFn, RestrictionProvider, WatermarkEstimatorProvider)):             # <<<<<<<<<<<<<<
 *       raise ValueError(
 *           '\'obj_to_invoke\' has to be either a \'DoFn\' or '
 */
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_4 = __pyx_t_6;
  __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;

  /* "apache_beam/runners/common.py":153
 *     """
 * 
 *     if not isinstance(obj_to_invoke,             # <<<<<<<<<<<<<<
 *                       (DoFn, RestrictionProvider, WatermarkEstimatorProvider)):
 *       raise ValueError(
 */
  __pyx_t_6 = ((!(__pyx_t_4 != 0)) != 0);
  if (unlikely(__pyx_t_6)) {

    /* "apache_beam/runners/common.py":157
 *       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_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_obj_to_invoke_has_to_be_either, __pyx_v_obj_to_invoke); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "apache_beam/runners/common.py":155
 *     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 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __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_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 155, __pyx_L1_error)

    /* "apache_beam/runners/common.py":153
 *     """
 * 
 *     if not isinstance(obj_to_invoke,             # <<<<<<<<<<<<<<
 *                       (DoFn, RestrictionProvider, WatermarkEstimatorProvider)):
 *       raise ValueError(
 */
  }

  /* "apache_beam/runners/common.py":159
 *           'a \'RestrictionProvider\'. Received %r instead.' % obj_to_invoke)
 * 
 *     self.args, self.defaults = core.get_function_arguments(obj_to_invoke,             # <<<<<<<<<<<<<<
 *                                                            method_name)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_core); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_get_function_arguments); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":160
 * 
 *     self.args, self.defaults = core.get_function_arguments(obj_to_invoke,
 *                                                            method_name)             # <<<<<<<<<<<<<<
 * 
 *     # TODO(BEAM-5878) support kwonlyargs on Python 3.
 */
  __pyx_t_1 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_obj_to_invoke, __pyx_v_method_name};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_obj_to_invoke, __pyx_v_method_name};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  {
    __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_1) {
      __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); __pyx_t_1 = NULL;
    }
    __Pyx_INCREF(__pyx_v_obj_to_invoke);
    __Pyx_GIVEREF(__pyx_v_obj_to_invoke);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_obj_to_invoke);
    __Pyx_INCREF(__pyx_v_method_name);
    __Pyx_GIVEREF(__pyx_v_method_name);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_method_name);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  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, 159, __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_t_8 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_8);
    #else
    __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    #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, 159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext;
    index = 0; __pyx_t_3 = __pyx_t_9(__pyx_t_1); if (unlikely(!__pyx_t_3)) goto __pyx_L7_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 1; __pyx_t_8 = __pyx_t_9(__pyx_t_1); if (unlikely(!__pyx_t_8)) goto __pyx_L7_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_8);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_1), 2) < 0) __PYX_ERR(0, 159, __pyx_L1_error)
    __pyx_t_9 = NULL;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L8_unpacking_done;
    __pyx_L7_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, 159, __pyx_L1_error)
    __pyx_L8_unpacking_done:;
  }

  /* "apache_beam/runners/common.py":159
 *           'a \'RestrictionProvider\'. Received %r instead.' % obj_to_invoke)
 * 
 *     self.args, self.defaults = core.get_function_arguments(obj_to_invoke,             # <<<<<<<<<<<<<<
 *                                                            method_name)
 * 
 */
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->args);
  __Pyx_DECREF(__pyx_v_self->args);
  __pyx_v_self->args = __pyx_t_3;
  __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_8);
  __Pyx_GOTREF(__pyx_v_self->defaults);
  __Pyx_DECREF(__pyx_v_self->defaults);
  __pyx_v_self->defaults = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "apache_beam/runners/common.py":163
 * 
 *     # TODO(BEAM-5878) support kwonlyargs on Python 3.
 *     self.method_value = getattr(obj_to_invoke, method_name)             # <<<<<<<<<<<<<<
 *     self.method_name = method_name
 * 
 */
  __pyx_t_2 = __Pyx_GetAttr(__pyx_v_obj_to_invoke, __pyx_v_method_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->method_value);
  __Pyx_DECREF(__pyx_v_self->method_value);
  __pyx_v_self->method_value = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":164
 *     # 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
 */
  if (!(likely(PyString_CheckExact(__pyx_v_method_name))||((__pyx_v_method_name) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_method_name)->tp_name), 0))) __PYX_ERR(0, 164, __pyx_L1_error)
  __pyx_t_2 = __pyx_v_method_name;
  __Pyx_INCREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->method_name);
  __Pyx_DECREF(__pyx_v_self->method_name);
  __pyx_v_self->method_name = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":166
 *     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":167
 * 
 *     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_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __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_2;
  __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":168
 *     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_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __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_2;
  __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":169
 *     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":170
 *     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":171
 *     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":172
 *     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":173
 *     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":174
 *     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":175
 *     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":176
 *     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":178
 *     self.dynamic_timer_tag_arg_name = None
 * 
 *     if hasattr(self.method_value, 'unbounded_per_element'):             # <<<<<<<<<<<<<<
 *       self.unbounded_per_element = True
 *     else:
 */
  __pyx_t_2 = __pyx_v_self->method_value;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_HasAttr(__pyx_t_2, __pyx_n_u_unbounded_per_element); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 178, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = (__pyx_t_6 != 0);
  if (__pyx_t_4) {

    /* "apache_beam/runners/common.py":179
 * 
 *     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":178
 *     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":181
 *       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":183
 *       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_2 = __pyx_v_self->defaults;
  __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, 183, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_self->args, (-__pyx_t_10), 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_self->defaults);
  __Pyx_GIVEREF(__pyx_v_self->defaults);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_self->defaults);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_8 = __pyx_t_2; __Pyx_INCREF(__pyx_t_8); __pyx_t_10 = 0;
    __pyx_t_11 = NULL;
  } else {
    __pyx_t_10 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 183, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_11 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 183, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_11)) {
      if (likely(PyList_CheckExact(__pyx_t_8))) {
        if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_8)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 183, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_8, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 183, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_8, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_11(__pyx_t_8);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 183, __pyx_L1_error)
        }
        break;
      }
      __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, 183, __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_t_1 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 183, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __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_12 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 183, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_9 = Py_TYPE(__pyx_t_12)->tp_iternext;
      index = 0; __pyx_t_3 = __pyx_t_9(__pyx_t_12); if (unlikely(!__pyx_t_3)) goto __pyx_L12_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_1 = __pyx_t_9(__pyx_t_12); if (unlikely(!__pyx_t_1)) goto __pyx_L12_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_1);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_12), 2) < 0) __PYX_ERR(0, 183, __pyx_L1_error)
      __pyx_t_9 = NULL;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      goto __pyx_L13_unpacking_done;
      __pyx_L12_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, 183, __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_1);
    __pyx_t_1 = 0;

    /* "apache_beam/runners/common.py":184
 * 
 *     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_2, __pyx_n_s_core); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 184, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __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_n_s_StateParam); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 184, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = PyObject_IsInstance(__pyx_v_v, __pyx_t_2); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 184, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_6 = (__pyx_t_4 != 0);
    if (__pyx_t_6) {

      /* "apache_beam/runners/common.py":185
 *     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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_state_spec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (unlikely(PyObject_SetItem(__pyx_v_self->state_args_to_replace, __pyx_v_kw, __pyx_t_2) < 0)) __PYX_ERR(0, 185, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "apache_beam/runners/common.py":186
 *       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":184
 * 
 *     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":187
 *         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_2, __pyx_n_s_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_n_s_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_n_s_TimerParam); 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_6 = PyObject_IsInstance(__pyx_v_v, __pyx_t_2); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 187, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = (__pyx_t_6 != 0);
    if (__pyx_t_4) {

      /* "apache_beam/runners/common.py":188
 *         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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_timer_spec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 188, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (unlikely(PyObject_SetItem(__pyx_v_self->timer_args_to_replace, __pyx_v_kw, __pyx_t_2) < 0)) __PYX_ERR(0, 188, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "apache_beam/runners/common.py":189
 *       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":187
 *         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":190
 *         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_2, __pyx_n_s_core); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __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_n_s_TimestampParam); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __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, 190, __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, 190, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_4) {

      /* "apache_beam/runners/common.py":191
 *         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":190
 *         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":192
 *       elif core.DoFn.TimestampParam == v:
 *         self.timestamp_arg_name = kw
 *       elif core.DoFn.WindowParam == v:             # <<<<<<<<<<<<<<
 *         self.window_arg_name = kw
 *       elif core.DoFn.KeyParam == v:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_core); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 192, __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_n_s_WindowParam); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __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, 192, __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, 192, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_4) {

      /* "apache_beam/runners/common.py":193
 *         self.timestamp_arg_name = kw
 *       elif core.DoFn.WindowParam == 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":192
 *       elif core.DoFn.TimestampParam == v:
 *         self.timestamp_arg_name = kw
 *       elif core.DoFn.WindowParam == v:             # <<<<<<<<<<<<<<
 *         self.window_arg_name = kw
 *       elif core.DoFn.KeyParam == v:
 */
      goto __pyx_L14;
    }

    /* "apache_beam/runners/common.py":194
 *       elif core.DoFn.WindowParam == 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_n_s_core); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 194, __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_n_s_KeyParam); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __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, 194, __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, 194, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_4) {

      /* "apache_beam/runners/common.py":195
 *         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":194
 *       elif core.DoFn.WindowParam == 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":196
 *       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_n_s_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_n_s_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_n_s_RestrictionParam); 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_4 = PyObject_IsInstance(__pyx_v_v, __pyx_t_1); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 196, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = (__pyx_t_4 != 0);
    if (__pyx_t_6) {

      /* "apache_beam/runners/common.py":197
 *         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_n_s_restriction_provider); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 197, __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, 197, __pyx_L1_error)
      if (!__pyx_t_6) {
        __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":198
 *       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":196
 *       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":199
 *         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_n_s_core); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_DoFn); 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_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_WatermarkEstimatorParam); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_6 = PyObject_IsInstance(__pyx_v_v, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 199, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = (__pyx_t_6 != 0);
    if (__pyx_t_4) {

      /* "apache_beam/runners/common.py":201
 *       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_n_s_watermark_estimator_provider); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 201, __pyx_L1_error)
      if (!__pyx_t_4) {
        __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":200
 *         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":202
 *         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":199
 *         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":203
 *             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_n_s_core); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __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_n_s_DynamicTimerTagParam); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __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, 203, __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, 203, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_4) {

      /* "apache_beam/runners/common.py":204
 *         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":203
 *             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":183
 *       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_8); __pyx_t_8 = 0;

  /* "apache_beam/runners/common.py":208
 *     # Create NoOpWatermarkEstimatorProvider if there is no
 *     # WatermarkEstimatorParam provided.
 *     if self.watermark_estimator_provider is None:             # <<<<<<<<<<<<<<
 *       self.watermark_estimator_provider = NoOpWatermarkEstimatorProvider()
 * 
 */
  __pyx_t_4 = (__pyx_v_self->watermark_estimator_provider == Py_None);
  __pyx_t_6 = (__pyx_t_4 != 0);
  if (__pyx_t_6) {

    /* "apache_beam/runners/common.py":209
 *     # WatermarkEstimatorParam provided.
 *     if self.watermark_estimator_provider is None:
 *       self.watermark_estimator_provider = NoOpWatermarkEstimatorProvider()             # <<<<<<<<<<<<<<
 * 
 *   def invoke_timer_callback(
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_NoOpWatermarkEstimatorProvider); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 209, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_8 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 209, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GIVEREF(__pyx_t_8);
    __Pyx_GOTREF(__pyx_v_self->watermark_estimator_provider);
    __Pyx_DECREF(__pyx_v_self->watermark_estimator_provider);
    __pyx_v_self->watermark_estimator_provider = __pyx_t_8;
    __pyx_t_8 = 0;

    /* "apache_beam/runners/common.py":208
 *     # 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":143
 * 
 *   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_8);
  __Pyx_XDECREF(__pyx_t_12);
  __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_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":211
 *       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, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13MethodWrapper_3invoke_timer_callback = {"invoke_timer_callback", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_3invoke_timer_callback, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_3invoke_timer_callback(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  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;
  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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_user_state_context,&__pyx_n_s_key,&__pyx_n_s_window,&__pyx_n_s_timestamp,&__pyx_n_s_pane_info,&__pyx_n_s_dynamic_timer_tag,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_user_state_context)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("invoke_timer_callback", 1, 6, 6, 1); __PYX_ERR(0, 211, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_window)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("invoke_timer_callback", 1, 6, 6, 2); __PYX_ERR(0, 211, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timestamp)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("invoke_timer_callback", 1, 6, 6, 3); __PYX_ERR(0, 211, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pane_info)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("invoke_timer_callback", 1, 6, 6, 4); __PYX_ERR(0, 211, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dynamic_timer_tag)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("invoke_timer_callback", 1, 6, 6, 5); __PYX_ERR(0, 211, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "invoke_timer_callback") < 0)) __PYX_ERR(0, 211, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
    }
    __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_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("invoke_timer_callback", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 211, __pyx_L3_error)
  __pyx_L3_error:;
  __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 */
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  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;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__12)
  __Pyx_RefNannySetupContext("invoke_timer_callback", 0);
  __Pyx_TraceCall("invoke_timer_callback", __pyx_f[0], 211, 0, __PYX_ERR(0, 211, __pyx_L1_error));

  /* "apache_beam/runners/common.py":220
 *       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, 220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_kwargs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":221
 *     # 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)
 */
  __pyx_t_2 = (__pyx_v_self->has_userstate_arguments != 0);
  if (__pyx_t_2) {

    /* "apache_beam/runners/common.py":222
 *     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_3 = 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, 222, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_self->state_args_to_replace, 0, __pyx_n_s_items, (&__pyx_t_4), (&__pyx_t_5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 222, __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_8 = __Pyx_dict_iter_next(__pyx_t_1, __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, 222, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_XDECREF_SET(__pyx_v_kw, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_state_spec, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "apache_beam/runners/common.py":223
 *     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_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_user_state_context, __pyx_n_s_get_state); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 223, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = NULL;
      __pyx_t_8 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_8 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_v_state_spec, __pyx_v_key, __pyx_v_window};
        __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 223, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_7);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_v_state_spec, __pyx_v_key, __pyx_v_window};
        __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 223, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_7);
      } else
      #endif
      {
        __pyx_t_10 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 223, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        if (__pyx_t_9) {
          __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL;
        }
        __Pyx_INCREF(__pyx_v_state_spec);
        __Pyx_GIVEREF(__pyx_v_state_spec);
        PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_8, __pyx_v_state_spec);
        __Pyx_INCREF(__pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_8, __pyx_v_key);
        __Pyx_INCREF(__pyx_v_window);
        __Pyx_GIVEREF(__pyx_v_window);
        PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_8, __pyx_v_window);
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 223, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_v_kw, __pyx_t_7) < 0)) __PYX_ERR(0, 223, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/runners/common.py":224
 *       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_4 = 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, 224, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_dict_iterator(__pyx_v_self->timer_args_to_replace, 0, __pyx_n_s_items, (&__pyx_t_3), (&__pyx_t_5)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 224, __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_8 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_4, &__pyx_t_7, &__pyx_t_6, NULL, __pyx_t_5);
      if (unlikely(__pyx_t_8 == 0)) break;
      if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 224, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_XDECREF_SET(__pyx_v_kw, __pyx_t_7);
      __pyx_t_7 = 0;
      __Pyx_XDECREF_SET(__pyx_v_timer_spec, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "apache_beam/runners/common.py":225
 *         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_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_user_state_context, __pyx_n_s_get_timer); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 225, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);

      /* "apache_beam/runners/common.py":226
 *       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_10 = NULL;
      __pyx_t_8 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_8 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[6] = {__pyx_t_10, __pyx_v_timer_spec, __pyx_v_key, __pyx_v_window, __pyx_v_timestamp, __pyx_v_pane_info};
        __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_8, 5+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 225, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_6);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[6] = {__pyx_t_10, __pyx_v_timer_spec, __pyx_v_key, __pyx_v_window, __pyx_v_timestamp, __pyx_v_pane_info};
        __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_8, 5+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 225, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_6);
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(5+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 225, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (__pyx_t_10) {
          __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); __pyx_t_10 = NULL;
        }
        __Pyx_INCREF(__pyx_v_timer_spec);
        __Pyx_GIVEREF(__pyx_v_timer_spec);
        PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_timer_spec);
        __Pyx_INCREF(__pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_key);
        __Pyx_INCREF(__pyx_v_window);
        __Pyx_GIVEREF(__pyx_v_window);
        PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_v_window);
        __Pyx_INCREF(__pyx_v_timestamp);
        __Pyx_GIVEREF(__pyx_v_timestamp);
        PyTuple_SET_ITEM(__pyx_t_9, 3+__pyx_t_8, __pyx_v_timestamp);
        __Pyx_INCREF(__pyx_v_pane_info);
        __Pyx_GIVEREF(__pyx_v_pane_info);
        PyTuple_SET_ITEM(__pyx_t_9, 4+__pyx_t_8, __pyx_v_pane_info);
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 225, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "apache_beam/runners/common.py":225
 *         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_6) < 0)) __PYX_ERR(0, 225, __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
 *     # 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":228
 *             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_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->timestamp_arg_name); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 228, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "apache_beam/runners/common.py":229
 * 
 *     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_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Timestamp); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_of); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_v_timestamp) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_timestamp);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_v_self->timestamp_arg_name, __pyx_t_1) < 0)) __PYX_ERR(0, 229, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/runners/common.py":228
 *             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":230
 *     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_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->window_arg_name); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 230, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "apache_beam/runners/common.py":231
 *       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, 231, __pyx_L1_error)

    /* "apache_beam/runners/common.py":230
 *     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":232
 *     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_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->key_arg_name); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 232, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "apache_beam/runners/common.py":233
 *       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, 233, __pyx_L1_error)

    /* "apache_beam/runners/common.py":232
 *     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":234
 *     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_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->dynamic_timer_tag_arg_name); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 234, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "apache_beam/runners/common.py":235
 *       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, 235, __pyx_L1_error)

    /* "apache_beam/runners/common.py":234
 *     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":237
 *       kwargs[self.dynamic_timer_tag_arg_name] = dynamic_timer_tag
 * 
 *     if kwargs:             # <<<<<<<<<<<<<<
 *       return self.method_value(**kwargs)
 *     else:
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 237, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "apache_beam/runners/common.py":238
 * 
 *     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, 238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_v_self->method_value, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "apache_beam/runners/common.py":237
 *       kwargs[self.dynamic_timer_tag_arg_name] = dynamic_timer_tag
 * 
 *     if kwargs:             # <<<<<<<<<<<<<<
 *       return self.method_value(**kwargs)
 *     else:
 */
  }

  /* "apache_beam/runners/common.py":240
 *       return self.method_value(**kwargs)
 *     else:
 *       return self.method_value()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->method_value);
    __pyx_t_1 = __pyx_v_self->method_value; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 240, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;
  }

  /* "apache_beam/runners/common.py":211
 *       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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __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_TraceReturn(__pyx_r, 0);
  __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) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[2], 37, 0, __PYX_ERR(2, 37, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->args);
  __pyx_r = __pyx_v_self->args;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.MethodWrapper.args.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[2], 37, 0, __PYX_ERR(2, 37, __pyx_L1_error));
  __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;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.MethodWrapper.args.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[2], 37, 0, __PYX_ERR(2, 37, __pyx_L1_error));
  __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;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.MethodWrapper.args.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 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) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[2], 38, 0, __PYX_ERR(2, 38, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->defaults);
  __pyx_r = __pyx_v_self->defaults;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.MethodWrapper.defaults.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[2], 38, 0, __PYX_ERR(2, 38, __pyx_L1_error));
  __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;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.MethodWrapper.defaults.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[2], 38, 0, __PYX_ERR(2, 38, __pyx_L1_error));
  __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;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.MethodWrapper.defaults.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 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) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[2], 39, 0, __PYX_ERR(2, 39, __pyx_L1_error));
  __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_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.MethodWrapper.method_value.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[2], 39, 0, __PYX_ERR(2, 39, __pyx_L1_error));
  __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;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.MethodWrapper.method_value.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[2], 39, 0, __PYX_ERR(2, 39, __pyx_L1_error));
  __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;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.MethodWrapper.method_value.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 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) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[2], 49, 0, __PYX_ERR(2, 49, __pyx_L1_error));
  __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_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.MethodWrapper.watermark_estimator_provider.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[2], 49, 0, __PYX_ERR(2, 49, __pyx_L1_error));
  __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;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.MethodWrapper.watermark_estimator_provider.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[2], 49, 0, __PYX_ERR(2, 49, __pyx_L1_error));
  __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;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.MethodWrapper.watermark_estimator_provider.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 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, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13MethodWrapper_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_5__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __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_TraceDeclarations
  __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_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__13)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(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:
 */
  __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);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->args);
  __Pyx_INCREF(__pyx_v_self->defaults);
  __Pyx_GIVEREF(__pyx_v_self->defaults);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->defaults);
  __Pyx_INCREF(__pyx_v_self->dynamic_timer_tag_arg_name);
  __Pyx_GIVEREF(__pyx_v_self->dynamic_timer_tag_arg_name);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->dynamic_timer_tag_arg_name);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->key_arg_name);
  __Pyx_GIVEREF(__pyx_v_self->key_arg_name);
  PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_self->key_arg_name);
  __Pyx_INCREF(__pyx_v_self->method_name);
  __Pyx_GIVEREF(__pyx_v_self->method_name);
  PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_self->method_name);
  __Pyx_INCREF(__pyx_v_self->method_value);
  __Pyx_GIVEREF(__pyx_v_self->method_value);
  PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_v_self->method_value);
  __Pyx_INCREF(__pyx_v_self->restriction_provider);
  __Pyx_GIVEREF(__pyx_v_self->restriction_provider);
  PyTuple_SET_ITEM(__pyx_t_3, 7, __pyx_v_self->restriction_provider);
  __Pyx_INCREF(__pyx_v_self->restriction_provider_arg_name);
  __Pyx_GIVEREF(__pyx_v_self->restriction_provider_arg_name);
  PyTuple_SET_ITEM(__pyx_t_3, 8, __pyx_v_self->restriction_provider_arg_name);
  __Pyx_INCREF(__pyx_v_self->state_args_to_replace);
  __Pyx_GIVEREF(__pyx_v_self->state_args_to_replace);
  PyTuple_SET_ITEM(__pyx_t_3, 9, __pyx_v_self->state_args_to_replace);
  __Pyx_INCREF(__pyx_v_self->timer_args_to_replace);
  __Pyx_GIVEREF(__pyx_v_self->timer_args_to_replace);
  PyTuple_SET_ITEM(__pyx_t_3, 10, __pyx_v_self->timer_args_to_replace);
  __Pyx_INCREF(__pyx_v_self->timestamp_arg_name);
  __Pyx_GIVEREF(__pyx_v_self->timestamp_arg_name);
  PyTuple_SET_ITEM(__pyx_t_3, 11, __pyx_v_self->timestamp_arg_name);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 12, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_self->watermark_estimator_provider);
  __Pyx_GIVEREF(__pyx_v_self->watermark_estimator_provider);
  PyTuple_SET_ITEM(__pyx_t_3, 13, __pyx_v_self->watermark_estimator_provider);
  __Pyx_INCREF(__pyx_v_self->watermark_estimator_provider_arg_name);
  __Pyx_GIVEREF(__pyx_v_self->watermark_estimator_provider_arg_name);
  PyTuple_SET_ITEM(__pyx_t_3, 14, __pyx_v_self->watermark_estimator_provider_arg_name);
  __Pyx_INCREF(__pyx_v_self->window_arg_name);
  __Pyx_GIVEREF(__pyx_v_self->window_arg_name);
  PyTuple_SET_ITEM(__pyx_t_3, 15, __pyx_v_self->window_arg_name);
  __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:
 *         state += (_dict,)
 */
  __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_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:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_4 = (__pyx_v__dict != Py_None);
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         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);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict);
    __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:
 *         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:             # <<<<<<<<<<<<<<
 *         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), 0xed3c1c6, None), state
 */
  /*else*/ {
    __pyx_t_4 = (__pyx_v_self->args != Py_None);
    __pyx_t_6 = (__pyx_t_4 != 0);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (__pyx_v_self->defaults != Py_None);
    __pyx_t_4 = (__pyx_t_6 != 0);
    if (!__pyx_t_4) {
    } else {
      __pyx_t_5 = __pyx_t_4;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_4 = (__pyx_v_self->dynamic_timer_tag_arg_name != Py_None);
    __pyx_t_6 = (__pyx_t_4 != 0);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (__pyx_v_self->key_arg_name != Py_None);
    __pyx_t_4 = (__pyx_t_6 != 0);
    if (!__pyx_t_4) {
    } else {
      __pyx_t_5 = __pyx_t_4;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_4 = (__pyx_v_self->method_name != ((PyObject*)Py_None));
    __pyx_t_6 = (__pyx_t_4 != 0);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (__pyx_v_self->method_value != Py_None);
    __pyx_t_4 = (__pyx_t_6 != 0);
    if (!__pyx_t_4) {
    } else {
      __pyx_t_5 = __pyx_t_4;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_4 = (__pyx_v_self->restriction_provider != Py_None);
    __pyx_t_6 = (__pyx_t_4 != 0);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (__pyx_v_self->restriction_provider_arg_name != Py_None);
    __pyx_t_4 = (__pyx_t_6 != 0);
    if (!__pyx_t_4) {
    } else {
      __pyx_t_5 = __pyx_t_4;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_4 = (__pyx_v_self->state_args_to_replace != Py_None);
    __pyx_t_6 = (__pyx_t_4 != 0);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (__pyx_v_self->timer_args_to_replace != Py_None);
    __pyx_t_4 = (__pyx_t_6 != 0);
    if (!__pyx_t_4) {
    } else {
      __pyx_t_5 = __pyx_t_4;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_4 = (__pyx_v_self->timestamp_arg_name != Py_None);
    __pyx_t_6 = (__pyx_t_4 != 0);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (__pyx_v_self->watermark_estimator_provider != Py_None);
    __pyx_t_4 = (__pyx_t_6 != 0);
    if (!__pyx_t_4) {
    } else {
      __pyx_t_5 = __pyx_t_4;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_4 = (__pyx_v_self->watermark_estimator_provider_arg_name != Py_None);
    __pyx_t_6 = (__pyx_t_4 != 0);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (__pyx_v_self->window_arg_name != Py_None);
    __pyx_t_4 = (__pyx_t_6 != 0);
    __pyx_t_5 = __pyx_t_4;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_5;
  }
  __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), 0xed3c1c6, None), state
 *     else:
 */
  __pyx_t_5 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_5) {

    /* "(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), 0xed3c1c6, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_MethodWrapper, (type(self), 0xed3c1c6, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_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))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_248758726);
    __Pyx_GIVEREF(__pyx_int_248758726);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_248758726);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);
    __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);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __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), 0xed3c1c6, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_MethodWrapper, (type(self), 0xed3c1c6, None), state
 *     else:
 *         return __pyx_unpickle_MethodWrapper, (type(self), 0xed3c1c6, 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_n_s_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))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_248758726);
    __Pyx_GIVEREF(__pyx_int_248758726);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_248758726);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state);
    __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);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
    __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_MethodWrapper, (type(self), 0xed3c1c6, 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, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13MethodWrapper_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_7__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __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));

  /* function exit code */
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__14)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 16, 0, __PYX_ERR(1, 16, __pyx_L1_error));

  /* "(tree fragment)":17
 *         return __pyx_unpickle_MethodWrapper, (type(self), 0xed3c1c6, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_MethodWrapper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6common___pyx_unpickle_MethodWrapper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_MethodWrapper, (type(self), 0xed3c1c6, 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_AddTraceback("apache_beam.runners.common.MethodWrapper.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":251
 * 
 *   @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, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_18BatchingPreference_1supports_batches = {"supports_batches", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_18BatchingPreference_1supports_batches, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_18BatchingPreference_1supports_batches(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("supports_batches (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6common_18BatchingPreference_supports_batches(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __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_TraceDeclarations
  __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_TraceFrameInit(__pyx_codeobj__15)
  __Pyx_RefNannySetupContext("supports_batches", 0);
  __Pyx_TraceCall("supports_batches", __pyx_f[0], 251, 0, __PYX_ERR(0, 251, __pyx_L1_error));

  /* "apache_beam/runners/common.py":252
 *   @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_n_s_BATCH_REQUIRED); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 252, __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, 252, __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, 252, __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_n_s_DO_NOT_CARE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 252, __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, 252, __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, 252, __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, 252, __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
 * 
 *   @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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":255
 * 
 *   @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, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_18BatchingPreference_3supports_elements = {"supports_elements", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_18BatchingPreference_3supports_elements, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_18BatchingPreference_3supports_elements(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("supports_elements (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6common_18BatchingPreference_2supports_elements(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __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_TraceDeclarations
  __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_TraceFrameInit(__pyx_codeobj__16)
  __Pyx_RefNannySetupContext("supports_elements", 0);
  __Pyx_TraceCall("supports_elements", __pyx_f[0], 255, 0, __PYX_ERR(0, 255, __pyx_L1_error));

  /* "apache_beam/runners/common.py":256
 *   @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_n_s_BATCH_FORBIDDEN); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 256, __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, 256, __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, 256, __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_n_s_DO_NOT_CARE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 256, __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, 256, __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, 256, __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, 256, __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":255
 * 
 *   @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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":259
 * 
 *   @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, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_18BatchingPreference_5requires_batches = {"requires_batches", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_18BatchingPreference_5requires_batches, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_18BatchingPreference_5requires_batches(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("requires_batches (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6common_18BatchingPreference_4requires_batches(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __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_TraceDeclarations
  __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_TraceFrameInit(__pyx_codeobj__17)
  __Pyx_RefNannySetupContext("requires_batches", 0);
  __Pyx_TraceCall("requires_batches", __pyx_f[0], 259, 0, __PYX_ERR(0, 259, __pyx_L1_error));

  /* "apache_beam/runners/common.py":260
 *   @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_n_s_BATCH_REQUIRED); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 260, __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, 260, __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":259
 * 
 *   @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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":274
 *   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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_do_fn,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_do_fn)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 274, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_do_fn = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 274, __pyx_L3_error)
  __pyx_L3_error:;
  __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 */
  __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_TraceDeclarations
  __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)(PyObject *);
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 274, 0, __PYX_ERR(0, 274, __pyx_L1_error));

  /* "apache_beam/runners/common.py":278
 *     # 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_n_s_core); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 278, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 278, __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, 278, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!(__pyx_t_3 != 0))) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 278, __pyx_L1_error)
    }
  }
  #endif

  /* "apache_beam/runners/common.py":279
 * 
 *     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":281
 *     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_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_do_fn);
  __Pyx_GIVEREF(__pyx_v_do_fn);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_do_fn);
  __Pyx_INCREF(__pyx_n_u_process);
  __Pyx_GIVEREF(__pyx_n_u_process);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_u_process);
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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;

  /* "apache_beam/runners/common.py":282
 * 
 *     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 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_do_fn);
  __Pyx_GIVEREF(__pyx_v_do_fn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_do_fn);
  __Pyx_INCREF(__pyx_n_u_process_batch);
  __Pyx_GIVEREF(__pyx_n_u_process_batch);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_u_process_batch);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__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":283
 *     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_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_do_fn);
  __Pyx_GIVEREF(__pyx_v_do_fn);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_do_fn);
  __Pyx_INCREF(__pyx_n_u_start_bundle);
  __Pyx_GIVEREF(__pyx_n_u_start_bundle);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_u_start_bundle);
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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;

  /* "apache_beam/runners/common.py":284
 *     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 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_do_fn);
  __Pyx_GIVEREF(__pyx_v_do_fn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_do_fn);
  __Pyx_INCREF(__pyx_n_u_finish_bundle);
  __Pyx_GIVEREF(__pyx_n_u_finish_bundle);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_u_finish_bundle);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__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":285
 *     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_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_do_fn);
  __Pyx_GIVEREF(__pyx_v_do_fn);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_do_fn);
  __Pyx_INCREF(__pyx_n_u_setup);
  __Pyx_GIVEREF(__pyx_n_u_setup);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_u_setup);
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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;

  /* "apache_beam/runners/common.py":286
 *     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 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_do_fn);
  __Pyx_GIVEREF(__pyx_v_do_fn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_do_fn);
  __Pyx_INCREF(__pyx_n_u_teardown);
  __Pyx_GIVEREF(__pyx_n_u_teardown);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_u_teardown);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__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":288
 *     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 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_restriction_provider); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
  __Pyx_XDECREF(__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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_restriction_provider = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":289
 * 
 *     restriction_provider = self.get_restriction_provider()
 *     watermark_estimator_provider = self.get_watermark_estimator_provider()             # <<<<<<<<<<<<<<
 *     self.create_watermark_estimator_method = (
 *         MethodWrapper(
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_watermark_estimator_provider); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
  __Pyx_XDECREF(__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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_watermark_estimator_provider = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":291
 *     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_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_watermark_estimator_provider);
  __Pyx_GIVEREF(__pyx_v_watermark_estimator_provider);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_watermark_estimator_provider);
  __Pyx_INCREF(__pyx_n_u_create_watermark_estimator);
  __Pyx_GIVEREF(__pyx_n_u_create_watermark_estimator);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_u_create_watermark_estimator);
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":290
 *     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(__pyx_t_1);
  __Pyx_GOTREF(__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;

  /* "apache_beam/runners/common.py":295
 *     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, 295, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "apache_beam/runners/common.py":294
 *             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_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 294, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_restriction_provider);
    __Pyx_GIVEREF(__pyx_v_restriction_provider);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_restriction_provider);
    __Pyx_INCREF(__pyx_n_u_initial_restriction);
    __Pyx_GIVEREF(__pyx_n_u_initial_restriction);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_u_initial_restriction);
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper), __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 294, __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;
  } else {

    /* "apache_beam/runners/common.py":295
 *     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_1 = Py_None;
  }

  /* "apache_beam/runners/common.py":293
 *         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_1);
  __Pyx_GOTREF(__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;

  /* "apache_beam/runners/common.py":298
 *     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, 298, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "apache_beam/runners/common.py":297
 *         if restriction_provider else None)
 *     self.create_tracker_method = (
 *         MethodWrapper(restriction_provider, 'create_tracker')             # <<<<<<<<<<<<<<
 *         if restriction_provider else None)
 *     self.split_method = (
 */
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_restriction_provider);
    __Pyx_GIVEREF(__pyx_v_restriction_provider);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_restriction_provider);
    __Pyx_INCREF(__pyx_n_u_create_tracker);
    __Pyx_GIVEREF(__pyx_n_u_create_tracker);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_n_u_create_tracker);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper), __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {

    /* "apache_beam/runners/common.py":298
 *     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_1 = Py_None;
  }

  /* "apache_beam/runners/common.py":296
 *         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_1);
  __Pyx_GOTREF(__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;

  /* "apache_beam/runners/common.py":301
 *     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, 301, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "apache_beam/runners/common.py":300
 *         if restriction_provider else None)
 *     self.split_method = (
 *         MethodWrapper(restriction_provider, 'split')             # <<<<<<<<<<<<<<
 *         if restriction_provider else None)
 * 
 */
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 300, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_restriction_provider);
    __Pyx_GIVEREF(__pyx_v_restriction_provider);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_restriction_provider);
    __Pyx_INCREF(__pyx_n_u_split);
    __Pyx_GIVEREF(__pyx_n_u_split);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_u_split);
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper), __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 300, __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;
  } else {

    /* "apache_beam/runners/common.py":301
 *     self.split_method = (
 *         MethodWrapper(restriction_provider, 'split')
 *         if restriction_provider else None)             # <<<<<<<<<<<<<<
 * 
 *     self._validate()
 */
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }

  /* "apache_beam/runners/common.py":299
 *         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_1);
  __Pyx_GOTREF(__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;

  /* "apache_beam/runners/common.py":303
 *         if restriction_provider else None)
 * 
 *     self._validate()             # <<<<<<<<<<<<<<
 * 
 *     # Handle stateful DoFns.
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_validate); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __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/common.py":306
 * 
 *     # 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_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_userstate); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_is_stateful_dofn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v_do_fn) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_do_fn);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 306, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->_is_stateful_dofn = __pyx_t_3;

  /* "apache_beam/runners/common.py":307
 *     # 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_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->timer_methods);
  __Pyx_DECREF(__pyx_v_self->timer_methods);
  __pyx_v_self->timer_methods = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":308
 *     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)
 */
  __pyx_t_3 = (__pyx_v_self->_is_stateful_dofn != 0);
  if (__pyx_t_3) {

    /* "apache_beam/runners/common.py":310
 *     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_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_userstate); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 310, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get_dofn_specs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 310, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, __pyx_v_do_fn) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_do_fn);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 310, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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, 310, __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_t_2 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      #else
      __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 310, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 310, __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_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 310, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
      index = 0; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      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, 310, __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, 310, __pyx_L1_error)
      __pyx_L5_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":311
 *       # 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_1 = __pyx_v_all_timer_specs; __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_all_timer_specs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 311, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 311, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_8)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 311, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 311, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 311, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 311, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_8(__pyx_t_1);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 311, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_timer_spec, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "apache_beam/runners/common.py":312
 *       _, 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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_timer_spec, __pyx_n_s_attached_callback); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 312, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_XDECREF_SET(__pyx_v_method, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "apache_beam/runners/common.py":313
 *       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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_method, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 313, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 313, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_do_fn);
      __Pyx_GIVEREF(__pyx_v_do_fn);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_do_fn);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper), __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 313, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(PyObject_SetItem(__pyx_v_self->timer_methods, __pyx_v_timer_spec, __pyx_t_2) < 0)) __PYX_ERR(0, 313, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "apache_beam/runners/common.py":311
 *       # 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_1); __pyx_t_1 = 0;

    /* "apache_beam/runners/common.py":308
 *     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":274
 *   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_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":315
 *         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, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_3get_restriction_provider = {"get_restriction_provider", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_3get_restriction_provider, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_3get_restriction_provider(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_restriction_provider (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__18)
  __Pyx_RefNannySetupContext("get_restriction_provider", 0);
  __Pyx_TraceCall("get_restriction_provider", __pyx_f[0], 315, 0, __PYX_ERR(0, 315, __pyx_L1_error));

  /* "apache_beam/runners/common.py":317
 *   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":315
 *         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_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.get_restriction_provider", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":319
 *     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, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_5get_watermark_estimator_provider = {"get_watermark_estimator_provider", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_5get_watermark_estimator_provider, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_5get_watermark_estimator_provider(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_watermark_estimator_provider (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__19)
  __Pyx_RefNannySetupContext("get_watermark_estimator_provider", 0);
  __Pyx_TraceCall("get_watermark_estimator_provider", __pyx_f[0], 319, 0, __PYX_ERR(0, 319, __pyx_L1_error));

  /* "apache_beam/runners/common.py":321
 *   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":319
 *     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_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.get_watermark_estimator_provider", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":323
 *     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, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_7is_unbounded_per_element = {"is_unbounded_per_element", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_7is_unbounded_per_element, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_7is_unbounded_per_element(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_unbounded_per_element (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__20)
  __Pyx_RefNannySetupContext("is_unbounded_per_element", 0);
  __Pyx_TraceCall("is_unbounded_per_element", __pyx_f[0], 323, 0, __PYX_ERR(0, 323, __pyx_L1_error));

  /* "apache_beam/runners/common.py":324
 * 
 *   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, 324, __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":323
 *     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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":326
 *     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, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_9_validate = {"_validate", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_9_validate, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_9_validate(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_validate (wrapper)", 0);
  __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_TraceDeclarations
  __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_TraceFrameInit(__pyx_codeobj__21)
  __Pyx_RefNannySetupContext("_validate", 0);
  __Pyx_TraceCall("_validate", __pyx_f[0], 326, 0, __PYX_ERR(0, 326, __pyx_L1_error));

  /* "apache_beam/runners/common.py":328
 *   def _validate(self):
 *     # type: () -> None
 *     self._validate_process()             # <<<<<<<<<<<<<<
 *     self._validate_process_batch()
 *     self._validate_bundle_method(self.start_bundle_method)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_validate_process); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 328, __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/common.py":329
 *     # 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 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_validate_process_batch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":330
 *     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 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_validate_bundle_method); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_self->start_bundle_method)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_self->start_bundle_method));
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 330, __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/common.py":331
 *     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 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_validate_bundle_method); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_self->finish_bundle_method)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_self->finish_bundle_method));
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 331, __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/common.py":332
 *     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 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_validate_stateful_dofn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__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_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":326
 *     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_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature._validate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":334
 *     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, PyObject *__pyx_v_method); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_11_check_duplicate_dofn_params = {"_check_duplicate_dofn_params", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_11_check_duplicate_dofn_params, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_11_check_duplicate_dofn_params(PyObject *__pyx_v_self, PyObject *__pyx_v_method) {
  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 (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_method), __pyx_ptype_11apache_beam_7runners_6common_MethodWrapper, 1, "method", 0))) __PYX_ERR(0, 334, __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), ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_v_method));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __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_TraceDeclarations
  __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;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_UCS4 __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__22)
  __Pyx_RefNannySetupContext("_check_duplicate_dofn_params", 0);
  __Pyx_TraceCall("_check_duplicate_dofn_params", __pyx_f[0], 334, 0, __PYX_ERR(0, 334, __pyx_L1_error));

  /* "apache_beam/runners/common.py":335
 * 
 *   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, 335, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "apache_beam/runners/common.py":336
 *   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, 336, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 336, __pyx_L5_error)
    }
    for (;;) {
      if (likely(!__pyx_t_4)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 336, __pyx_L5_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 336, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 336, __pyx_L5_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 336, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_4(__pyx_t_2);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 336, __pyx_L5_error)
          }
          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_n_s_core); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 336, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_DoFnParam); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 336, __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, 336, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_8 = (__pyx_t_7 != 0);
      if (__pyx_t_8) {
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_7genexpr__pyx_v_d, __pyx_n_s_param_id); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 336, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 335, __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_L9_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_7genexpr__pyx_v_d); __pyx_7genexpr__pyx_v_d = 0;
    goto __pyx_L1_error;
    __pyx_L9_exit_scope:;
  } /* exit inner scope */
  __pyx_v_param_ids = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":338
 *         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 = PyList_GET_SIZE(__pyx_v_param_ids); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 338, __pyx_L1_error)
  __pyx_t_1 = PySet_New(__pyx_v_param_ids); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = PySet_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 338, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = ((__pyx_t_3 != __pyx_t_9) != 0);
  if (unlikely(__pyx_t_8)) {

    /* "apache_beam/runners/common.py":340
 *     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_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = 0;
    __pyx_t_10 = 127;
    __Pyx_INCREF(__pyx_kp_u_DoFn_2);
    __pyx_t_9 += 5;
    __Pyx_GIVEREF(__pyx_kp_u_DoFn_2);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_DoFn_2);

    /* "apache_beam/runners/common.py":341
 *       raise ValueError(
 *           'DoFn %r has duplicate %s method parameters: %s.' %
 *           (self.do_fn, method.method_name, param_ids))             # <<<<<<<<<<<<<<
 * 
 *   def _validate_process(self):
 */
    __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_self->do_fn), __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_10;
    __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_kp_u_has_duplicate);
    __pyx_t_9 += 15;
    __Pyx_GIVEREF(__pyx_kp_u_has_duplicate);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_has_duplicate);
    __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_method->method_name), __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_10;
    __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_kp_u_method_parameters);
    __pyx_t_9 += 20;
    __Pyx_GIVEREF(__pyx_kp_u_method_parameters);
    PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u_method_parameters);
    __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_param_ids), __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_10;
    __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_kp_u__23);
    __pyx_t_9 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__23);
    PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__23);

    /* "apache_beam/runners/common.py":340
 *     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 = __Pyx_PyUnicode_Join(__pyx_t_1, 7, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/runners/common.py":339
 *     ]
 *     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_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 339, __pyx_L1_error)

    /* "apache_beam/runners/common.py":338
 *         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":334
 *     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_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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":343
 *           (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, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __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)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_13_validate_process, METH_NOARGS, __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, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_validate_process (wrapper)", 0);
  __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_TraceDeclarations
  __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_TraceFrameInit(__pyx_codeobj__24)
  __Pyx_RefNannySetupContext("_validate_process", 0);
  __Pyx_TraceCall("_validate_process", __pyx_f[0], 343, 0, __PYX_ERR(0, 343, __pyx_L1_error));

  /* "apache_beam/runners/common.py":348
 *     """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 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_duplicate_dofn_params); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_self->process_method)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_self->process_method));
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 348, __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/common.py":343
 *           (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_XDECREF(__pyx_t_3);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":350
 *     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, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_15_validate_process_batch = {"_validate_process_batch", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_15_validate_process_batch, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_15_validate_process_batch(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_validate_process_batch (wrapper)", 0);
  __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_TraceDeclarations
  __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)(PyObject *);
  int __pyx_t_6;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_UCS4 __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__25)
  __Pyx_RefNannySetupContext("_validate_process_batch", 0);
  __Pyx_TraceCall("_validate_process_batch", __pyx_f[0], 350, 0, __PYX_ERR(0, 350, __pyx_L1_error));

  /* "apache_beam/runners/common.py":352
 *   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 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_duplicate_dofn_params); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_self->process_batch_method)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_self->process_batch_method));
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 352, __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/common.py":354
 *     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, 354, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 354, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 354, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 354, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 354, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 354, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_5(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 354, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_d, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "apache_beam/runners/common.py":355
 * 
 *     for d in self.process_batch_method.defaults:
 *       if not isinstance(d, core._DoFnParam):             # <<<<<<<<<<<<<<
 *         continue
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_core); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 355, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_DoFnParam); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 355, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_6 = PyObject_IsInstance(__pyx_v_d, __pyx_t_3); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 355, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = ((!(__pyx_t_6 != 0)) != 0);
    if (__pyx_t_7) {

      /* "apache_beam/runners/common.py":356
 *     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":355
 * 
 *     for d in self.process_batch_method.defaults:
 *       if not isinstance(d, core._DoFnParam):             # <<<<<<<<<<<<<<
 *         continue
 * 
 */
    }

    /* "apache_beam/runners/common.py":359
 * 
 *       # 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_3, __pyx_n_s_core); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 359, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 359, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ElementParam); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 359, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_d, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 359, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 359, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(__pyx_t_7)) {

      /* "apache_beam/runners/common.py":363
 *         # 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_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 363, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_8 = 0;
      __pyx_t_9 = 127;
      __Pyx_INCREF(__pyx_kp_u_DoFn_2);
      __pyx_t_8 += 5;
      __Pyx_GIVEREF(__pyx_kp_u_DoFn_2);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_DoFn_2);
      __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_self->do_fn), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 363, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_9;
      __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_INCREF(__pyx_kp_u_uses_unsupported_DoFn_param_Ele);
      __pyx_t_8 += 42;
      __Pyx_GIVEREF(__pyx_kp_u_uses_unsupported_DoFn_param_Ele);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_uses_unsupported_DoFn_param_Ele);
      __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 363, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "apache_beam/runners/common.py":362
 *         # 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_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_NotImplementedError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 362, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 362, __pyx_L1_error)

      /* "apache_beam/runners/common.py":359
 * 
 *       # 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":365
 *             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_3, __pyx_n_s_core); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 365, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 365, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_KeyParam); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 365, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 365, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 365, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (!__pyx_t_6) {
    } else {
      __pyx_t_7 = __pyx_t_6;
      goto __pyx_L8_bool_binop_done;
    }
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_core); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 365, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 365, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_StateParam); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 365, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_10, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 365, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 365, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!__pyx_t_6) {
    } else {
      __pyx_t_7 = __pyx_t_6;
      goto __pyx_L8_bool_binop_done;
    }
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_core); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 365, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 365, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_TimerParam); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 365, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 365, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 365, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_7 = __pyx_t_6;
    __pyx_L8_bool_binop_done:;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_6 = (__pyx_t_7 != 0);
    if (unlikely(__pyx_t_6)) {

      /* "apache_beam/runners/common.py":367
 *       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_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 367, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_8 = 0;
      __pyx_t_9 = 127;
      __Pyx_INCREF(__pyx_kp_u_DoFn_2);
      __pyx_t_8 += 5;
      __Pyx_GIVEREF(__pyx_kp_u_DoFn_2);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_DoFn_2);
      __pyx_t_10 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_self->do_fn), __pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 367, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) : __pyx_t_9;
      __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_10);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_10);
      __pyx_t_10 = 0;
      __Pyx_INCREF(__pyx_kp_u_has_unsupported_per_key_DoFn_pa);
      __pyx_t_8 += 36;
      __Pyx_GIVEREF(__pyx_kp_u_has_unsupported_per_key_DoFn_pa);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_has_unsupported_per_key_DoFn_pa);
      __pyx_t_10 = __Pyx_PyObject_FormatSimple(__pyx_v_d, __pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 367, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) : __pyx_t_9;
      __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_10);
      PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_10);
      __pyx_t_10 = 0;
      __Pyx_INCREF(__pyx_kp_u_Per_key_DoFn_params_are_not_yet);
      __pyx_t_8 += 108;
      __Pyx_GIVEREF(__pyx_kp_u_Per_key_DoFn_params_are_not_yet);
      PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u_Per_key_DoFn_params_are_not_yet);
      __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_2, 5, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 367, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "apache_beam/runners/common.py":366
 * 
 *       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_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_NotImplementedError, __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 366, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 366, __pyx_L1_error)

      /* "apache_beam/runners/common.py":365
 *             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":372
 * 
 *       # 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_10, __pyx_n_s_core); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_WindowParam); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_10, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 372, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 372, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_7) {
    } else {
      __pyx_t_6 = __pyx_t_7;
      goto __pyx_L12_bool_binop_done;
    }

    /* "apache_beam/runners/common.py":373
 *       # 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_3, __pyx_n_s_core); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_TimestampParam); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 372, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "apache_beam/runners/common.py":372
 * 
 *       # Fallback to catch anything not explicitly supported
 *       if not d in (core.DoFn.WindowParam,             # <<<<<<<<<<<<<<
 *                    core.DoFn.TimestampParam,
 *                    core.DoFn.PaneInfoParam):
 */
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 372, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (__pyx_t_7) {
    } else {
      __pyx_t_6 = __pyx_t_7;
      goto __pyx_L12_bool_binop_done;
    }

    /* "apache_beam/runners/common.py":374
 *       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_10, __pyx_n_s_core); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 374, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 374, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_PaneInfoParam); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 374, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_10, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 372, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "apache_beam/runners/common.py":372
 * 
 *       # Fallback to catch anything not explicitly supported
 *       if not d in (core.DoFn.WindowParam,             # <<<<<<<<<<<<<<
 *                    core.DoFn.TimestampParam,
 *                    core.DoFn.PaneInfoParam):
 */
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 372, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = __pyx_t_7;
    __pyx_L12_bool_binop_done:;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_7 = (__pyx_t_6 != 0);
    if (unlikely(__pyx_t_7)) {

      /* "apache_beam/runners/common.py":376
 *                    core.DoFn.PaneInfoParam):
 *         raise ValueError(
 *             f"DoFn {self.do_fn!r} has unsupported process_batch "             # <<<<<<<<<<<<<<
 *             f"method parameter {d}")
 * 
 */
      __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 376, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_8 = 0;
      __pyx_t_9 = 127;
      __Pyx_INCREF(__pyx_kp_u_DoFn_2);
      __pyx_t_8 += 5;
      __Pyx_GIVEREF(__pyx_kp_u_DoFn_2);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_DoFn_2);
      __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_self->do_fn), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 376, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_9;
      __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_INCREF(__pyx_kp_u_has_unsupported_process_batch_m);
      __pyx_t_8 += 48;
      __Pyx_GIVEREF(__pyx_kp_u_has_unsupported_process_batch_m);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_has_unsupported_process_batch_m);

      /* "apache_beam/runners/common.py":377
 *         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_3 = __Pyx_PyObject_FormatSimple(__pyx_v_d, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 377, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_9;
      __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "apache_beam/runners/common.py":376
 *                    core.DoFn.PaneInfoParam):
 *         raise ValueError(
 *             f"DoFn {self.do_fn!r} has unsupported process_batch "             # <<<<<<<<<<<<<<
 *             f"method parameter {d}")
 * 
 */
      __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_2, 4, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 376, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "apache_beam/runners/common.py":375
 *                    core.DoFn.TimestampParam,
 *                    core.DoFn.PaneInfoParam):
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             f"DoFn {self.do_fn!r} has unsupported process_batch "
 *             f"method parameter {d}")
 */
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); 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_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 375, __pyx_L1_error)

      /* "apache_beam/runners/common.py":372
 * 
 *       # 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":354
 *     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":350
 *     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_3);
  __Pyx_XDECREF(__pyx_t_10);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":379
 *             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, PyObject *__pyx_v_method_wrapper); /*proto*/
static char __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)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_17_validate_bundle_method, METH_O, __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, PyObject *__pyx_v_method_wrapper) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_validate_bundle_method (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_16_validate_bundle_method(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self), ((PyObject *)__pyx_v_method_wrapper));

  /* function exit code */
  __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_TraceDeclarations
  __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;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_UCS4 __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__26)
  __Pyx_RefNannySetupContext("_validate_bundle_method", 0);
  __Pyx_TraceCall("_validate_bundle_method", __pyx_f[0], 379, 0, __PYX_ERR(0, 379, __pyx_L1_error));

  /* "apache_beam/runners/common.py":382
 *     """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_n_s_core); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 382, __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_n_s_DoFnProcessParams); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 382, __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, 382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 382, __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))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 382, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 382, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 382, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 382, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 382, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_param, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "apache_beam/runners/common.py":383
 *     """
 *     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_n_s_defaults); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 383, __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, 383, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = (__pyx_t_5 != 0);
    if (unlikely(__pyx_t_6)) {

      /* "apache_beam/runners/common.py":385
 *       if param in method_wrapper.defaults:
 *         raise ValueError(
 *             'DoFn.process() method-only parameter %s cannot be used in %s.' %             # <<<<<<<<<<<<<<
 *             (param, method_wrapper))
 * 
 */
      __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 385, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = 0;
      __pyx_t_8 = 127;
      __Pyx_INCREF(__pyx_kp_u_DoFn_process_method_only_paramet);
      __pyx_t_7 += 37;
      __Pyx_GIVEREF(__pyx_kp_u_DoFn_process_method_only_paramet);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_DoFn_process_method_only_paramet);

      /* "apache_beam/runners/common.py":386
 *         raise ValueError(
 *             'DoFn.process() method-only parameter %s cannot be used in %s.' %
 *             (param, method_wrapper))             # <<<<<<<<<<<<<<
 * 
 *   def _validate_stateful_dofn(self):
 */
      __pyx_t_9 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_param), __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 386, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
      __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_9);
      __pyx_t_9 = 0;
      __Pyx_INCREF(__pyx_kp_u_cannot_be_used_in);
      __pyx_t_7 += 19;
      __Pyx_GIVEREF(__pyx_kp_u_cannot_be_used_in);
      PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_cannot_be_used_in);
      __pyx_t_9 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_method_wrapper), __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 386, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
      __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_9);
      __pyx_t_9 = 0;
      __Pyx_INCREF(__pyx_kp_u__23);
      __pyx_t_7 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__23);
      PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__23);

      /* "apache_beam/runners/common.py":385
 *       if param in method_wrapper.defaults:
 *         raise ValueError(
 *             'DoFn.process() method-only parameter %s cannot be used in %s.' %             # <<<<<<<<<<<<<<
 *             (param, method_wrapper))
 * 
 */
      __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 385, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "apache_beam/runners/common.py":384
 *     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_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 384, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 384, __pyx_L1_error)

      /* "apache_beam/runners/common.py":383
 *     """
 *     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":382
 *     """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":379
 *             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_9);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":388
 *             (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, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_19_validate_stateful_dofn = {"_validate_stateful_dofn", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_19_validate_stateful_dofn, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_19_validate_stateful_dofn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_validate_stateful_dofn (wrapper)", 0);
  __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_TraceDeclarations
  __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_TraceFrameInit(__pyx_codeobj__27)
  __Pyx_RefNannySetupContext("_validate_stateful_dofn", 0);
  __Pyx_TraceCall("_validate_stateful_dofn", __pyx_f[0], 388, 0, __PYX_ERR(0, 388, __pyx_L1_error));

  /* "apache_beam/runners/common.py":390
 *   def _validate_stateful_dofn(self):
 *     # type: () -> None
 *     userstate.validate_stateful_dofn(self.do_fn)             # <<<<<<<<<<<<<<
 * 
 *   def is_splittable_dofn(self):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_userstate); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_validate_stateful_dofn_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_self->do_fn) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_self->do_fn);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 390, __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;

  /* "apache_beam/runners/common.py":388
 *             (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_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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":392
 *     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, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_21is_splittable_dofn = {"is_splittable_dofn", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_21is_splittable_dofn, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_21is_splittable_dofn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_splittable_dofn (wrapper)", 0);
  __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_TraceDeclarations
  __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_TraceFrameInit(__pyx_codeobj__28)
  __Pyx_RefNannySetupContext("is_splittable_dofn", 0);
  __Pyx_TraceCall("is_splittable_dofn", __pyx_f[0], 392, 0, __PYX_ERR(0, 392, __pyx_L1_error));

  /* "apache_beam/runners/common.py":394
 *   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 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_restriction_provider); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __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, 394, __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":392
 *     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_XDECREF(__pyx_t_3);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":396
 *     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, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __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)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_23get_restriction_coder, METH_NOARGS, __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, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_restriction_coder (wrapper)", 0);
  __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_TraceDeclarations
  __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__29)
  __Pyx_RefNannySetupContext("get_restriction_coder", 0);
  __Pyx_TraceCall("get_restriction_coder", __pyx_f[0], 396, 0, __PYX_ERR(0, 396, __pyx_L1_error));

  /* "apache_beam/runners/common.py":400
 * 
 *     """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 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_splittable_dofn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __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, 400, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "apache_beam/runners/common.py":401
 *     """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_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_TupleCoder); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 401, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "apache_beam/runners/common.py":402
 *     if self.is_splittable_dofn():
 *       return TupleCoder([
 *           (self.get_restriction_provider().restriction_coder()),             # <<<<<<<<<<<<<<
 *           (self.get_watermark_estimator_provider().estimator_state_coder())
 *       ])
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_restriction_provider); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 402, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 402, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_restriction_coder); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 402, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 402, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "apache_beam/runners/common.py":403
 *       return TupleCoder([
 *           (self.get_restriction_provider().restriction_coder()),
 *           (self.get_watermark_estimator_provider().estimator_state_coder())             # <<<<<<<<<<<<<<
 *       ])
 *     else:
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_watermark_estimator_provider); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 403, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 403, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_estimator_state_coder); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 403, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_6 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 403, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "apache_beam/runners/common.py":401
 *     """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_7 = PyList_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 401, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_3);
    PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_6);
    PyList_SET_ITEM(__pyx_t_7, 1, __pyx_t_6);
    __pyx_t_3 = 0;
    __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 401, __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/common.py":400
 * 
 *     """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":406
 *       ])
 *     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":396
 *     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_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":408
 *       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, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_25is_stateful_dofn = {"is_stateful_dofn", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_25is_stateful_dofn, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_25is_stateful_dofn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_stateful_dofn (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__30)
  __Pyx_RefNannySetupContext("is_stateful_dofn", 0);
  __Pyx_TraceCall("is_stateful_dofn", __pyx_f[0], 408, 0, __PYX_ERR(0, 408, __pyx_L1_error));

  /* "apache_beam/runners/common.py":410
 *   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, 410, __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":408
 *       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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":412
 *     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, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_27has_timers = {"has_timers", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_27has_timers, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_27has_timers(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("has_timers (wrapper)", 0);
  __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_TraceDeclarations
  __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 *);
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__31)
  __Pyx_RefNannySetupContext("has_timers", 0);
  __Pyx_TraceCall("has_timers", __pyx_f[0], 412, 0, __PYX_ERR(0, 412, __pyx_L1_error));

  /* "apache_beam/runners/common.py":414
 *   def has_timers(self):
 *     # type: () -> bool
 *     _, all_timer_specs = userstate.get_dofn_specs(self.do_fn)             # <<<<<<<<<<<<<<
 *     return bool(all_timer_specs)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_userstate); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get_dofn_specs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_self->do_fn) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_self->do_fn);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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, 414, __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_t_2 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    #else
    __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 414, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 414, __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_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 414, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 1; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 414, __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, 414, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v__ = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_v_all_timer_specs = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":415
 *     # 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_6 = __Pyx_PyObject_IsTrue(__pyx_v_all_timer_specs); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 415, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 415, __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":412
 *     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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":417
 *     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, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_29has_bundle_finalization = {"has_bundle_finalization", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_29has_bundle_finalization, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_29has_bundle_finalization(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("has_bundle_finalization (wrapper)", 0);
  __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_TraceDeclarations
  __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_TraceFrameInit(__pyx_codeobj__32)
  __Pyx_RefNannySetupContext("has_bundle_finalization", 0);
  __Pyx_TraceCall("has_bundle_finalization", __pyx_f[0], 417, 0, __PYX_ERR(0, 417, __pyx_L1_error));

  /* "apache_beam/runners/common.py":418
 * 
 *   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, 418, __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));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->start_bundle_method));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->process_method));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->process_method));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self->process_method));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->finish_bundle_method));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->finish_bundle_method));
  PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_self->finish_bundle_method));
  __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 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 418, __pyx_L1_error)
    #else
    __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 418, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    #endif
    __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":421
 *                 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, 421, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 421, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 421, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 421, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 421, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 421, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_5(__pyx_t_1);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 421, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_d, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "apache_beam/runners/common.py":422
 *                 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":423
 *       for d in sig.defaults:
 *         try:
 *           if d == DoFn.BundleFinalizerParam:             # <<<<<<<<<<<<<<
 *             return True
 *         except Exception:  # pylint: disable=broad-except
 */
          __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 423, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_BundleFinalizerParam); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 423, __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, 423, __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, 423, __pyx_L7_error)
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (__pyx_t_11) {

            /* "apache_beam/runners/common.py":424
 *         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":423
 *       for d in sig.defaults:
 *         try:
 *           if d == DoFn.BundleFinalizerParam:             # <<<<<<<<<<<<<<
 *             return True
 *         except Exception:  # pylint: disable=broad-except
 */
          }

          /* "apache_beam/runners/common.py":422
 *                 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":425
 *           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)[0])));
        if (__pyx_t_12) {
          __Pyx_ErrRestore(0,0,0);
          goto __pyx_L8_exception_handled;
        }
        goto __pyx_L9_except_error;
        __pyx_L9_except_error:;

        /* "apache_beam/runners/common.py":422
 *                 self.finish_bundle_method):
 *       for d in sig.defaults:
 *         try:             # <<<<<<<<<<<<<<
 *           if d == DoFn.BundleFinalizerParam:
 *             return True
 */
        __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":421
 *                 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":418
 * 
 *   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":428
 *           # Default value might be incomparable.
 *           pass
 *     return False             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

  /* "apache_beam/runners/common.py":417
 *     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_TraceReturn(__pyx_r, 0);
  __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) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[2], 56, 0, __PYX_ERR(2, 56, __pyx_L1_error));
  __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_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.process_method.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __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_TraceDeclarations
  __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_TraceCall("__set__", __pyx_f[2], 56, 0, __PYX_ERR(2, 56, __pyx_L1_error));
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(2, 56, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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_TraceReturn(Py_None, 0);
  __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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[2], 56, 0, __PYX_ERR(2, 56, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__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;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.process_method.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 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) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[2], 57, 0, __PYX_ERR(2, 57, __pyx_L1_error));
  __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_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.process_batch_method.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __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_TraceDeclarations
  __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_TraceCall("__set__", __pyx_f[2], 57, 0, __PYX_ERR(2, 57, __pyx_L1_error));
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(2, 57, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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_TraceReturn(Py_None, 0);
  __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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[2], 57, 0, __PYX_ERR(2, 57, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__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;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.process_batch_method.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 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) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[2], 58, 0, __PYX_ERR(2, 58, __pyx_L1_error));
  __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_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.start_bundle_method.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __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_TraceDeclarations
  __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_TraceCall("__set__", __pyx_f[2], 58, 0, __PYX_ERR(2, 58, __pyx_L1_error));
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(2, 58, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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_TraceReturn(Py_None, 0);
  __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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[2], 58, 0, __PYX_ERR(2, 58, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__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;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.start_bundle_method.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 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) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[2], 59, 0, __PYX_ERR(2, 59, __pyx_L1_error));
  __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_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.finish_bundle_method.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __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_TraceDeclarations
  __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_TraceCall("__set__", __pyx_f[2], 59, 0, __PYX_ERR(2, 59, __pyx_L1_error));
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(2, 59, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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_TraceReturn(Py_None, 0);
  __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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[2], 59, 0, __PYX_ERR(2, 59, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__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;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.finish_bundle_method.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 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) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[2], 60, 0, __PYX_ERR(2, 60, __pyx_L1_error));
  __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_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.setup_lifecycle_method.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __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_TraceDeclarations
  __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_TraceCall("__set__", __pyx_f[2], 60, 0, __PYX_ERR(2, 60, __pyx_L1_error));
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(2, 60, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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_TraceReturn(Py_None, 0);
  __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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[2], 60, 0, __PYX_ERR(2, 60, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__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;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.setup_lifecycle_method.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 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) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[2], 61, 0, __PYX_ERR(2, 61, __pyx_L1_error));
  __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_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.teardown_lifecycle_method.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __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_TraceDeclarations
  __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_TraceCall("__set__", __pyx_f[2], 61, 0, __PYX_ERR(2, 61, __pyx_L1_error));
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(2, 61, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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_TraceReturn(Py_None, 0);
  __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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[2], 61, 0, __PYX_ERR(2, 61, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__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;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.teardown_lifecycle_method.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 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) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[2], 62, 0, __PYX_ERR(2, 62, __pyx_L1_error));
  __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_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.create_watermark_estimator_method.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __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_TraceDeclarations
  __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_TraceCall("__set__", __pyx_f[2], 62, 0, __PYX_ERR(2, 62, __pyx_L1_error));
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(2, 62, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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_TraceReturn(Py_None, 0);
  __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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[2], 62, 0, __PYX_ERR(2, 62, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__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;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.create_watermark_estimator_method.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 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) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[2], 63, 0, __PYX_ERR(2, 63, __pyx_L1_error));
  __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_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.initial_restriction_method.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __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_TraceDeclarations
  __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_TraceCall("__set__", __pyx_f[2], 63, 0, __PYX_ERR(2, 63, __pyx_L1_error));
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(2, 63, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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_TraceReturn(Py_None, 0);
  __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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[2], 63, 0, __PYX_ERR(2, 63, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__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;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.initial_restriction_method.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 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) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[2], 64, 0, __PYX_ERR(2, 64, __pyx_L1_error));
  __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_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.create_tracker_method.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __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_TraceDeclarations
  __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_TraceCall("__set__", __pyx_f[2], 64, 0, __PYX_ERR(2, 64, __pyx_L1_error));
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(2, 64, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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_TraceReturn(Py_None, 0);
  __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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[2], 64, 0, __PYX_ERR(2, 64, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__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;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.create_tracker_method.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 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) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[2], 65, 0, __PYX_ERR(2, 65, __pyx_L1_error));
  __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_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.split_method.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __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_TraceDeclarations
  __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_TraceCall("__set__", __pyx_f[2], 65, 0, __PYX_ERR(2, 65, __pyx_L1_error));
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(2, 65, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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_TraceReturn(Py_None, 0);
  __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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[2], 65, 0, __PYX_ERR(2, 65, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__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;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.split_method.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 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) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[2], 66, 0, __PYX_ERR(2, 66, __pyx_L1_error));
  __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_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.batching_configuration.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[2], 66, 0, __PYX_ERR(2, 66, __pyx_L1_error));
  __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;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.batching_configuration.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[2], 66, 0, __PYX_ERR(2, 66, __pyx_L1_error));
  __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;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.batching_configuration.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 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) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[2], 67, 0, __PYX_ERR(2, 67, __pyx_L1_error));
  __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_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.do_fn.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[2], 67, 0, __PYX_ERR(2, 67, __pyx_L1_error));
  __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;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.do_fn.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[2], 67, 0, __PYX_ERR(2, 67, __pyx_L1_error));
  __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;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.do_fn.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 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) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[2], 68, 0, __PYX_ERR(2, 68, __pyx_L1_error));
  __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_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.timer_methods.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[2], 68, 0, __PYX_ERR(2, 68, __pyx_L1_error));
  __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;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.timer_methods.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[2], 68, 0, __PYX_ERR(2, 68, __pyx_L1_error));
  __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;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.timer_methods.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 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_31__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_31__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_31__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_31__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_30__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_30__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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__33)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(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:
 */
  __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);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->batching_configuration);
  __Pyx_GIVEREF(__pyx_v_self->batching_configuration);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->batching_configuration);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->create_tracker_method));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->create_tracker_method));
  PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_v_self->create_tracker_method));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->create_watermark_estimator_method));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->create_watermark_estimator_method));
  PyTuple_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_v_self->create_watermark_estimator_method));
  __Pyx_INCREF(__pyx_v_self->do_fn);
  __Pyx_GIVEREF(__pyx_v_self->do_fn);
  PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_self->do_fn);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->finish_bundle_method));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->finish_bundle_method));
  PyTuple_SET_ITEM(__pyx_t_2, 5, ((PyObject *)__pyx_v_self->finish_bundle_method));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->initial_restriction_method));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->initial_restriction_method));
  PyTuple_SET_ITEM(__pyx_t_2, 6, ((PyObject *)__pyx_v_self->initial_restriction_method));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->process_batch_method));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->process_batch_method));
  PyTuple_SET_ITEM(__pyx_t_2, 7, ((PyObject *)__pyx_v_self->process_batch_method));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->process_method));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->process_method));
  PyTuple_SET_ITEM(__pyx_t_2, 8, ((PyObject *)__pyx_v_self->process_method));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->setup_lifecycle_method));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->setup_lifecycle_method));
  PyTuple_SET_ITEM(__pyx_t_2, 9, ((PyObject *)__pyx_v_self->setup_lifecycle_method));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->split_method));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->split_method));
  PyTuple_SET_ITEM(__pyx_t_2, 10, ((PyObject *)__pyx_v_self->split_method));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->start_bundle_method));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->start_bundle_method));
  PyTuple_SET_ITEM(__pyx_t_2, 11, ((PyObject *)__pyx_v_self->start_bundle_method));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->teardown_lifecycle_method));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->teardown_lifecycle_method));
  PyTuple_SET_ITEM(__pyx_t_2, 12, ((PyObject *)__pyx_v_self->teardown_lifecycle_method));
  __Pyx_INCREF(__pyx_v_self->timer_methods);
  __Pyx_GIVEREF(__pyx_v_self->timer_methods);
  PyTuple_SET_ITEM(__pyx_t_2, 13, __pyx_v_self->timer_methods);
  __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:
 *         state += (_dict,)
 */
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_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:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         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);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
    __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:
 *         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:             # <<<<<<<<<<<<<<
 *         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), 0x87afe8e, None), state
 */
  /*else*/ {
    __pyx_t_3 = (__pyx_v_self->batching_configuration != Py_None);
    __pyx_t_5 = (__pyx_t_3 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (((PyObject *)__pyx_v_self->create_tracker_method) != Py_None);
    __pyx_t_3 = (__pyx_t_5 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_4 = __pyx_t_3;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_3 = (((PyObject *)__pyx_v_self->create_watermark_estimator_method) != Py_None);
    __pyx_t_5 = (__pyx_t_3 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->do_fn != Py_None);
    __pyx_t_3 = (__pyx_t_5 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_4 = __pyx_t_3;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_3 = (((PyObject *)__pyx_v_self->finish_bundle_method) != Py_None);
    __pyx_t_5 = (__pyx_t_3 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (((PyObject *)__pyx_v_self->initial_restriction_method) != Py_None);
    __pyx_t_3 = (__pyx_t_5 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_4 = __pyx_t_3;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_3 = (((PyObject *)__pyx_v_self->process_batch_method) != Py_None);
    __pyx_t_5 = (__pyx_t_3 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (((PyObject *)__pyx_v_self->process_method) != Py_None);
    __pyx_t_3 = (__pyx_t_5 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_4 = __pyx_t_3;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_3 = (((PyObject *)__pyx_v_self->setup_lifecycle_method) != Py_None);
    __pyx_t_5 = (__pyx_t_3 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (((PyObject *)__pyx_v_self->split_method) != Py_None);
    __pyx_t_3 = (__pyx_t_5 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_4 = __pyx_t_3;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_3 = (((PyObject *)__pyx_v_self->start_bundle_method) != Py_None);
    __pyx_t_5 = (__pyx_t_3 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (((PyObject *)__pyx_v_self->teardown_lifecycle_method) != Py_None);
    __pyx_t_3 = (__pyx_t_5 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_4 = __pyx_t_3;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_3 = (__pyx_v_self->timer_methods != Py_None);
    __pyx_t_5 = (__pyx_t_3 != 0);
    __pyx_t_4 = __pyx_t_5;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __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), 0x87afe8e, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(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), 0x87afe8e, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_DoFnSignature, (type(self), 0x87afe8e, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_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))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_142278286);
    __Pyx_GIVEREF(__pyx_int_142278286);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_142278286);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 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), 0x87afe8e, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_DoFnSignature, (type(self), 0x87afe8e, None), state
 *     else:
 *         return __pyx_unpickle_DoFnSignature, (type(self), 0x87afe8e, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_DoFnSignature__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_DoFnSignature); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __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))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_142278286);
    __Pyx_GIVEREF(__pyx_int_142278286);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_142278286);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __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_6);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_6 = 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_6);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DoFnSignature, (type(self), 0x87afe8e, 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_33__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_33__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_33__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_33__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_32__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_32__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__34)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 16, 0, __PYX_ERR(1, 16, __pyx_L1_error));

  /* "(tree fragment)":17
 *         return __pyx_unpickle_DoFnSignature, (type(self), 0x87afe8e, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_DoFnSignature__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6common___pyx_unpickle_DoFnSignature__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DoFnSignature, (type(self), 0x87afe8e, 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_AddTraceback("apache_beam.runners.common.DoFnSignature.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":437
 *   represented by a given DoFnSignature."""
 * 
 *   def __init__(self,             # <<<<<<<<<<<<<<
 *                output_handler,  # type: _OutputHandler
 *                signature  # type: DoFnSignature
 */

/* Python wrapper */
static int __pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_output_handler,&__pyx_n_s_signature,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_output_handler)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_signature)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 437, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 437, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_output_handler = values[0];
    __pyx_v_signature = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 437, __pyx_L3_error)
  __pyx_L3_error:;
  __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 */
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 437, 0, __PYX_ERR(0, 437, __pyx_L1_error));

  /* "apache_beam/runners/common.py":450
 *     :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]
 */
  if (!(likely(((__pyx_v_output_handler) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_output_handler, __pyx_ptype_11apache_beam_7runners_6common_OutputHandler))))) __PYX_ERR(0, 450, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_output_handler;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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":451
 *     """
 *     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]
 */
  if (!(likely(((__pyx_v_signature) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_signature, __pyx_ptype_11apache_beam_7runners_6common_DoFnSignature))))) __PYX_ERR(0, 451, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_signature;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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":452
 *     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":453
 *     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":437
 *   represented by a given DoFnSignature."""
 * 
 *   def __init__(self,             # <<<<<<<<<<<<<<
 *                output_handler,  # type: _OutputHandler
 *                signature  # type: DoFnSignature
 */

  /* 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_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":456
 * 
 *   @staticmethod
 *   def create_invoker(             # <<<<<<<<<<<<<<
 *       signature,  # type: DoFnSignature
 *       output_handler,  # type: OutputHandler
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_3create_invoker(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __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*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_3create_invoker, METH_VARARGS|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, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  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;
  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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_signature,&__pyx_n_s_output_handler,&__pyx_n_s_context,&__pyx_n_s_side_inputs,&__pyx_n_s_input_args,&__pyx_n_s_input_kwargs,&__pyx_n_s_process_invocation,&__pyx_n_s_user_state_context,&__pyx_n_s_bundle_finalizer_param,0};
    PyObject* values[9] = {0,0,0,0,0,0,0,0,0};

    /* "apache_beam/runners/common.py":459
 *       signature,  # type: DoFnSignature
 *       output_handler,  # type: OutputHandler
 *       context=None,  # type: Optional[DoFnContext]             # <<<<<<<<<<<<<<
 *       side_inputs=None,   # type: Optional[List[sideinputs.SideInputMap]]
 *       input_args=None, input_kwargs=None,
 */
    values[2] = ((PyObject *)Py_None);

    /* "apache_beam/runners/common.py":460
 *       output_handler,  # type: OutputHandler
 *       context=None,  # type: Optional[DoFnContext]
 *       side_inputs=None,   # type: Optional[List[sideinputs.SideInputMap]]             # <<<<<<<<<<<<<<
 *       input_args=None, input_kwargs=None,
 *       process_invocation=True,
 */
    values[3] = ((PyObject *)Py_None);

    /* "apache_beam/runners/common.py":461
 *       context=None,  # type: Optional[DoFnContext]
 *       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]
 */
    values[4] = ((PyObject *)Py_None);
    values[5] = ((PyObject *)Py_None);

    /* "apache_beam/runners/common.py":462
 *       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]
 *       bundle_finalizer_param=None  # type: Optional[core._BundleFinalizerParam]
 */
    values[6] = ((PyObject *)Py_True);

    /* "apache_beam/runners/common.py":463
 *       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]
 *   ):
 */
    values[7] = ((PyObject *)Py_None);

    /* "apache_beam/runners/common.py":464
 *       process_invocation=True,
 *       user_state_context=None,  # type: Optional[userstate.UserStateContext]
 *       bundle_finalizer_param=None  # type: Optional[core._BundleFinalizerParam]             # <<<<<<<<<<<<<<
 *   ):
 *     # type: (...) -> DoFnInvoker
 */
    values[8] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_signature)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_output_handler)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("create_invoker", 0, 2, 9, 1); __PYX_ERR(0, 456, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_context);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_side_inputs);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_input_args);
          if (value) { values[4] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_input_kwargs);
          if (value) { values[5] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_process_invocation);
          if (value) { values[6] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_user_state_context);
          if (value) { values[7] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  8:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bundle_finalizer_param);
          if (value) { values[8] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create_invoker") < 0)) __PYX_ERR(0, 456, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __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_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create_invoker", 0, 2, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 456, __pyx_L3_error)
  __pyx_L3_error:;
  __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":456
 * 
 *   @staticmethod
 *   def create_invoker(             # <<<<<<<<<<<<<<
 *       signature,  # type: DoFnSignature
 *       output_handler,  # type: OutputHandler
 */

  /* function exit code */
  __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_TraceDeclarations
  __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_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__35)
  __Pyx_RefNannySetupContext("create_invoker", 0);
  __Pyx_TraceCall("create_invoker", __pyx_f[0], 456, 0, __PYX_ERR(0, 456, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_side_inputs);

  /* "apache_beam/runners/common.py":492
 *                                 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, 492, __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, 492, __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":493
 *     """
 *     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, 493, __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":494
 *     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, 494, __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, 494, __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, 494, __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":495
 *     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_n_s_process_method); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_defaults); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 495, __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, 495, __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":496
 *         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_n_s_process_batch_method); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_defaults); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 496, __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, 496, __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_PyObject_GetAttrStr(__pyx_v_signature, __pyx_n_s_is_stateful_dofn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __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_L5_bool_binop_done:;
  __pyx_v_use_per_window_invoker = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":497
 *         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, 497, __pyx_L1_error)
  __pyx_t_6 = ((!__pyx_t_2) != 0);
  if (__pyx_t_6) {

    /* "apache_beam/runners/common.py":498
 *         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_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 498, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_output_handler);
    __Pyx_GIVEREF(__pyx_v_output_handler);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_output_handler);
    __Pyx_INCREF(__pyx_v_signature);
    __Pyx_GIVEREF(__pyx_v_signature);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_signature);
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 498, __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":497
 *         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":500
 *       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);
    __pyx_t_2 = (__pyx_t_6 != 0);
    if (unlikely(__pyx_t_2)) {

      /* "apache_beam/runners/common.py":501
 *     else:
 *       if context is None:
 *         raise TypeError("Must provide context when not using SimpleInvoker")             # <<<<<<<<<<<<<<
 *       return PerWindowInvoker(
 *           output_handler,
 */
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 501, __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, 501, __pyx_L1_error)

      /* "apache_beam/runners/common.py":500
 *       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":502
 *       if context is None:
 *         raise TypeError("Must provide context when not using SimpleInvoker")
 *       return PerWindowInvoker(             # <<<<<<<<<<<<<<
 *           output_handler,
 *           signature,
 */
    __Pyx_XDECREF(__pyx_r);

    /* "apache_beam/runners/common.py":510
 *           input_kwargs,
 *           user_state_context,
 *           bundle_finalizer_param)             # <<<<<<<<<<<<<<
 * 
 *   def invoke_process(self,
 */
    __pyx_t_3 = PyTuple_New(8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_output_handler);
    __Pyx_GIVEREF(__pyx_v_output_handler);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_output_handler);
    __Pyx_INCREF(__pyx_v_signature);
    __Pyx_GIVEREF(__pyx_v_signature);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_signature);
    __Pyx_INCREF(__pyx_v_context);
    __Pyx_GIVEREF(__pyx_v_context);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_context);
    __Pyx_INCREF(__pyx_v_side_inputs);
    __Pyx_GIVEREF(__pyx_v_side_inputs);
    PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_side_inputs);
    __Pyx_INCREF(__pyx_v_input_args);
    __Pyx_GIVEREF(__pyx_v_input_args);
    PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_input_args);
    __Pyx_INCREF(__pyx_v_input_kwargs);
    __Pyx_GIVEREF(__pyx_v_input_kwargs);
    PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_input_kwargs);
    __Pyx_INCREF(__pyx_v_user_state_context);
    __Pyx_GIVEREF(__pyx_v_user_state_context);
    PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_v_user_state_context);
    __Pyx_INCREF(__pyx_v_bundle_finalizer_param);
    __Pyx_GIVEREF(__pyx_v_bundle_finalizer_param);
    PyTuple_SET_ITEM(__pyx_t_3, 7, __pyx_v_bundle_finalizer_param);

    /* "apache_beam/runners/common.py":502
 *       if context is None:
 *         raise TypeError("Must provide context when not using SimpleInvoker")
 *       return PerWindowInvoker(             # <<<<<<<<<<<<<<
 *           output_handler,
 *           signature,
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __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/common.py":456
 * 
 *   @staticmethod
 *   def create_invoker(             # <<<<<<<<<<<<<<
 *       signature,  # type: DoFnSignature
 *       output_handler,  # type: OutputHandler
 */

  /* 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.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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":512
 *           bundle_finalizer_param)
 * 
 *   def invoke_process(self,             # <<<<<<<<<<<<<<
 *                      windowed_value,  # type: WindowedValue
 *                      restriction=None,
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_5invoke_process(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*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":514
 *   def invoke_process(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":515
 *                      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":516
 *                      restriction=None,
 *                      watermark_estimator_state=None,
 *                      additional_args=None,             # <<<<<<<<<<<<<<
 *                      additional_kwargs=None
 *                     ):
 */
  PyObject *__pyx_v_additional_args = ((PyObject *)Py_None);

  /* "apache_beam/runners/common.py":517
 *                      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_TraceDeclarations
  __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;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__37)
  __Pyx_RefNannySetupContext("invoke_process", 0);
  __Pyx_TraceCall("invoke_process", __pyx_f[0], 512, 0, __PYX_ERR(0, 512, __pyx_L1_error));
  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":512
 *           bundle_finalizer_param)
 * 
 *   def invoke_process(self,             # <<<<<<<<<<<<<<
 *                      windowed_value,  # type: WindowedValue
 *                      restriction=None,
 */
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_invoke_process); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_5invoke_process)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[6] = {__pyx_t_4, ((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_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 5+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 512, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[6] = {__pyx_t_4, ((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_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 5+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 512, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(5+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 512, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
          }
          __Pyx_INCREF(((PyObject *)__pyx_v_windowed_value));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_windowed_value));
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, ((PyObject *)__pyx_v_windowed_value));
          __Pyx_INCREF(__pyx_v_restriction);
          __Pyx_GIVEREF(__pyx_v_restriction);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_restriction);
          __Pyx_INCREF(__pyx_v_watermark_estimator_state);
          __Pyx_GIVEREF(__pyx_v_watermark_estimator_state);
          PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_watermark_estimator_state);
          __Pyx_INCREF(__pyx_v_additional_args);
          __Pyx_GIVEREF(__pyx_v_additional_args);
          PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_5, __pyx_v_additional_args);
          __Pyx_INCREF(__pyx_v_additional_kwargs);
          __Pyx_GIVEREF(__pyx_v_additional_kwargs);
          PyTuple_SET_ITEM(__pyx_t_6, 4+__pyx_t_5, __pyx_v_additional_kwargs);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 512, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __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_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_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":537
 *                          current `DoFn.process()` invocation.
 *     """
 *     raise NotImplementedError             # <<<<<<<<<<<<<<
 * 
 *   def invoke_process_batch(self,
 */
  __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
  __PYX_ERR(0, 537, __pyx_L1_error)

  /* "apache_beam/runners/common.py":512
 *           bundle_finalizer_param)
 * 
 *   def invoke_process(self,             # <<<<<<<<<<<<<<
 *                      windowed_value,  # type: WindowedValue
 *                      restriction=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_6);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_5invoke_process(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __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*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_5invoke_process, METH_VARARGS|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, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  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;
  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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_windowed_value,&__pyx_n_s_restriction,&__pyx_n_s_watermark_estimator_state,&__pyx_n_s_additional_args,&__pyx_n_s_additional_kwargs,0};
    PyObject* values[5] = {0,0,0,0,0};

    /* "apache_beam/runners/common.py":514
 *   def invoke_process(self,
 *                      windowed_value,  # type: WindowedValue
 *                      restriction=None,             # <<<<<<<<<<<<<<
 *                      watermark_estimator_state=None,
 *                      additional_args=None,
 */
    values[1] = ((PyObject *)Py_None);

    /* "apache_beam/runners/common.py":515
 *                      windowed_value,  # type: WindowedValue
 *                      restriction=None,
 *                      watermark_estimator_state=None,             # <<<<<<<<<<<<<<
 *                      additional_args=None,
 *                      additional_kwargs=None
 */
    values[2] = ((PyObject *)Py_None);

    /* "apache_beam/runners/common.py":516
 *                      restriction=None,
 *                      watermark_estimator_state=None,
 *                      additional_args=None,             # <<<<<<<<<<<<<<
 *                      additional_kwargs=None
 *                     ):
 */
    values[3] = ((PyObject *)Py_None);

    /* "apache_beam/runners/common.py":517
 *                      watermark_estimator_state=None,
 *                      additional_args=None,
 *                      additional_kwargs=None             # <<<<<<<<<<<<<<
 *                     ):
 *     # type: (...) -> Iterable[SplitResultResidual]
 */
    values[4] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_windowed_value)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_restriction);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_watermark_estimator_state);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_additional_args);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_additional_kwargs);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "invoke_process") < 0)) __PYX_ERR(0, 512, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __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_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("invoke_process", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 512, __pyx_L3_error)
  __pyx_L3_error:;
  __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_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, 1, "windowed_value", 0))) __PYX_ERR(0, 513, __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":512
 *           bundle_finalizer_param)
 * 
 *   def invoke_process(self,             # <<<<<<<<<<<<<<
 *                      windowed_value,  # type: WindowedValue
 *                      restriction=None,
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __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_TraceDeclarations
  __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_TraceFrameInit(__pyx_codeobj__37)
  __Pyx_RefNannySetupContext("invoke_process", 0);
  __Pyx_TraceCall("invoke_process (wrapper)", __pyx_f[0], 512, 0, __PYX_ERR(0, 512, __pyx_L1_error));
  __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, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":539
 *     raise NotImplementedError
 * 
 *   def invoke_process_batch(self,             # <<<<<<<<<<<<<<
 *                      windowed_batch,  # type: WindowedBatch
 *                      additional_args=None,
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_7invoke_process_batch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __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*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_7invoke_process_batch, METH_VARARGS|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, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_windowed_batch = 0;
  CYTHON_UNUSED PyObject *__pyx_v_additional_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_additional_kwargs = 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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_windowed_batch,&__pyx_n_s_additional_args,&__pyx_n_s_additional_kwargs,0};
    PyObject* values[3] = {0,0,0};

    /* "apache_beam/runners/common.py":541
 *   def invoke_process_batch(self,
 *                      windowed_batch,  # type: WindowedBatch
 *                      additional_args=None,             # <<<<<<<<<<<<<<
 *                      additional_kwargs=None
 *                     ):
 */
    values[1] = ((PyObject *)Py_None);

    /* "apache_beam/runners/common.py":542
 *                      windowed_batch,  # type: WindowedBatch
 *                      additional_args=None,
 *                      additional_kwargs=None             # <<<<<<<<<<<<<<
 *                     ):
 *     # type: (...) -> None
 */
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_windowed_batch)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_additional_args);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_additional_kwargs);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "invoke_process_batch") < 0)) __PYX_ERR(0, 539, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_windowed_batch = values[0];
    __pyx_v_additional_args = values[1];
    __pyx_v_additional_kwargs = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("invoke_process_batch", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 539, __pyx_L3_error)
  __pyx_L3_error:;
  __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":539
 *     raise NotImplementedError
 * 
 *   def invoke_process_batch(self,             # <<<<<<<<<<<<<<
 *                      windowed_batch,  # type: WindowedBatch
 *                      additional_args=None,
 */

  /* function exit code */
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__38)
  __Pyx_RefNannySetupContext("invoke_process_batch", 0);
  __Pyx_TraceCall("invoke_process_batch", __pyx_f[0], 539, 0, __PYX_ERR(0, 539, __pyx_L1_error));

  /* "apache_beam/runners/common.py":557
 *                          current `DoFn.process()` invocation.
 *     """
 *     raise NotImplementedError             # <<<<<<<<<<<<<<
 * 
 *   def invoke_setup(self):
 */
  __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
  __PYX_ERR(0, 557, __pyx_L1_error)

  /* "apache_beam/runners/common.py":539
 *     raise NotImplementedError
 * 
 *   def invoke_process_batch(self,             # <<<<<<<<<<<<<<
 *                      windowed_batch,  # type: WindowedBatch
 *                      additional_args=None,
 */

  /* 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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":559
 *     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, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __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)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_9invoke_setup, METH_NOARGS, __pyx_doc_11apache_beam_7runners_6common_11DoFnInvoker_8invoke_setup};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_9invoke_setup(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("invoke_setup (wrapper)", 0);
  __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_r = NULL;
  __Pyx_TraceDeclarations
  __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_TraceFrameInit(__pyx_codeobj__39)
  __Pyx_RefNannySetupContext("invoke_setup", 0);
  __Pyx_TraceCall("invoke_setup", __pyx_f[0], 559, 0, __PYX_ERR(0, 559, __pyx_L1_error));

  /* "apache_beam/runners/common.py":564
 *     """Invokes the DoFn.setup() method
 *     """
 *     self.signature.setup_lifecycle_method.method_value()             # <<<<<<<<<<<<<<
 * 
 *   def invoke_start_bundle(self):
 */
  __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_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 564, __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/common.py":559
 *     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_AddTraceback("apache_beam.runners.common.DoFnInvoker.invoke_setup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":566
 *     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, CYTHON_UNUSED PyObject *unused); /*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_r = NULL;
  __Pyx_TraceDeclarations
  __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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__40)
  __Pyx_RefNannySetupContext("invoke_start_bundle", 0);
  __Pyx_TraceCall("invoke_start_bundle", __pyx_f[0], 566, 0, __PYX_ERR(0, 566, __pyx_L1_error));
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_invoke_start_bundle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 566, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_11invoke_start_bundle)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 566, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __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_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_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
 *     """Invokes the DoFn.start_bundle() method.
 *     """
 *     self.output_handler.start_bundle_outputs(             # <<<<<<<<<<<<<<
 *         self.signature.start_bundle_method.method_value())
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->output_handler), __pyx_n_s_start_bundle_outputs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "apache_beam/runners/common.py":572
 *     """
 *     self.output_handler.start_bundle_outputs(
 *         self.signature.start_bundle_method.method_value())             # <<<<<<<<<<<<<<
 * 
 *   def invoke_finish_bundle(self):
 */
  __Pyx_INCREF(__pyx_v_self->signature->start_bundle_method->method_value);
  __pyx_t_4 = __pyx_v_self->signature->start_bundle_method->method_value; __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __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, 571, __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/common.py":566
 *     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_5);
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnInvoker.invoke_start_bundle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_11invoke_start_bundle(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __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)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_11invoke_start_bundle, METH_NOARGS, __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, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("invoke_start_bundle (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__40)
  __Pyx_RefNannySetupContext("invoke_start_bundle", 0);
  __Pyx_TraceCall("invoke_start_bundle (wrapper)", __pyx_f[0], 566, 0, __PYX_ERR(0, 566, __pyx_L1_error));
  __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, 566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":574
 *         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, CYTHON_UNUSED PyObject *unused); /*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_r = NULL;
  __Pyx_TraceDeclarations
  __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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__41)
  __Pyx_RefNannySetupContext("invoke_finish_bundle", 0);
  __Pyx_TraceCall("invoke_finish_bundle", __pyx_f[0], 574, 0, __PYX_ERR(0, 574, __pyx_L1_error));
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_invoke_finish_bundle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 574, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_13invoke_finish_bundle)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 574, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __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_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_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":579
 *     """Invokes the DoFn.finish_bundle() method.
 *     """
 *     self.output_handler.finish_bundle_outputs(             # <<<<<<<<<<<<<<
 *         self.signature.finish_bundle_method.method_value())
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->output_handler), __pyx_n_s_finish_bundle_outputs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "apache_beam/runners/common.py":580
 *     """
 *     self.output_handler.finish_bundle_outputs(
 *         self.signature.finish_bundle_method.method_value())             # <<<<<<<<<<<<<<
 * 
 *   def invoke_teardown(self):
 */
  __Pyx_INCREF(__pyx_v_self->signature->finish_bundle_method->method_value);
  __pyx_t_4 = __pyx_v_self->signature->finish_bundle_method->method_value; __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __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, 579, __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/common.py":574
 *         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_5);
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnInvoker.invoke_finish_bundle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_13invoke_finish_bundle(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __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)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_13invoke_finish_bundle, METH_NOARGS, __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, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("invoke_finish_bundle (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__41)
  __Pyx_RefNannySetupContext("invoke_finish_bundle", 0);
  __Pyx_TraceCall("invoke_finish_bundle (wrapper)", __pyx_f[0], 574, 0, __PYX_ERR(0, 574, __pyx_L1_error));
  __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, 574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":582
 *         self.signature.finish_bundle_method.method_value())
 * 
 *   def invoke_teardown(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_15invoke_teardown(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __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)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_15invoke_teardown, METH_NOARGS, __pyx_doc_11apache_beam_7runners_6common_11DoFnInvoker_14invoke_teardown};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_15invoke_teardown(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("invoke_teardown (wrapper)", 0);
  __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_r = NULL;
  __Pyx_TraceDeclarations
  __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_TraceFrameInit(__pyx_codeobj__42)
  __Pyx_RefNannySetupContext("invoke_teardown", 0);
  __Pyx_TraceCall("invoke_teardown", __pyx_f[0], 582, 0, __PYX_ERR(0, 582, __pyx_L1_error));

  /* "apache_beam/runners/common.py":587
 *     """Invokes the DoFn.teardown() method
 *     """
 *     self.signature.teardown_lifecycle_method.method_value()             # <<<<<<<<<<<<<<
 * 
 *   def invoke_user_timer(
 */
  __Pyx_INCREF(__pyx_v_self->signature->teardown_lifecycle_method->method_value);
  __pyx_t_2 = __pyx_v_self->signature->teardown_lifecycle_method->method_value; __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 587, __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/common.py":582
 *         self.signature.finish_bundle_method.method_value())
 * 
 *   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_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":589
 *     self.signature.teardown_lifecycle_method.method_value()
 * 
 *   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, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_17invoke_user_timer = {"invoke_user_timer", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_17invoke_user_timer, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_17invoke_user_timer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  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;
  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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_timer_spec,&__pyx_n_s_key,&__pyx_n_s_window,&__pyx_n_s_timestamp,&__pyx_n_s_pane_info,&__pyx_n_s_dynamic_timer_tag,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timer_spec)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("invoke_user_timer", 1, 6, 6, 1); __PYX_ERR(0, 589, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_window)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("invoke_user_timer", 1, 6, 6, 2); __PYX_ERR(0, 589, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timestamp)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("invoke_user_timer", 1, 6, 6, 3); __PYX_ERR(0, 589, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pane_info)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("invoke_user_timer", 1, 6, 6, 4); __PYX_ERR(0, 589, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dynamic_timer_tag)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("invoke_user_timer", 1, 6, 6, 5); __PYX_ERR(0, 589, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "invoke_user_timer") < 0)) __PYX_ERR(0, 589, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
    }
    __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_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("invoke_user_timer", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 589, __pyx_L3_error)
  __pyx_L3_error:;
  __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 */
  __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_TraceDeclarations
  __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;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__43)
  __Pyx_RefNannySetupContext("invoke_user_timer", 0);
  __Pyx_TraceCall("invoke_user_timer", __pyx_f[0], 589, 0, __PYX_ERR(0, 589, __pyx_L1_error));

  /* "apache_beam/runners/common.py":593
 *     # 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_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_window);
  __Pyx_GIVEREF(__pyx_v_window);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_window);
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 0, Py_None);
  __Pyx_INCREF(__pyx_v_timestamp);
  __Pyx_GIVEREF(__pyx_v_timestamp);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_timestamp);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":594
 *     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_3 = __Pyx_PyObject_GetItem(__pyx_v_self->signature->timer_methods, __pyx_v_timer_spec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_invoke_timer_callback); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "apache_beam/runners/common.py":600
 *             timestamp,
 *             pane_info,
 *             dynamic_timer_tag))             # <<<<<<<<<<<<<<
 * 
 *   def invoke_create_watermark_estimator(self, estimator_state):
 */
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[7] = {__pyx_t_3, __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_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 6+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 594, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[7] = {__pyx_t_3, __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_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 6+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 594, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(6+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_self->user_state_context);
    __Pyx_GIVEREF(__pyx_v_self->user_state_context);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_self->user_state_context);
    __Pyx_INCREF(__pyx_v_key);
    __Pyx_GIVEREF(__pyx_v_key);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_key);
    __Pyx_INCREF(__pyx_v_window);
    __Pyx_GIVEREF(__pyx_v_window);
    PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_window);
    __Pyx_INCREF(__pyx_v_timestamp);
    __Pyx_GIVEREF(__pyx_v_timestamp);
    PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_5, __pyx_v_timestamp);
    __Pyx_INCREF(__pyx_v_pane_info);
    __Pyx_GIVEREF(__pyx_v_pane_info);
    PyTuple_SET_ITEM(__pyx_t_6, 4+__pyx_t_5, __pyx_v_pane_info);
    __Pyx_INCREF(__pyx_v_dynamic_timer_tag);
    __Pyx_GIVEREF(__pyx_v_dynamic_timer_tag);
    PyTuple_SET_ITEM(__pyx_t_6, 5+__pyx_t_5, __pyx_v_dynamic_timer_tag);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "apache_beam/runners/common.py":592
 *       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_4 = ((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_2, 0, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 592, __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_4); __pyx_t_4 = 0;

  /* "apache_beam/runners/common.py":589
 *     self.signature.teardown_lifecycle_method.method_value()
 * 
 *   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_4);
  __Pyx_XDECREF(__pyx_t_6);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":602
 *             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, PyObject *__pyx_v_estimator_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_19invoke_create_watermark_estimator = {"invoke_create_watermark_estimator", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_19invoke_create_watermark_estimator, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_19invoke_create_watermark_estimator(PyObject *__pyx_v_self, PyObject *__pyx_v_estimator_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("invoke_create_watermark_estimator (wrapper)", 0);
  __pyx_r = __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));

  /* function exit code */
  __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_TraceDeclarations
  __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_TraceFrameInit(__pyx_codeobj__44)
  __Pyx_RefNannySetupContext("invoke_create_watermark_estimator", 0);
  __Pyx_TraceCall("invoke_create_watermark_estimator", __pyx_f[0], 602, 0, __PYX_ERR(0, 602, __pyx_L1_error));

  /* "apache_beam/runners/common.py":603
 * 
 *   def invoke_create_watermark_estimator(self, estimator_state):
 *     return self.signature.create_watermark_estimator_method.method_value(             # <<<<<<<<<<<<<<
 *         estimator_state)
 * 
 */
  __Pyx_XDECREF(__pyx_r);

  /* "apache_beam/runners/common.py":604
 *   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_INCREF(__pyx_v_self->signature->create_watermark_estimator_method->method_value);
  __pyx_t_2 = __pyx_v_self->signature->create_watermark_estimator_method->method_value; __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_estimator_state) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_estimator_state);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 603, __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/common.py":602
 *             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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":606
 *         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, PyObject *__pyx_args, PyObject *__pyx_kwds); /*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_TraceDeclarations
  __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;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__45)
  __Pyx_RefNannySetupContext("invoke_split", 0);
  __Pyx_TraceCall("invoke_split", __pyx_f[0], 606, 0, __PYX_ERR(0, 606, __pyx_L1_error));
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_invoke_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 606, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_21invoke_split)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_element, __pyx_v_restriction};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 606, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_element, __pyx_v_restriction};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 606, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 606, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
          }
          __Pyx_INCREF(__pyx_v_element);
          __Pyx_GIVEREF(__pyx_v_element);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_element);
          __Pyx_INCREF(__pyx_v_restriction);
          __Pyx_GIVEREF(__pyx_v_restriction);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_restriction);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 606, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __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_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_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":607
 * 
 *   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_INCREF(__pyx_v_self->signature->split_method->method_value);
  __pyx_t_2 = __pyx_v_self->signature->split_method->method_value; __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_element, __pyx_v_restriction};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 607, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_element, __pyx_v_restriction};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 607, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 607, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_element);
    __Pyx_GIVEREF(__pyx_v_element);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_element);
    __Pyx_INCREF(__pyx_v_restriction);
    __Pyx_GIVEREF(__pyx_v_restriction);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_restriction);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 607, __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/common.py":606
 *         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_XDECREF(__pyx_t_6);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_21invoke_split(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_21invoke_split = {"invoke_split", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_21invoke_split, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_21invoke_split(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_element = 0;
  PyObject *__pyx_v_restriction = 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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_element,&__pyx_n_s_restriction,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_element)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_restriction)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("invoke_split", 1, 2, 2, 1); __PYX_ERR(0, 606, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "invoke_split") < 0)) __PYX_ERR(0, 606, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_element = values[0];
    __pyx_v_restriction = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("invoke_split", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 606, __pyx_L3_error)
  __pyx_L3_error:;
  __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 */
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__45)
  __Pyx_RefNannySetupContext("invoke_split", 0);
  __Pyx_TraceCall("invoke_split (wrapper)", __pyx_f[0], 606, 0, __PYX_ERR(0, 606, __pyx_L1_error));
  __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, 606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":609
 *     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, PyObject *__pyx_v_element); /*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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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_TraceFrameInit(__pyx_codeobj__46)
  __Pyx_RefNannySetupContext("invoke_initial_restriction", 0);
  __Pyx_TraceCall("invoke_initial_restriction", __pyx_f[0], 609, 0, __PYX_ERR(0, 609, __pyx_L1_error));
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_invoke_initial_restriction); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 609, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_23invoke_initial_restriction)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_element) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_element);
        __Pyx_XDECREF(__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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __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_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_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":610
 * 
 *   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_INCREF(__pyx_v_self->signature->initial_restriction_method->method_value);
  __pyx_t_2 = __pyx_v_self->signature->initial_restriction_method->method_value; __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_element) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_element);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 610, __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/common.py":609
 *     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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_23invoke_initial_restriction(PyObject *__pyx_v_self, PyObject *__pyx_v_element); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_23invoke_initial_restriction = {"invoke_initial_restriction", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_23invoke_initial_restriction, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_23invoke_initial_restriction(PyObject *__pyx_v_self, PyObject *__pyx_v_element) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("invoke_initial_restriction (wrapper)", 0);
  __pyx_r = __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));

  /* function exit code */
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__46)
  __Pyx_RefNannySetupContext("invoke_initial_restriction", 0);
  __Pyx_TraceCall("invoke_initial_restriction (wrapper)", __pyx_f[0], 609, 0, __PYX_ERR(0, 609, __pyx_L1_error));
  __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, 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.runners.common.DoFnInvoker.invoke_initial_restriction", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":612
 *     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, PyObject *__pyx_v_restriction); /*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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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_TraceFrameInit(__pyx_codeobj__47)
  __Pyx_RefNannySetupContext("invoke_create_tracker", 0);
  __Pyx_TraceCall("invoke_create_tracker", __pyx_f[0], 612, 0, __PYX_ERR(0, 612, __pyx_L1_error));
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_invoke_create_tracker); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_25invoke_create_tracker)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_restriction) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_restriction);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __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_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_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":613
 * 
 *   def invoke_create_tracker(self, restriction):
 *     return self.signature.create_tracker_method.method_value(restriction)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->signature->create_tracker_method->method_value);
  __pyx_t_2 = __pyx_v_self->signature->create_tracker_method->method_value; __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_restriction) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_restriction);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 613, __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/common.py":612
 *     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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_25invoke_create_tracker(PyObject *__pyx_v_self, PyObject *__pyx_v_restriction); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_25invoke_create_tracker = {"invoke_create_tracker", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_25invoke_create_tracker, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_25invoke_create_tracker(PyObject *__pyx_v_self, PyObject *__pyx_v_restriction) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("invoke_create_tracker (wrapper)", 0);
  __pyx_r = __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));

  /* function exit code */
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__47)
  __Pyx_RefNannySetupContext("invoke_create_tracker", 0);
  __Pyx_TraceCall("invoke_create_tracker (wrapper)", __pyx_f[0], 612, 0, __PYX_ERR(0, 612, __pyx_L1_error));
  __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, 612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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_TraceReturn(__pyx_r, 0);
  __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) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[2], 73, 0, __PYX_ERR(2, 73, __pyx_L1_error));
  __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_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnInvoker.signature.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __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_TraceDeclarations
  __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_TraceCall("__set__", __pyx_f[2], 73, 0, __PYX_ERR(2, 73, __pyx_L1_error));
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_11apache_beam_7runners_6common_DoFnSignature))))) __PYX_ERR(2, 73, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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_TraceReturn(Py_None, 0);
  __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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[2], 73, 0, __PYX_ERR(2, 73, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__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;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnInvoker.signature.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 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             # <<<<<<<<<<<<<<
 * 
 *   cpdef invoke_process(self, WindowedValue windowed_value,
 */

/* 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) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[2], 76, 0, __PYX_ERR(2, 76, __pyx_L1_error));
  __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_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnInvoker.bundle_finalizer_param.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[2], 76, 0, __PYX_ERR(2, 76, __pyx_L1_error));
  __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;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnInvoker.bundle_finalizer_param.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[2], 76, 0, __PYX_ERR(2, 76, __pyx_L1_error));
  __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;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnInvoker.bundle_finalizer_param.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 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, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_27__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_27__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_27__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__48)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self.bundle_finalizer_param, self.output_handler, self.signature, self.user_state_context)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __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->bundle_finalizer_param);
  __Pyx_GIVEREF(__pyx_v_self->bundle_finalizer_param);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->bundle_finalizer_param);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->output_handler));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->output_handler));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self->output_handler));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->signature));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->signature));
  PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_self->signature));
  __Pyx_INCREF(__pyx_v_self->user_state_context);
  __Pyx_GIVEREF(__pyx_v_self->user_state_context);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->user_state_context);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self.bundle_finalizer_param, self.output_handler, self.signature, self.user_state_context)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_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.output_handler, self.signature, self.user_state_context)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         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);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __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:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = 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_finalizer_param, self.output_handler, self.signature, self.user_state_context)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         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.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), 0x24f2bc5, None), state
 */
  /*else*/ {
    __pyx_t_2 = (__pyx_v_self->bundle_finalizer_param != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (((PyObject *)__pyx_v_self->output_handler) != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_2 = (((PyObject *)__pyx_v_self->signature) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->user_state_context != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = 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), 0x24f2bc5, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = 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), 0x24f2bc5, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_DoFnInvoker, (type(self), 0x24f2bc5, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_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))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_38742981);
    __Pyx_GIVEREF(__pyx_int_38742981);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_38742981);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = 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), 0x24f2bc5, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_DoFnInvoker, (type(self), 0x24f2bc5, None), state
 *     else:
 *         return __pyx_unpickle_DoFnInvoker, (type(self), 0x24f2bc5, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_DoFnInvoker__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_DoFnInvoker); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __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))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_38742981);
    __Pyx_GIVEREF(__pyx_int_38742981);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_38742981);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __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_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 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_6);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DoFnInvoker, (type(self), 0x24f2bc5, 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, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_29__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_29__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_29__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __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));

  /* function exit code */
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__49)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 16, 0, __PYX_ERR(1, 16, __pyx_L1_error));

  /* "(tree fragment)":17
 *         return __pyx_unpickle_DoFnInvoker, (type(self), 0x24f2bc5, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_DoFnInvoker__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6common___pyx_unpickle_DoFnInvoker__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DoFnInvoker, (type(self), 0x24f2bc5, 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_AddTraceback("apache_beam.runners.common.DoFnInvoker.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":619
 *   """An invoker that processes elements ignoring windowing information."""
 * 
 *   def __init__(self,             # <<<<<<<<<<<<<<
 *                output_handler,  # type: OutputHandler
 *                signature  # type: DoFnSignature
 */

/* 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_output_handler,&__pyx_n_s_signature,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_output_handler)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_signature)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 619, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 619, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_output_handler = values[0];
    __pyx_v_signature = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 619, __pyx_L3_error)
  __pyx_L3_error:;
  __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 */
  __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_TraceDeclarations
  __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 619, 0, __PYX_ERR(0, 619, __pyx_L1_error));

  /* "apache_beam/runners/common.py":624
 *               ):
 *     # 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_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker));
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self));
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 624, __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_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_output_handler, __pyx_v_signature};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 624, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_output_handler, __pyx_v_signature};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 624, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 624, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_output_handler);
    __Pyx_GIVEREF(__pyx_v_output_handler);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_output_handler);
    __Pyx_INCREF(__pyx_v_signature);
    __Pyx_GIVEREF(__pyx_v_signature);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_signature);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 624, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__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;

  /* "apache_beam/runners/common.py":625
 *     # 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_n_s_process_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_method_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->process_method);
  __Pyx_DECREF(__pyx_v_self->process_method);
  __pyx_v_self->process_method = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":626
 *     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(self,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_signature, __pyx_n_s_process_batch_method); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_method_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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":619
 *   """An invoker that processes elements ignoring windowing information."""
 * 
 *   def __init__(self,             # <<<<<<<<<<<<<<
 *                output_handler,  # type: OutputHandler
 *                signature  # type: DoFnSignature
 */

  /* 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_5);
  __Pyx_AddTraceback("apache_beam.runners.common.SimpleInvoker.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":628
 *     self.process_batch_method = signature.process_batch_method.method_value
 * 
 *   def invoke_process(self,             # <<<<<<<<<<<<<<
 *                      windowed_value,  # type: WindowedValue
 *                      restriction=None,
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6common_13SimpleInvoker_3invoke_process(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*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":630
 *   def invoke_process(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":631
 *                      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":632
 *                      restriction=None,
 *                      watermark_estimator_state=None,
 *                      additional_args=None,             # <<<<<<<<<<<<<<
 *                      additional_kwargs=None
 *                     ):
 */
  PyObject *__pyx_v_additional_args = ((PyObject *)Py_None);

  /* "apache_beam/runners/common.py":633
 *                      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_TraceDeclarations
  __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;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__50)
  __Pyx_RefNannySetupContext("invoke_process", 0);
  __Pyx_TraceCall("invoke_process", __pyx_f[0], 628, 0, __PYX_ERR(0, 628, __pyx_L1_error));
  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":628
 *     self.process_batch_method = signature.process_batch_method.method_value
 * 
 *   def invoke_process(self,             # <<<<<<<<<<<<<<
 *                      windowed_value,  # type: WindowedValue
 *                      restriction=None,
 */
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_invoke_process); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 628, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_7runners_6common_13SimpleInvoker_3invoke_process)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[6] = {__pyx_t_4, ((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_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 5+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 628, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[6] = {__pyx_t_4, ((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_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 5+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 628, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(5+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 628, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
          }
          __Pyx_INCREF(((PyObject *)__pyx_v_windowed_value));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_windowed_value));
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, ((PyObject *)__pyx_v_windowed_value));
          __Pyx_INCREF(__pyx_v_restriction);
          __Pyx_GIVEREF(__pyx_v_restriction);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_restriction);
          __Pyx_INCREF(__pyx_v_watermark_estimator_state);
          __Pyx_GIVEREF(__pyx_v_watermark_estimator_state);
          PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_watermark_estimator_state);
          __Pyx_INCREF(__pyx_v_additional_args);
          __Pyx_GIVEREF(__pyx_v_additional_args);
          PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_5, __pyx_v_additional_args);
          __Pyx_INCREF(__pyx_v_additional_kwargs);
          __Pyx_GIVEREF(__pyx_v_additional_kwargs);
          PyTuple_SET_ITEM(__pyx_t_6, 4+__pyx_t_5, __pyx_v_additional_kwargs);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 628, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __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_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_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":637
 *     # type: (...) -> Iterable[SplitResultResidual]
 *     self.output_handler.handle_process_outputs(
 *         windowed_value, self.process_method(windowed_value.value))             # <<<<<<<<<<<<<<
 *     return []
 * 
 */
  __Pyx_INCREF(__pyx_v_self->process_method);
  __pyx_t_2 = __pyx_v_self->process_method; __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_windowed_value->value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_windowed_value->value);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":636
 *                     ):
 *     # type: (...) -> Iterable[SplitResultResidual]
 *     self.output_handler.handle_process_outputs(             # <<<<<<<<<<<<<<
 *         windowed_value, self.process_method(windowed_value.value))
 *     return []
 */
  __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, __pyx_v_windowed_value, __pyx_t_1, 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 636, __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/common.py":638
 *     self.output_handler.handle_process_outputs(
 *         windowed_value, self.process_method(windowed_value.value))
 *     return []             # <<<<<<<<<<<<<<
 * 
 *   def invoke_process_batch(self,
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 638, __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":628
 *     self.process_batch_method = signature.process_batch_method.method_value
 * 
 *   def invoke_process(self,             # <<<<<<<<<<<<<<
 *                      windowed_value,  # type: WindowedValue
 *                      restriction=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_6);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_13SimpleInvoker_3invoke_process(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13SimpleInvoker_3invoke_process = {"invoke_process", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13SimpleInvoker_3invoke_process, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_13SimpleInvoker_3invoke_process(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  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;
  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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_windowed_value,&__pyx_n_s_restriction,&__pyx_n_s_watermark_estimator_state,&__pyx_n_s_additional_args,&__pyx_n_s_additional_kwargs,0};
    PyObject* values[5] = {0,0,0,0,0};

    /* "apache_beam/runners/common.py":630
 *   def invoke_process(self,
 *                      windowed_value,  # type: WindowedValue
 *                      restriction=None,             # <<<<<<<<<<<<<<
 *                      watermark_estimator_state=None,
 *                      additional_args=None,
 */
    values[1] = ((PyObject *)Py_None);

    /* "apache_beam/runners/common.py":631
 *                      windowed_value,  # type: WindowedValue
 *                      restriction=None,
 *                      watermark_estimator_state=None,             # <<<<<<<<<<<<<<
 *                      additional_args=None,
 *                      additional_kwargs=None
 */
    values[2] = ((PyObject *)Py_None);

    /* "apache_beam/runners/common.py":632
 *                      restriction=None,
 *                      watermark_estimator_state=None,
 *                      additional_args=None,             # <<<<<<<<<<<<<<
 *                      additional_kwargs=None
 *                     ):
 */
    values[3] = ((PyObject *)Py_None);

    /* "apache_beam/runners/common.py":633
 *                      watermark_estimator_state=None,
 *                      additional_args=None,
 *                      additional_kwargs=None             # <<<<<<<<<<<<<<
 *                     ):
 *     # type: (...) -> Iterable[SplitResultResidual]
 */
    values[4] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_windowed_value)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_restriction);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_watermark_estimator_state);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_additional_args);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_additional_kwargs);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "invoke_process") < 0)) __PYX_ERR(0, 628, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __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_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("invoke_process", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 628, __pyx_L3_error)
  __pyx_L3_error:;
  __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_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, 1, "windowed_value", 0))) __PYX_ERR(0, 629, __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":628
 *     self.process_batch_method = signature.process_batch_method.method_value
 * 
 *   def invoke_process(self,             # <<<<<<<<<<<<<<
 *                      windowed_value,  # type: WindowedValue
 *                      restriction=None,
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __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_TraceDeclarations
  __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_TraceFrameInit(__pyx_codeobj__50)
  __Pyx_RefNannySetupContext("invoke_process", 0);
  __Pyx_TraceCall("invoke_process (wrapper)", __pyx_f[0], 628, 0, __PYX_ERR(0, 628, __pyx_L1_error));
  __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, 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.common.SimpleInvoker.invoke_process", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":640
 *     return []
 * 
 *   def invoke_process_batch(self,             # <<<<<<<<<<<<<<
 *                      windowed_batch,  # type: WindowedBatch
 *                      restriction=None,
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_13SimpleInvoker_5invoke_process_batch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13SimpleInvoker_5invoke_process_batch = {"invoke_process_batch", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13SimpleInvoker_5invoke_process_batch, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_13SimpleInvoker_5invoke_process_batch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  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;
  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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_windowed_batch,&__pyx_n_s_restriction,&__pyx_n_s_watermark_estimator_state,&__pyx_n_s_additional_args,&__pyx_n_s_additional_kwargs,0};
    PyObject* values[5] = {0,0,0,0,0};

    /* "apache_beam/runners/common.py":642
 *   def invoke_process_batch(self,
 *                      windowed_batch,  # type: WindowedBatch
 *                      restriction=None,             # <<<<<<<<<<<<<<
 *                      watermark_estimator_state=None,
 *                      additional_args=None,
 */
    values[1] = ((PyObject *)Py_None);

    /* "apache_beam/runners/common.py":643
 *                      windowed_batch,  # type: WindowedBatch
 *                      restriction=None,
 *                      watermark_estimator_state=None,             # <<<<<<<<<<<<<<
 *                      additional_args=None,
 *                      additional_kwargs=None
 */
    values[2] = ((PyObject *)Py_None);

    /* "apache_beam/runners/common.py":644
 *                      restriction=None,
 *                      watermark_estimator_state=None,
 *                      additional_args=None,             # <<<<<<<<<<<<<<
 *                      additional_kwargs=None
 *                     ):
 */
    values[3] = ((PyObject *)Py_None);

    /* "apache_beam/runners/common.py":645
 *                      watermark_estimator_state=None,
 *                      additional_args=None,
 *                      additional_kwargs=None             # <<<<<<<<<<<<<<
 *                     ):
 *     # type: (...) -> None
 */
    values[4] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_windowed_batch)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_restriction);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_watermark_estimator_state);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_additional_args);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_additional_kwargs);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "invoke_process_batch") < 0)) __PYX_ERR(0, 640, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __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_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("invoke_process_batch", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 640, __pyx_L3_error)
  __pyx_L3_error:;
  __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":640
 *     return []
 * 
 *   def invoke_process_batch(self,             # <<<<<<<<<<<<<<
 *                      windowed_batch,  # type: WindowedBatch
 *                      restriction=None,
 */

  /* function exit code */
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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_TraceFrameInit(__pyx_codeobj__51)
  __Pyx_RefNannySetupContext("invoke_process_batch", 0);
  __Pyx_TraceCall("invoke_process_batch", __pyx_f[0], 640, 0, __PYX_ERR(0, 640, __pyx_L1_error));

  /* "apache_beam/runners/common.py":649
 *     # 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_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch))))) __PYX_ERR(0, 649, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowed_batch, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_self->process_batch_method);
  __pyx_t_3 = __pyx_v_self->process_batch_method; __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __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, 649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "apache_beam/runners/common.py":648
 *                     ):
 *     # 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, 648, __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":640
 *     return []
 * 
 *   def invoke_process_batch(self,             # <<<<<<<<<<<<<<
 *                      windowed_batch,  # type: WindowedBatch
 *                      restriction=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.common.SimpleInvoker.invoke_process_batch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__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_13SimpleInvoker_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13SimpleInvoker_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13SimpleInvoker_7__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_13SimpleInvoker_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__52)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (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:
 */
  __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.bundle_finalizer_param);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.bundle_finalizer_param);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.bundle_finalizer_param);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.output_handler));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.output_handler));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self->__pyx_base.output_handler));
  __Pyx_INCREF(__pyx_v_self->process_batch_method);
  __Pyx_GIVEREF(__pyx_v_self->process_batch_method);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->process_batch_method);
  __Pyx_INCREF(__pyx_v_self->process_method);
  __Pyx_GIVEREF(__pyx_v_self->process_method);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->process_method);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.signature));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.signature));
  PyTuple_SET_ITEM(__pyx_t_1, 4, ((PyObject *)__pyx_v_self->__pyx_base.signature));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.user_state_context);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.user_state_context);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_v_self->__pyx_base.user_state_context);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (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:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_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.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:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         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);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __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:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = 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_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:             # <<<<<<<<<<<<<<
 *         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.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), 0x7bd7f82, None), state
 */
  /*else*/ {
    __pyx_t_2 = (__pyx_v_self->__pyx_base.bundle_finalizer_param != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (((PyObject *)__pyx_v_self->__pyx_base.output_handler) != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_2 = (__pyx_v_self->process_batch_method != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->process_method != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base.signature) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.user_state_context != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = 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), 0x7bd7f82, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = 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), 0x7bd7f82, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_SimpleInvoker, (type(self), 0x7bd7f82, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_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))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_129859458);
    __Pyx_GIVEREF(__pyx_int_129859458);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_129859458);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = 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), 0x7bd7f82, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_SimpleInvoker, (type(self), 0x7bd7f82, None), state
 *     else:
 *         return __pyx_unpickle_SimpleInvoker, (type(self), 0x7bd7f82, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_SimpleInvoker__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_SimpleInvoker); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __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))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_129859458);
    __Pyx_GIVEREF(__pyx_int_129859458);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_129859458);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __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_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 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_6);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_SimpleInvoker, (type(self), 0x7bd7f82, 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, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13SimpleInvoker_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13SimpleInvoker_9__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_13SimpleInvoker_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __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));

  /* function exit code */
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__53)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 16, 0, __PYX_ERR(1, 16, __pyx_L1_error));

  /* "(tree fragment)":17
 *         return __pyx_unpickle_SimpleInvoker, (type(self), 0x7bd7f82, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_SimpleInvoker__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6common___pyx_unpickle_SimpleInvoker__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_SimpleInvoker, (type(self), 0x7bd7f82, 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_AddTraceback("apache_beam.runners.common.SimpleInvoker.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":652
 * 
 * 
 * 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, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_1_get_arg_placeholders = {"_get_arg_placeholders", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_1_get_arg_placeholders, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_1_get_arg_placeholders(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_method = 0;
  PyObject *__pyx_v_input_args = 0;
  PyObject *__pyx_v_input_kwargs = 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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_method,&__pyx_n_s_input_args,&__pyx_n_s_input_kwargs,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_method)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_input_args)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_get_arg_placeholders", 1, 3, 3, 1); __PYX_ERR(0, 652, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_input_kwargs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_get_arg_placeholders", 1, 3, 3, 2); __PYX_ERR(0, 652, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_get_arg_placeholders") < 0)) __PYX_ERR(0, 652, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)values[0]);
    __pyx_v_input_args = values[1];
    __pyx_v_input_kwargs = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_get_arg_placeholders", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 652, __pyx_L3_error)
  __pyx_L3_error:;
  __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_ptype_11apache_beam_7runners_6common_MethodWrapper, 1, "method", 0))) __PYX_ERR(0, 653, __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;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":666
 *   # 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, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_21_get_arg_placeholders_14ArgPlaceholder_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_21_get_arg_placeholders_14ArgPlaceholder_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_21_get_arg_placeholders_14ArgPlaceholder_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_placeholder = 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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_placeholder,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_placeholder)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 666, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 666, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_placeholder = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 666, __pyx_L3_error)
  __pyx_L3_error:;
  __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 */
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 666, 0, __PYX_ERR(0, 666, __pyx_L1_error));

  /* "apache_beam/runners/common.py":667
 *   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_n_s_placeholder, __pyx_v_placeholder) < 0) __PYX_ERR(0, 667, __pyx_L1_error)

  /* "apache_beam/runners/common.py":666
 *   # 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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_11apache_beam_7runners_6common_21_get_arg_placeholders_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "apache_beam/runners/common.py":669
 *       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(PyObject *__pyx_self) {
  struct __pyx_obj_11apache_beam_7runners_6common___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_7runners_6common___pyx_scope_struct_1_genexpr *)__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_1_genexpr(__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_1_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_1_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 669, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_11apache_beam_7runners_6common_21_get_arg_placeholders_2generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_get_arg_placeholders_locals_gen, __pyx_n_s_apache_beam_runners_common); if (unlikely(!gen)) __PYX_ERR(0, 669, __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_2generator(__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_genexpr *__pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_1_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  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);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 669, 0, __PYX_ERR(0, 669, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 669, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_default_arg_values)) { __Pyx_RaiseClosureNameError("default_arg_values"); __PYX_ERR(0, 669, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_default_arg_values)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_default_arg_values)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_default_arg_values; __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_outer_scope->__pyx_v_default_arg_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 669, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 669, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 669, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 669, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 669, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 669, __pyx_L1_error)
        }
        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_n_s_core); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 669, __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_n_s_ElementParam); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 669, __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, 669, __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, 669, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = ((!__pyx_t_6) != 0);
    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;
    }
  }
  /*else*/ {
    __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;
  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);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":652
 * 
 * 
 * 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) {
  struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders *__pyx_cur_scope;
  PyObject *__pyx_v_arg_names = 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_2generator = 0;
  PyObject *__pyx_8genexpr2__pyx_v_i = NULL;
  PyObject *__pyx_8genexpr2__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  int __pyx_t_16;
  PyObject *__pyx_t_17 = NULL;
  int __pyx_t_18;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__54)
  __Pyx_RefNannySetupContext("_get_arg_placeholders", 0);
  __pyx_cur_scope = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders *)__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders(__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 652, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("_get_arg_placeholders", __pyx_f[0], 652, 0, __PYX_ERR(0, 652, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_input_args);
  __Pyx_INCREF(__pyx_v_input_kwargs);

  /* "apache_beam/runners/common.py":656
 *     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 {}
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_input_args); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 656, __pyx_L1_error)
  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, 656, __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, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":657
 *     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, 657, __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, 657, __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, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":659
 *   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":660
 * 
 *   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_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_default_arg_values = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":665
 *   # 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_CalculateMetaclass(NULL, __pyx_tuple__55); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__55, __pyx_n_s_ArgPlaceholder, __pyx_n_s_get_arg_placeholders_locals_Arg, (PyObject *) NULL, __pyx_n_s_apache_beam_runners_common, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "apache_beam/runners/common.py":666
 *   # input_args and is a placeholder for side-inputs.
 *   class ArgPlaceholder(object):
 *     def __init__(self, placeholder):             # <<<<<<<<<<<<<<
 *       self.placeholder = placeholder
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_21_get_arg_placeholders_14ArgPlaceholder_1__init__, 0, __pyx_n_s_get_arg_placeholders_locals_Arg_2, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__57)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 666, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "apache_beam/runners/common.py":665
 *   # 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_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ArgPlaceholder, __pyx_tuple__55, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_ArgPlaceholder = __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":669
 *       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(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 669, __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, 669, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_2) {

    /* "apache_beam/runners/common.py":672
 *     # 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_5 = PyObject_Length(__pyx_v_arg_names); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 672, __pyx_L1_error)
    __pyx_t_3 = __pyx_cur_scope->__pyx_v_default_arg_values;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 672, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_args_to_pick = ((__pyx_t_5 - __pyx_t_6) - 1);

    /* "apache_beam/runners/common.py":675
 *     # 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_n_s_core); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 675, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 675, __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_n_s_ElementParam); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 675, __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, 675, __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, 675, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_1);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "apache_beam/runners/common.py":676
 *     # 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)
 */
    __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_input_args, 0, __pyx_v_args_to_pick, NULL, NULL, NULL, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 676, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "apache_beam/runners/common.py":675
 *     # 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, 675, __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 = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "apache_beam/runners/common.py":669
 *       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":678
 *                               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_6 = PyObject_Length(__pyx_v_arg_names); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 678, __pyx_L1_error)
    __pyx_t_4 = __pyx_cur_scope->__pyx_v_default_arg_values;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_5 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 678, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_args_to_pick = (__pyx_t_6 - __pyx_t_5);

    /* "apache_beam/runners/common.py":679
 *   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
 */
    __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_input_args, 0, __pyx_v_args_to_pick, NULL, NULL, NULL, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_args_with_placeholders = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  __pyx_L3:;

  /* "apache_beam/runners/common.py":682
 * 
 *   # 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:
 */
  __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_input_args, __pyx_v_args_to_pick, 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 682, __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":683
 *   # 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_1 = __pyx_cur_scope->__pyx_v_default_arg_values;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_5 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 683, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_arg_names, (-__pyx_t_5), 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_default_arg_values);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_default_arg_values);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_cur_scope->__pyx_v_default_arg_values);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  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_5 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 683, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 683, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_7)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 683, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 683, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 683, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 683, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_7(__pyx_t_4);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 683, __pyx_L1_error)
        }
        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, 683, __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_t_8 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 683, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 683, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      #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, 683, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
      index = 0; __pyx_t_3 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_3)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_8);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 683, __pyx_L1_error)
      __pyx_t_10 = NULL;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_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, 683, __pyx_L1_error)
      __pyx_L7_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_a, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_d, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "apache_beam/runners/common.py":684
 *   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_n_s_core); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 684, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 684, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_ElementParam); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 684, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyObject_RichCompare(__pyx_t_1, __pyx_v_d, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 684, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 684, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_2) {

      /* "apache_beam/runners/common.py":685
 *   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_8 = __Pyx_PyObject_CallOneArg(__pyx_v_ArgPlaceholder, __pyx_v_d); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 685, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_args_with_placeholders, __pyx_t_8); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 685, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "apache_beam/runners/common.py":684
 *   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":686
 *     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_8, __pyx_n_s_core); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 686, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_KeyParam); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 686, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_8, __pyx_v_d, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 686, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "apache_beam/runners/common.py":687
 *       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, 687, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_args_with_placeholders, __pyx_t_1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 687, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "apache_beam/runners/common.py":686
 *     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":688
 *     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.TimestampParam == d:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_core); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 688, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 688, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_WindowParam); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 688, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyObject_RichCompare(__pyx_t_1, __pyx_v_d, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 688, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 688, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_2) {

      /* "apache_beam/runners/common.py":689
 *       args_with_placeholders.append(ArgPlaceholder(d))
 *     elif core.DoFn.WindowParam == d:
 *       args_with_placeholders.append(ArgPlaceholder(d))             # <<<<<<<<<<<<<<
 *     elif core.DoFn.TimestampParam == d:
 *       args_with_placeholders.append(ArgPlaceholder(d))
 */
      __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_v_ArgPlaceholder, __pyx_v_d); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 689, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_args_with_placeholders, __pyx_t_8); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 689, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "apache_beam/runners/common.py":688
 *     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.TimestampParam == d:
 */
      goto __pyx_L8;
    }

    /* "apache_beam/runners/common.py":690
 *     elif core.DoFn.WindowParam == 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_8, __pyx_n_s_core); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 690, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 690, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_TimestampParam); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 690, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_8, __pyx_v_d, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 690, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 690, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "apache_beam/runners/common.py":691
 *       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_1 = __Pyx_PyObject_CallOneArg(__pyx_v_ArgPlaceholder, __pyx_v_d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 691, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_args_with_placeholders, __pyx_t_1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 691, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "apache_beam/runners/common.py":690
 *     elif core.DoFn.WindowParam == 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":692
 *     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_1, __pyx_n_s_core); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_PaneInfoParam); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyObject_RichCompare(__pyx_t_1, __pyx_v_d, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 692, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 692, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_2) {

      /* "apache_beam/runners/common.py":693
 *       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_8 = __Pyx_PyObject_CallOneArg(__pyx_v_ArgPlaceholder, __pyx_v_d); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 693, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_args_with_placeholders, __pyx_t_8); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 693, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "apache_beam/runners/common.py":692
 *     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":694
 *     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_8, __pyx_n_s_core); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 694, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 694, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_SideInputParam); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 694, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_8, __pyx_v_d, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 694, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 694, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "apache_beam/runners/common.py":696
 *     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_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/common.py":697
 *       # 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_1 = __Pyx_PyIter_Next(__pyx_v_remaining_args_iter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 697, __pyx_L9_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_args_with_placeholders, __pyx_t_1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 697, __pyx_L9_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "apache_beam/runners/common.py":696
 *     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_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_L16_try_end;
        __pyx_L9_error:;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "apache_beam/runners/common.py":698
 *       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_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_StopIteration);
        if (__pyx_t_15) {
          __Pyx_AddTraceback("apache_beam.runners.common._get_arg_placeholders", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_3) < 0) __PYX_ERR(0, 698, __pyx_L11_except_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_GOTREF(__pyx_t_3);

          /* "apache_beam/runners/common.py":699
 *         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_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_a, __pyx_v_input_kwargs, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 699, __pyx_L11_except_error)
          __pyx_t_16 = (__pyx_t_2 != 0);
          if (unlikely(__pyx_t_16)) {

            /* "apache_beam/runners/common.py":700
 *       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_9 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Value_for_sideinput_s_not_provid, __pyx_v_a); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 700, __pyx_L11_except_error)
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_17 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_9); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 700, __pyx_L11_except_error)
            __Pyx_GOTREF(__pyx_t_17);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_Raise(__pyx_t_17, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
            __PYX_ERR(0, 700, __pyx_L11_except_error)

            /* "apache_beam/runners/common.py":699
 *         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_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          goto __pyx_L10_exception_handled;
        }
        goto __pyx_L11_except_error;
        __pyx_L11_except_error:;

        /* "apache_beam/runners/common.py":696
 *     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_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_L1_error;
        __pyx_L10_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_L16_try_end:;
      }

      /* "apache_beam/runners/common.py":694
 *     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":701
 *         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_3, __pyx_n_s_core); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 701, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 701, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_StateParam); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 701, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_16 = PyObject_IsInstance(__pyx_v_d, __pyx_t_3); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 701, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = (__pyx_t_16 != 0);
    if (__pyx_t_2) {

      /* "apache_beam/runners/common.py":702
 *           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_3 = __Pyx_PyObject_CallOneArg(__pyx_v_ArgPlaceholder, __pyx_v_d); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 702, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_args_with_placeholders, __pyx_t_3); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 702, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "apache_beam/runners/common.py":701
 *         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":703
 *     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_3, __pyx_n_s_core); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 703, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 703, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_TimerParam); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 703, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_2 = PyObject_IsInstance(__pyx_v_d, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 703, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_16 = (__pyx_t_2 != 0);
    if (__pyx_t_16) {

      /* "apache_beam/runners/common.py":704
 *       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_3 = __Pyx_PyObject_CallOneArg(__pyx_v_ArgPlaceholder, __pyx_v_d); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 704, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_args_with_placeholders, __pyx_t_3); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 704, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "apache_beam/runners/common.py":703
 *     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":705
 *     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))
 *     else:
 */
    __pyx_t_2 = PyType_Check(__pyx_v_d); 
    __pyx_t_18 = (__pyx_t_2 != 0);
    if (__pyx_t_18) {
    } else {
      __pyx_t_16 = __pyx_t_18;
      goto __pyx_L20_bool_binop_done;
    }
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_core); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 705, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 705, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_BundleFinalizerParam); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 705, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyObject_RichCompare(__pyx_t_3, __pyx_v_d, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 705, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_18 < 0)) __PYX_ERR(0, 705, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_16 = __pyx_t_18;
    __pyx_L20_bool_binop_done:;
    if (__pyx_t_16) {

      /* "apache_beam/runners/common.py":706
 *       args_with_placeholders.append(ArgPlaceholder(d))
 *     elif isinstance(d, type) and core.DoFn.BundleFinalizerParam == d:
 *       args_with_placeholders.append(ArgPlaceholder(d))             # <<<<<<<<<<<<<<
 *     else:
 *       # If no more args are present then the value must be passed via kwarg
 */
      __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_v_ArgPlaceholder, __pyx_v_d); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 706, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_args_with_placeholders, __pyx_t_8); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 706, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "apache_beam/runners/common.py":705
 *     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))
 *     else:
 */
      goto __pyx_L8;
    }

    /* "apache_beam/runners/common.py":709
 *     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_14, &__pyx_t_13, &__pyx_t_12);
        __Pyx_XGOTREF(__pyx_t_14);
        __Pyx_XGOTREF(__pyx_t_13);
        __Pyx_XGOTREF(__pyx_t_12);
        /*try:*/ {

          /* "apache_beam/runners/common.py":710
 *       # 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_8 = __Pyx_PyIter_Next(__pyx_v_remaining_args_iter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 710, __pyx_L22_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_args_with_placeholders, __pyx_t_8); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 710, __pyx_L22_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

          /* "apache_beam/runners/common.py":709
 *     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_14); __pyx_t_14 = 0;
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        goto __pyx_L29_try_end;
        __pyx_L22_error:;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "apache_beam/runners/common.py":711
 *       try:
 *         args_with_placeholders.append(next(remaining_args_iter))
 *       except StopIteration:             # <<<<<<<<<<<<<<
 *         pass
 *   args_with_placeholders.extend(list(remaining_args_iter))
 */
        __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_StopIteration);
        if (__pyx_t_15) {
          __Pyx_ErrRestore(0,0,0);
          goto __pyx_L23_exception_handled;
        }
        goto __pyx_L24_except_error;
        __pyx_L24_except_error:;

        /* "apache_beam/runners/common.py":709
 *     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_XGIVEREF(__pyx_t_14);
        __Pyx_XGIVEREF(__pyx_t_13);
        __Pyx_XGIVEREF(__pyx_t_12);
        __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12);
        goto __pyx_L1_error;
        __pyx_L23_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_14);
        __Pyx_XGIVEREF(__pyx_t_13);
        __Pyx_XGIVEREF(__pyx_t_12);
        __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12);
        __pyx_L29_try_end:;
      }
    }
    __pyx_L8:;

    /* "apache_beam/runners/common.py":683
 *   # 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_4); __pyx_t_4 = 0;

  /* "apache_beam/runners/common.py":713
 *       except StopIteration:
 *         pass
 *   args_with_placeholders.extend(list(remaining_args_iter))             # <<<<<<<<<<<<<<
 * 
 *   # Stash the list of placeholder positions for performance
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_args_with_placeholders, __pyx_n_s_extend); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_3 = PySequence_List(__pyx_v_remaining_args_iter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  __pyx_t_4 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_1, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "apache_beam/runners/common.py":716
 * 
 *   # 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_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 716, __pyx_L32_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_int_0);
    __pyx_t_8 = __pyx_int_0;

    /* "apache_beam/runners/common.py":717
 *   # Stash the list of placeholder positions for performance
 *   placeholders = [(i, x.placeholder)
 *                   for (i, x) in enumerate(args_with_placeholders)             # <<<<<<<<<<<<<<
 *                   if isinstance(x, ArgPlaceholder)]
 * 
 */
    if (likely(PyList_CheckExact(__pyx_v_args_with_placeholders)) || PyTuple_CheckExact(__pyx_v_args_with_placeholders)) {
      __pyx_t_3 = __pyx_v_args_with_placeholders; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_args_with_placeholders); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 717, __pyx_L32_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 717, __pyx_L32_error)
    }
    for (;;) {
      if (likely(!__pyx_t_7)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 717, __pyx_L32_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 717, __pyx_L32_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 717, __pyx_L32_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 717, __pyx_L32_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_7(__pyx_t_3);
        if (unlikely(!__pyx_t_1)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 717, __pyx_L32_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_x, __pyx_t_1);
      __pyx_t_1 = 0;
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_i, __pyx_t_8);
      __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_t_8, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 717, __pyx_L32_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8);
      __pyx_t_8 = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "apache_beam/runners/common.py":718
 *   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_16 = PyObject_IsInstance(__pyx_8genexpr2__pyx_v_x, __pyx_v_ArgPlaceholder); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 718, __pyx_L32_error)
      __pyx_t_18 = (__pyx_t_16 != 0);
      if (__pyx_t_18) {

        /* "apache_beam/runners/common.py":716
 * 
 *   # 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_1 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr2__pyx_v_x, __pyx_n_s_placeholder); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 716, __pyx_L32_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17 = PyTuple_New(2); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 716, __pyx_L32_error)
        __Pyx_GOTREF(__pyx_t_17);
        __Pyx_INCREF(__pyx_8genexpr2__pyx_v_i);
        __Pyx_GIVEREF(__pyx_8genexpr2__pyx_v_i);
        PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_8genexpr2__pyx_v_i);
        __Pyx_GIVEREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_t_1);
        __pyx_t_1 = 0;
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_17))) __PYX_ERR(0, 716, __pyx_L32_error)
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;

        /* "apache_beam/runners/common.py":718
 *   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":717
 *   # 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_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_i); __pyx_8genexpr2__pyx_v_i = 0;
    __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_x); __pyx_8genexpr2__pyx_v_x = 0;
    goto __pyx_L36_exit_scope;
    __pyx_L32_error:;
    __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_i); __pyx_8genexpr2__pyx_v_i = 0;
    __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_x); __pyx_8genexpr2__pyx_v_x = 0;
    goto __pyx_L1_error;
    __pyx_L36_exit_scope:;
  } /* exit inner scope */
  __pyx_v_placeholders = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "apache_beam/runners/common.py":720
 *                   if isinstance(x, ArgPlaceholder)]
 * 
 *   return placeholders, args_with_placeholders, input_kwargs             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_placeholders);
  __Pyx_GIVEREF(__pyx_v_placeholders);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_placeholders);
  __Pyx_INCREF(__pyx_v_args_with_placeholders);
  __Pyx_GIVEREF(__pyx_v_args_with_placeholders);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_args_with_placeholders);
  __Pyx_INCREF(__pyx_v_input_kwargs);
  __Pyx_GIVEREF(__pyx_v_input_kwargs);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_input_kwargs);
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "apache_beam/runners/common.py":652
 * 
 * 
 * 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_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_17);
  __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_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_2generator);
  __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_i);
  __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_x);
  __Pyx_XDECREF(__pyx_v_input_args);
  __Pyx_XDECREF(__pyx_v_input_kwargs);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":726
 *   """An invoker that processes elements considering windowing information."""
 * 
 *   def __init__(self,             # <<<<<<<<<<<<<<
 *                output_handler,  # type: OutputHandler
 *                signature,  # type: DoFnSignature
 */

/* 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_output_handler,&__pyx_n_s_signature,&__pyx_n_s_context,&__pyx_n_s_side_inputs,&__pyx_n_s_input_args,&__pyx_n_s_input_kwargs,&__pyx_n_s_user_state_context,&__pyx_n_s_bundle_finalizer_param,0};
    PyObject* values[8] = {0,0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_output_handler)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_signature)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 1); __PYX_ERR(0, 726, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_context)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 2); __PYX_ERR(0, 726, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_side_inputs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 3); __PYX_ERR(0, 726, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_input_args)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 4); __PYX_ERR(0, 726, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_input_kwargs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 5); __PYX_ERR(0, 726, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_user_state_context)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 6); __PYX_ERR(0, 726, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bundle_finalizer_param)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 7); __PYX_ERR(0, 726, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 726, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 8) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
      values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
      values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
    }
    __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_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 726, __pyx_L3_error)
  __pyx_L3_error:;
  __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 */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___2generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "apache_beam/runners/common.py":742
 *     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(PyObject *__pyx_self) {
  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_ptype_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr, __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, 742, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2___init__ *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___2generator1, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr, __pyx_n_s_apache_beam_runners_common); if (unlikely(!gen)) __PYX_ERR(0, 742, __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___2generator1(__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;
  __Pyx_TraceDeclarations
  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;
  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_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 742, 0, __PYX_ERR(0, 742, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 742, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_side_inputs)) { __Pyx_RaiseClosureNameError("side_inputs"); __PYX_ERR(0, 742, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_side_inputs)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_side_inputs)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_side_inputs; __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_outer_scope->__pyx_v_side_inputs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 742, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 742, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 742, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 742, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 742, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 742, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 742, __pyx_L1_error)
        }
        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_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_si, __pyx_n_s_is_globally_windowed); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 742, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 742, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 742, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_8 = ((!__pyx_t_7) != 0);
    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;
    }
  }
  /*else*/ {
    __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;
  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);
  __Pyx_XDECREF(__pyx_t_6);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___5generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "apache_beam/runners/common.py":743
 *     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(PyObject *__pyx_self) {
  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_ptype_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr, __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, 743, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2___init__ *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___5generator2, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr, __pyx_n_s_apache_beam_runners_common); if (unlikely(!gen)) __PYX_ERR(0, 743, __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___5generator2(__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;
  __Pyx_TraceDeclarations
  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;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 743, 0, __PYX_ERR(0, 743, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 743, __pyx_L1_error)

  /* "apache_beam/runners/common.py":744
 *         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_outer_scope->__pyx_v_signature)) { __Pyx_RaiseClosureNameError("signature"); __PYX_ERR(0, 744, __pyx_L1_error) }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_signature, __pyx_n_s_process_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 744, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_defaults); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 744, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  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, 744, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 744, __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))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 744, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 744, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 744, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 744, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_4(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 744, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_arg);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_arg, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;

    /* "apache_beam/runners/common.py":743
 *     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_2, __pyx_n_s_core); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 743, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 743, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_WindowParam); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 743, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_cur_scope->__pyx_v_arg, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 743, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 743, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_6) {

      /* "apache_beam/runners/common.py":742
 *     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":743
 *     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":744
 *         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
 */
  }
  /*else*/ {

    /* "apache_beam/runners/common.py":742
 *     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":743
 *     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;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "apache_beam/runners/common.py":744
 *         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;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "apache_beam/runners/common.py":743
 *     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
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___8generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "apache_beam/runners/common.py":745
 *             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(PyObject *__pyx_self) {
  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_ptype_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr, __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, 745, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2___init__ *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___8generator3, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr, __pyx_n_s_apache_beam_runners_common); if (unlikely(!gen)) __PYX_ERR(0, 745, __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___8generator3(__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;
  __Pyx_TraceDeclarations
  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;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 745, 0, __PYX_ERR(0, 745, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 745, __pyx_L1_error)

  /* "apache_beam/runners/common.py":746
 *             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_outer_scope->__pyx_v_signature)) { __Pyx_RaiseClosureNameError("signature"); __PYX_ERR(0, 746, __pyx_L1_error) }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_signature, __pyx_n_s_process_batch_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_defaults); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  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, 746, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 746, __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))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 746, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 746, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 746, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 746, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_4(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 746, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_arg);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_arg, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;

    /* "apache_beam/runners/common.py":745
 *             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_2, __pyx_n_s_core); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 745, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 745, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_WindowParam); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 745, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_cur_scope->__pyx_v_arg, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 745, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 745, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_6) {

      /* "apache_beam/runners/common.py":744
 *         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":745
 *             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":746
 *             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
 */
  }
  /*else*/ {

    /* "apache_beam/runners/common.py":744
 *         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":745
 *             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;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "apache_beam/runners/common.py":746
 *             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;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "apache_beam/runners/common.py":745
 *             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())
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___11generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "apache_beam/runners/common.py":751
 *     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(PyObject *__pyx_self) {
  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_ptype_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr, __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, 751, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2___init__ *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___11generator4, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr, __pyx_n_s_apache_beam_runners_common); if (unlikely(!gen)) __PYX_ERR(0, 751, __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___11generator4(__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;
  __Pyx_TraceDeclarations
  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);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 751, 0, __PYX_ERR(0, 751, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 751, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_default_arg_values)) { __Pyx_RaiseClosureNameError("default_arg_values"); __PYX_ERR(0, 751, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_default_arg_values)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_default_arg_values)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_default_arg_values; __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_outer_scope->__pyx_v_default_arg_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 751, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 751, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 751, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 751, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 751, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 751, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 751, __pyx_L1_error)
        }
        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_n_s_core); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 751, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 751, __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_n_s_KeyParam); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 751, __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, 751, __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, 751, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_6) {

      /* "apache_beam/runners/common.py":750
 *     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":751
 *     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;
    }
  }
  /*else*/ {

    /* "apache_beam/runners/common.py":750
 *     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":751
 *     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;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __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_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":726
 *   """An invoker that processes elements considering windowing information."""
 * 
 *   def __init__(self,             # <<<<<<<<<<<<<<
 *                output_handler,  # type: OutputHandler
 *                signature,  # type: DoFnSignature
 */

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) {
  struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2___init__ *__pyx_cur_scope;
  PyObject *__pyx_gb_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___2generator1 = 0;
  PyObject *__pyx_gb_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___5generator2 = 0;
  PyObject *__pyx_gb_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___8generator3 = 0;
  PyObject *__pyx_gb_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___11generator4 = 0;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __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;
  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_cur_scope = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2___init__ *)__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_2___init__(__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_2___init__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2___init__ *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 726, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("__init__", __pyx_f[0], 726, 0, __PYX_ERR(0, 726, __pyx_L1_error));
  __pyx_cur_scope->__pyx_v_signature = __pyx_v_signature;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_signature);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_signature);
  __pyx_cur_scope->__pyx_v_side_inputs = __pyx_v_side_inputs;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_side_inputs);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_side_inputs);
  __Pyx_INCREF(__pyx_v_input_args);

  /* "apache_beam/runners/common.py":736
 *                bundle_finalizer_param  # type: Optional[core._BundleFinalizerParam]
 *               ):
 *     super().__init__(output_handler, signature)             # <<<<<<<<<<<<<<
 *     self.side_inputs = side_inputs
 *     self.context = context
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker));
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self));
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 736, __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_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_output_handler, __pyx_cur_scope->__pyx_v_signature};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 736, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_output_handler, __pyx_cur_scope->__pyx_v_signature};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 736, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 736, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_output_handler);
    __Pyx_GIVEREF(__pyx_v_output_handler);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_output_handler);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_signature);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_signature);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_cur_scope->__pyx_v_signature);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); 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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":737
 *               ):
 *     super().__init__(output_handler, signature)
 *     self.side_inputs = side_inputs             # <<<<<<<<<<<<<<
 *     self.context = context
 *     self.process_method = signature.process_method.method_value
 */
  if (!(likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_side_inputs))||((__pyx_cur_scope->__pyx_v_side_inputs) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_cur_scope->__pyx_v_side_inputs)->tp_name), 0))) __PYX_ERR(0, 737, __pyx_L1_error)
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_side_inputs;
  __Pyx_INCREF(__pyx_t_1);
  __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":738
 *     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
 */
  if (!(likely(((__pyx_v_context) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_context, __pyx_ptype_11apache_beam_7runners_6common_DoFnContext))))) __PYX_ERR(0, 738, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_context;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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":739
 *     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_cur_scope->__pyx_v_signature, __pyx_n_s_process_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_method_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->process_method);
  __Pyx_DECREF(__pyx_v_self->process_method);
  __pyx_v_self->process_method = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":740
 *     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_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_signature, __pyx_n_s_process_method); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_defaults); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_default_arg_values = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":742
 *     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(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Generator_Next(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 742, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_8 = ((!__pyx_t_7) != 0);
  if (!__pyx_t_8) {
  } else {
    __pyx_t_6 = __pyx_t_8;
    goto __pyx_L3_bool_binop_done;
  }

  /* "apache_beam/runners/common.py":743
 *     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_2 = __pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_Generator_Next(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 743, __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":745
 *             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(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Generator_Next(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __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, 745, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!__pyx_t_8) {
  } else {
    __pyx_t_6 = __pyx_t_8;
    goto __pyx_L3_bool_binop_done;
  }

  /* "apache_beam/runners/common.py":747
 *                 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_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_signature, __pyx_n_s_is_stateful_dofn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 747, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 747, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __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, 747, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = __pyx_t_8;
  __pyx_L3_bool_binop_done:;

  /* "apache_beam/runners/common.py":741
 *     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":748
 *                 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":749
 *         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_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_signature, __pyx_n_s_is_splittable_dofn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_self->is_splittable = __pyx_t_6;

  /* "apache_beam/runners/common.py":751
 *     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_2 = __pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___9genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_Generator_Next(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 751, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":750
 *     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":752
 *     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":753
 *         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":754
 *     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(__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":755
 *     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":756
 *     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
 */
  __pyx_t_6 = (__pyx_v_self->is_splittable != 0);
  if (__pyx_t_6) {

    /* "apache_beam/runners/common.py":757
 *     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_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_threading); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 757, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Lock); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 757, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 757, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __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":758
 *     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":759
 *       self.splitting_lock = threading.Lock()
 *       self.current_window_index = None
 *       self.stop_window_index = None             # <<<<<<<<<<<<<<
 * 
 *     # Flag to cache additional arguments on the first element if all
 */
    __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":756
 *     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":763
 *     # Flag to cache additional arguments on the first element if all
 *     # inputs are within the global window.
 *     self.cache_globally_windowed_args = not self.has_windowed_inputs             # <<<<<<<<<<<<<<
 * 
 *     # Try to prepare all the arguments that can just be filled in
 */
  __pyx_v_self->cache_globally_windowed_args = (!(__pyx_v_self->has_windowed_inputs != 0));

  /* "apache_beam/runners/common.py":768
 *     # 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_1 = PySequence_List(__pyx_v_input_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 768, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_input_args, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":772
 *         self.placeholders_for_process,
 *         self.args_for_process,
 *         self.kwargs_for_process) = _get_arg_placeholders(             # <<<<<<<<<<<<<<
 *             signature.process_method, input_args, input_kwargs)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_get_arg_placeholders); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "apache_beam/runners/common.py":773
 *         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_cur_scope->__pyx_v_signature, __pyx_n_s_process_method); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_t_2, __pyx_v_input_args, __pyx_v_input_kwargs};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 772, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_t_2, __pyx_v_input_args, __pyx_v_input_kwargs};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 772, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  #endif
  {
    __pyx_t_9 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 772, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_4, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_input_args);
    __Pyx_GIVEREF(__pyx_v_input_args);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_4, __pyx_v_input_args);
    __Pyx_INCREF(__pyx_v_input_kwargs);
    __Pyx_GIVEREF(__pyx_v_input_kwargs);
    PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_4, __pyx_v_input_kwargs);
    __pyx_t_2 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 772, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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 != 3)) {
      if (size > 3) __Pyx_RaiseTooManyValuesError(3);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 770, __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_t_9 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 2); 
    } else {
      __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 2); 
    }
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_9);
    __Pyx_INCREF(__pyx_t_2);
    #else
    __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 770, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 770, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_2 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 770, __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, 770, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_10 = Py_TYPE(__pyx_t_3)->tp_iternext;
    index = 0; __pyx_t_5 = __pyx_t_10(__pyx_t_3); if (unlikely(!__pyx_t_5)) goto __pyx_L8_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_5);
    index = 1; __pyx_t_9 = __pyx_t_10(__pyx_t_3); if (unlikely(!__pyx_t_9)) goto __pyx_L8_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_9);
    index = 2; __pyx_t_2 = __pyx_t_10(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L8_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_3), 3) < 0) __PYX_ERR(0, 770, __pyx_L1_error)
    __pyx_t_10 = 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_10 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 770, __pyx_L1_error)
    __pyx_L9_unpacking_done:;
  }

  /* "apache_beam/runners/common.py":770
 *     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_5))||((__pyx_t_5) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_5)->tp_name), 0))) __PYX_ERR(0, 770, __pyx_L1_error)
  if (!(likely(PyList_CheckExact(__pyx_t_9))||((__pyx_t_9) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_9)->tp_name), 0))) __PYX_ERR(0, 770, __pyx_L1_error)
  if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 770, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_5);
  __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_5);
  __pyx_t_5 = 0;

  /* "apache_beam/runners/common.py":771
 *     (
 *         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_9);
  __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_9);
  __pyx_t_9 = 0;

  /* "apache_beam/runners/common.py":772
 *         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->kwargs_for_process);
  __Pyx_DECREF(__pyx_v_self->kwargs_for_process);
  __pyx_v_self->kwargs_for_process = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":775
 *             signature.process_method, input_args, input_kwargs)
 * 
 *     self.process_batch_method = signature.process_batch_method.method_value             # <<<<<<<<<<<<<<
 * 
 *     (
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_signature, __pyx_n_s_process_batch_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_method_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->process_batch_method);
  __Pyx_DECREF(__pyx_v_self->process_batch_method);
  __pyx_v_self->process_batch_method = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":780
 *         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_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_get_arg_placeholders); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "apache_beam/runners/common.py":781
 *         self.args_for_process_batch,
 *         self.kwargs_for_process_batch) = _get_arg_placeholders(
 *             signature.process_batch_method, input_args, input_kwargs)             # <<<<<<<<<<<<<<
 * 
 *   def invoke_process(self,
 */
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_signature, __pyx_n_s_process_batch_method); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_5 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_9, __pyx_v_input_args, __pyx_v_input_kwargs};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 780, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_9, __pyx_v_input_args, __pyx_v_input_kwargs};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 780, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  } else
  #endif
  {
    __pyx_t_3 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 780, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_4, __pyx_t_9);
    __Pyx_INCREF(__pyx_v_input_args);
    __Pyx_GIVEREF(__pyx_v_input_args);
    PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_4, __pyx_v_input_args);
    __Pyx_INCREF(__pyx_v_input_kwargs);
    __Pyx_GIVEREF(__pyx_v_input_kwargs);
    PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_4, __pyx_v_input_kwargs);
    __pyx_t_9 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 780, __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 ((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 != 3)) {
      if (size > 3) __Pyx_RaiseTooManyValuesError(3);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 778, __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_t_3 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_9 = PyTuple_GET_ITEM(sequence, 2); 
    } else {
      __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_9 = PyList_GET_ITEM(sequence, 2); 
    }
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_9);
    #else
    __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 778, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 778, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 778, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    #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, 778, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_10 = Py_TYPE(__pyx_t_5)->tp_iternext;
    index = 0; __pyx_t_1 = __pyx_t_10(__pyx_t_5); if (unlikely(!__pyx_t_1)) goto __pyx_L10_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    index = 1; __pyx_t_3 = __pyx_t_10(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L10_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 2; __pyx_t_9 = __pyx_t_10(__pyx_t_5); if (unlikely(!__pyx_t_9)) goto __pyx_L10_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_9);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_5), 3) < 0) __PYX_ERR(0, 778, __pyx_L1_error)
    __pyx_t_10 = NULL;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L11_unpacking_done;
    __pyx_L10_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_10 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 778, __pyx_L1_error)
    __pyx_L11_unpacking_done:;
  }

  /* "apache_beam/runners/common.py":778
 * 
 *     (
 *         self.placeholders_for_process_batch,             # <<<<<<<<<<<<<<
 *         self.args_for_process_batch,
 *         self.kwargs_for_process_batch) = _get_arg_placeholders(
 */
  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 778, __pyx_L1_error)
  if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 778, __pyx_L1_error)
  if (!(likely(PyDict_CheckExact(__pyx_t_9))||((__pyx_t_9) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_9)->tp_name), 0))) __PYX_ERR(0, 778, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __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_1);
  __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":779
 *     (
 *         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":780
 *         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_9);
  __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_9);
  __pyx_t_9 = 0;

  /* "apache_beam/runners/common.py":726
 *   """An invoker that processes elements considering windowing information."""
 * 
 *   def __init__(self,             # <<<<<<<<<<<<<<
 *                output_handler,  # type: OutputHandler
 *                signature,  # type: DoFnSignature
 */

  /* 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_5);
  __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_gb_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___2generator1);
  __Pyx_XDECREF(__pyx_gb_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___5generator2);
  __Pyx_XDECREF(__pyx_gb_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___8generator3);
  __Pyx_XDECREF(__pyx_gb_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___11generator4);
  __Pyx_XDECREF(__pyx_v_input_args);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":783
 *             signature.process_batch_method, input_args, input_kwargs)
 * 
 *   def invoke_process(self,             # <<<<<<<<<<<<<<
 *                      windowed_value,  # type: WindowedValue
 *                      restriction=None,
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_3invoke_process(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*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":785
 *   def invoke_process(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":786
 *                      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":787
 *                      restriction=None,
 *                      watermark_estimator_state=None,
 *                      additional_args=None,             # <<<<<<<<<<<<<<
 *                      additional_kwargs=None
 *                     ):
 */
  PyObject *__pyx_v_additional_args = ((PyObject *)Py_None);

  /* "apache_beam/runners/common.py":788
 *                      watermark_estimator_state=None,
 *                      additional_args=None,
 *                      additional_kwargs=None             # <<<<<<<<<<<<<<
 *                     ):
 *     # type: (...) -> Iterable[SplitResultResidual]
 */
  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_TraceDeclarations
  __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;
  PyObject *__pyx_t_6 = NULL;
  int __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;
  Py_ssize_t __pyx_t_13;
  PyObject *(*__pyx_t_14)(PyObject *);
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_t_17;
  int __pyx_t_18;
  char const *__pyx_t_19;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__58)
  __Pyx_RefNannySetupContext("invoke_process", 0);
  __Pyx_TraceCall("invoke_process", __pyx_f[0], 783, 0, __PYX_ERR(0, 783, __pyx_L1_error));
  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":783
 *             signature.process_batch_method, input_args, input_kwargs)
 * 
 *   def invoke_process(self,             # <<<<<<<<<<<<<<
 *                      windowed_value,  # type: WindowedValue
 *                      restriction=None,
 */
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_invoke_process); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 783, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_3invoke_process)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[6] = {__pyx_t_4, ((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_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 5+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 783, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[6] = {__pyx_t_4, ((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_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 5+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 783, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(5+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 783, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
          }
          __Pyx_INCREF(((PyObject *)__pyx_v_windowed_value));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_windowed_value));
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, ((PyObject *)__pyx_v_windowed_value));
          __Pyx_INCREF(__pyx_v_restriction);
          __Pyx_GIVEREF(__pyx_v_restriction);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_restriction);
          __Pyx_INCREF(__pyx_v_watermark_estimator_state);
          __Pyx_GIVEREF(__pyx_v_watermark_estimator_state);
          PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_watermark_estimator_state);
          __Pyx_INCREF(__pyx_v_additional_args);
          __Pyx_GIVEREF(__pyx_v_additional_args);
          PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_5, __pyx_v_additional_args);
          __Pyx_INCREF(__pyx_v_additional_kwargs);
          __Pyx_GIVEREF(__pyx_v_additional_kwargs);
          PyTuple_SET_ITEM(__pyx_t_6, 4+__pyx_t_5, __pyx_v_additional_kwargs);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 783, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __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_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_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":791
 *                     ):
 *     # type: (...) -> Iterable[SplitResultResidual]
 *     if not additional_args:             # <<<<<<<<<<<<<<
 *       additional_args = []
 *     if not additional_kwargs:
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_additional_args); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 791, __pyx_L1_error)
  __pyx_t_8 = ((!__pyx_t_7) != 0);
  if (__pyx_t_8) {

    /* "apache_beam/runners/common.py":792
 *     # 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, 792, __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":791
 *                     ):
 *     # type: (...) -> Iterable[SplitResultResidual]
 *     if not additional_args:             # <<<<<<<<<<<<<<
 *       additional_args = []
 *     if not additional_kwargs:
 */
  }

  /* "apache_beam/runners/common.py":793
 *     if not additional_args:
 *       additional_args = []
 *     if not additional_kwargs:             # <<<<<<<<<<<<<<
 *       additional_kwargs = {}
 * 
 */
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_additional_kwargs); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 793, __pyx_L1_error)
  __pyx_t_7 = ((!__pyx_t_8) != 0);
  if (__pyx_t_7) {

    /* "apache_beam/runners/common.py":794
 *       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, 794, __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":793
 *     if not additional_args:
 *       additional_args = []
 *     if not additional_kwargs:             # <<<<<<<<<<<<<<
 *       additional_kwargs = {}
 * 
 */
  }

  /* "apache_beam/runners/common.py":796
 *       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, 796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":801
 *     # 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, 801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_residuals = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":802
 * 
 *     residuals = []
 *     if self.is_splittable:             # <<<<<<<<<<<<<<
 *       if restriction is None:
 *         # This may be a SDF invoked as an ordinary DoFn on runners that don't
 */
  __pyx_t_7 = (__pyx_v_self->is_splittable != 0);
  if (__pyx_t_7) {

    /* "apache_beam/runners/common.py":803
 *     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_7 = (__pyx_v_restriction == Py_None);
    __pyx_t_8 = (__pyx_t_7 != 0);
    if (__pyx_t_8) {

      /* "apache_beam/runners/common.py":809
 *         # the entire initial restriction.
 *         restriction = self.signature.initial_restriction_method.method_value(
 *             windowed_value.value)             # <<<<<<<<<<<<<<
 * 
 *       with self.splitting_lock:
 */
      __Pyx_INCREF(__pyx_v_self->__pyx_base.signature->initial_restriction_method->method_value);
      __pyx_t_2 = __pyx_v_self->__pyx_base.signature->initial_restriction_method->method_value; __pyx_t_3 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_windowed_value->value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_windowed_value->value);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 808, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF_SET(__pyx_v_restriction, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "apache_beam/runners/common.py":803
 *     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":811
 *             windowed_value.value)
 * 
 *       with self.splitting_lock:             # <<<<<<<<<<<<<<
 *         self.current_windowed_value = windowed_value
 *         self.restriction = restriction
 */
    /*with:*/ {
      __pyx_t_9 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->splitting_lock, __pyx_n_s_exit); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 811, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->splitting_lock, __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 811, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 811, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      /*try:*/ {
        {
          (void)__pyx_t_10; (void)__pyx_t_11; (void)__pyx_t_12; /* mark used */
          /*try:*/ {

            /* "apache_beam/runners/common.py":812
 * 
 *       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(__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":813
 *       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":814
 *         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":811
 *             windowed_value.value)
 * 
 *       with self.splitting_lock:             # <<<<<<<<<<<<<<
 *         self.current_windowed_value = windowed_value
 *         self.restriction = restriction
 */
          }
        }
      }
      /*finally:*/ {
        /*normal exit:*/{
          if (__pyx_t_9) {
            __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__59, NULL);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 811, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          }
          goto __pyx_L10;
        }
        __pyx_L10:;
      }
      goto __pyx_L17;
      __pyx_L7_error:;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L1_error;
      __pyx_L17:;
    }

    /* "apache_beam/runners/common.py":815
 *         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":816
 *         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(
 */
      __pyx_t_7 = (__pyx_v_self->has_windowed_inputs != 0);
      if (__pyx_t_7) {
      } else {
        __pyx_t_8 = __pyx_t_7;
        goto __pyx_L22_bool_binop_done;
      }
      __pyx_t_1 = __pyx_v_windowed_value->windows;
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_13 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 816, __pyx_L19_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_7 = ((__pyx_t_13 > 1) != 0);
      __pyx_t_8 = __pyx_t_7;
      __pyx_L22_bool_binop_done:;
      if (__pyx_t_8) {

        /* "apache_beam/runners/common.py":817
 *       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_int_0);
        __pyx_t_1 = __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_13 = 0;
          __pyx_t_14 = NULL;
        } else {
          __pyx_t_13 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_windowed_value->windows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 817, __pyx_L19_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_14 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 817, __pyx_L19_error)
        }
        for (;;) {
          if (likely(!__pyx_t_14)) {
            if (likely(PyList_CheckExact(__pyx_t_2))) {
              if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_2)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_13); __Pyx_INCREF(__pyx_t_3); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 817, __pyx_L19_error)
              #else
              __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 817, __pyx_L19_error)
              __Pyx_GOTREF(__pyx_t_3);
              #endif
            } else {
              if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_13); __Pyx_INCREF(__pyx_t_3); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 817, __pyx_L19_error)
              #else
              __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 817, __pyx_L19_error)
              __Pyx_GOTREF(__pyx_t_3);
              #endif
            }
          } else {
            __pyx_t_3 = __pyx_t_14(__pyx_t_2);
            if (unlikely(!__pyx_t_3)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                else __PYX_ERR(0, 817, __pyx_L19_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_3);
          }
          __Pyx_XDECREF_SET(__pyx_v_w, __pyx_t_3);
          __pyx_t_3 = 0;
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
          __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 817, __pyx_L19_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_1);
          __pyx_t_1 = __pyx_t_3;
          __pyx_t_3 = 0;

          /* "apache_beam/runners/common.py":818
 *         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_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_should_process_window_for_sdf); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 818, __pyx_L19_error)
          __Pyx_GOTREF(__pyx_t_6);

          /* "apache_beam/runners/common.py":819
 *           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_4 = NULL;
          __pyx_t_5 = 0;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
            __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
            if (likely(__pyx_t_4)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
              __Pyx_INCREF(__pyx_t_4);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_6, function);
              __pyx_t_5 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_6)) {
            PyObject *__pyx_temp[4] = {__pyx_t_4, ((PyObject *)__pyx_v_windowed_value), __pyx_v_additional_kwargs, __pyx_v_i};
            __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 818, __pyx_L19_error)
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_GOTREF(__pyx_t_3);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
            PyObject *__pyx_temp[4] = {__pyx_t_4, ((PyObject *)__pyx_v_windowed_value), __pyx_v_additional_kwargs, __pyx_v_i};
            __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 818, __pyx_L19_error)
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_GOTREF(__pyx_t_3);
          } else
          #endif
          {
            __pyx_t_15 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 818, __pyx_L19_error)
            __Pyx_GOTREF(__pyx_t_15);
            if (__pyx_t_4) {
              __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_4); __pyx_t_4 = NULL;
            }
            __Pyx_INCREF(((PyObject *)__pyx_v_windowed_value));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_windowed_value));
            PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_5, ((PyObject *)__pyx_v_windowed_value));
            __Pyx_INCREF(__pyx_v_additional_kwargs);
            __Pyx_GIVEREF(__pyx_v_additional_kwargs);
            PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_5, __pyx_v_additional_kwargs);
            __Pyx_INCREF(__pyx_v_i);
            __Pyx_GIVEREF(__pyx_v_i);
            PyTuple_SET_ITEM(__pyx_t_15, 2+__pyx_t_5, __pyx_v_i);
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_15, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 818, __pyx_L19_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          }
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

          /* "apache_beam/runners/common.py":818
 *         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_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 818, __pyx_L19_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_7 = ((!__pyx_t_8) != 0);
          if (__pyx_t_7) {

            /* "apache_beam/runners/common.py":820
 *             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":818
 *         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":821
 *                 windowed_value, additional_kwargs, i):
 *               break
 *             residual = self._invoke_process_per_window(             # <<<<<<<<<<<<<<
 *                 WindowedValue(
 *                     windowed_value.value, windowed_value.timestamp, (w, )),
 */
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_invoke_process_per_window); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 821, __pyx_L19_error)
          __Pyx_GOTREF(__pyx_t_6);

          /* "apache_beam/runners/common.py":823
 *             residual = self._invoke_process_per_window(
 *                 WindowedValue(
 *                     windowed_value.value, windowed_value.timestamp, (w, )),             # <<<<<<<<<<<<<<
 *                 additional_args,
 *                 additional_kwargs)
 */
          __pyx_t_15 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_windowed_value), __pyx_n_s_timestamp); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 823, __pyx_L19_error)
          __Pyx_GOTREF(__pyx_t_15);
          __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 823, __pyx_L19_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_INCREF(__pyx_v_w);
          __Pyx_GIVEREF(__pyx_v_w);
          PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_w);

          /* "apache_beam/runners/common.py":822
 *               break
 *             residual = self._invoke_process_per_window(
 *                 WindowedValue(             # <<<<<<<<<<<<<<
 *                     windowed_value.value, windowed_value.timestamp, (w, )),
 *                 additional_args,
 */
          __pyx_t_16 = PyTuple_New(3); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 822, __pyx_L19_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_INCREF(__pyx_v_windowed_value->value);
          __Pyx_GIVEREF(__pyx_v_windowed_value->value);
          PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_v_windowed_value->value);
          __Pyx_GIVEREF(__pyx_t_15);
          PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_15);
          __Pyx_GIVEREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_t_4);
          __pyx_t_15 = 0;
          __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue), __pyx_t_16, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 822, __pyx_L19_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

          /* "apache_beam/runners/common.py":825
 *                     windowed_value.value, windowed_value.timestamp, (w, )),
 *                 additional_args,
 *                 additional_kwargs)             # <<<<<<<<<<<<<<
 *             if residual:
 *               residuals.append(residual)
 */
          __pyx_t_16 = NULL;
          __pyx_t_5 = 0;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
            __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_6);
            if (likely(__pyx_t_16)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
              __Pyx_INCREF(__pyx_t_16);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_6, function);
              __pyx_t_5 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_6)) {
            PyObject *__pyx_temp[4] = {__pyx_t_16, __pyx_t_4, __pyx_v_additional_args, __pyx_v_additional_kwargs};
            __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 821, __pyx_L19_error)
            __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
            PyObject *__pyx_temp[4] = {__pyx_t_16, __pyx_t_4, __pyx_v_additional_args, __pyx_v_additional_kwargs};
            __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 821, __pyx_L19_error)
            __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          } else
          #endif
          {
            __pyx_t_15 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 821, __pyx_L19_error)
            __Pyx_GOTREF(__pyx_t_15);
            if (__pyx_t_16) {
              __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_16); __pyx_t_16 = NULL;
            }
            __Pyx_GIVEREF(__pyx_t_4);
            PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_5, __pyx_t_4);
            __Pyx_INCREF(__pyx_v_additional_args);
            __Pyx_GIVEREF(__pyx_v_additional_args);
            PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_5, __pyx_v_additional_args);
            __Pyx_INCREF(__pyx_v_additional_kwargs);
            __Pyx_GIVEREF(__pyx_v_additional_kwargs);
            PyTuple_SET_ITEM(__pyx_t_15, 2+__pyx_t_5, __pyx_v_additional_kwargs);
            __pyx_t_4 = 0;
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_15, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 821, __pyx_L19_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          }
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF_SET(__pyx_v_residual, __pyx_t_3);
          __pyx_t_3 = 0;

          /* "apache_beam/runners/common.py":826
 *                 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, 826, __pyx_L19_error)
          if (__pyx_t_7) {

            /* "apache_beam/runners/common.py":827
 *                 additional_kwargs)
 *             if residual:
 *               residuals.append(residual)             # <<<<<<<<<<<<<<
 *         else:
 *           if self._should_process_window_for_sdf(windowed_value,
 */
            __pyx_t_17 = __Pyx_PyList_Append(__pyx_v_residuals, __pyx_v_residual); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 827, __pyx_L19_error)

            /* "apache_beam/runners/common.py":826
 *                 additional_args,
 *                 additional_kwargs)
 *             if residual:             # <<<<<<<<<<<<<<
 *               residuals.append(residual)
 *         else:
 */
          }

          /* "apache_beam/runners/common.py":817
 *       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_L25_break:;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "apache_beam/runners/common.py":816
 *         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":829
 *               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 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_should_process_window_for_sdf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 829, __pyx_L19_error)
        __Pyx_GOTREF(__pyx_t_2);

        /* "apache_beam/runners/common.py":830
 *         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_3 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_2)) {
          PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_windowed_value), __pyx_v_additional_kwargs};
          __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 829, __pyx_L19_error)
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
          PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_windowed_value), __pyx_v_additional_kwargs};
          __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 829, __pyx_L19_error)
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 829, __pyx_L19_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_3) {
            __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL;
          }
          __Pyx_INCREF(((PyObject *)__pyx_v_windowed_value));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_windowed_value));
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, ((PyObject *)__pyx_v_windowed_value));
          __Pyx_INCREF(__pyx_v_additional_kwargs);
          __Pyx_GIVEREF(__pyx_v_additional_kwargs);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_additional_kwargs);
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 829, __pyx_L19_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "apache_beam/runners/common.py":829
 *               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, 829, __pyx_L19_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (__pyx_t_7) {

          /* "apache_beam/runners/common.py":831
 *           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 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_invoke_process_per_window); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 831, __pyx_L19_error)
          __Pyx_GOTREF(__pyx_t_2);

          /* "apache_beam/runners/common.py":832
 *                                                  additional_kwargs):
 *             residual = self._invoke_process_per_window(
 *                 windowed_value, additional_args, additional_kwargs)             # <<<<<<<<<<<<<<
 *             if residual:
 *               residuals.append(residual)
 */
          __pyx_t_6 = NULL;
          __pyx_t_5 = 0;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
            __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
            if (likely(__pyx_t_6)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_6);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_2, function);
              __pyx_t_5 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_2)) {
            PyObject *__pyx_temp[4] = {__pyx_t_6, ((PyObject *)__pyx_v_windowed_value), __pyx_v_additional_args, __pyx_v_additional_kwargs};
            __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 831, __pyx_L19_error)
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_GOTREF(__pyx_t_1);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
            PyObject *__pyx_temp[4] = {__pyx_t_6, ((PyObject *)__pyx_v_windowed_value), __pyx_v_additional_args, __pyx_v_additional_kwargs};
            __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 831, __pyx_L19_error)
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_GOTREF(__pyx_t_1);
          } else
          #endif
          {
            __pyx_t_3 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 831, __pyx_L19_error)
            __Pyx_GOTREF(__pyx_t_3);
            if (__pyx_t_6) {
              __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = NULL;
            }
            __Pyx_INCREF(((PyObject *)__pyx_v_windowed_value));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_windowed_value));
            PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_5, ((PyObject *)__pyx_v_windowed_value));
            __Pyx_INCREF(__pyx_v_additional_args);
            __Pyx_GIVEREF(__pyx_v_additional_args);
            PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_5, __pyx_v_additional_args);
            __Pyx_INCREF(__pyx_v_additional_kwargs);
            __Pyx_GIVEREF(__pyx_v_additional_kwargs);
            PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_5, __pyx_v_additional_kwargs);
            __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 831, __pyx_L19_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_v_residual = __pyx_t_1;
          __pyx_t_1 = 0;

          /* "apache_beam/runners/common.py":833
 *             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, 833, __pyx_L19_error)
          if (__pyx_t_7) {

            /* "apache_beam/runners/common.py":834
 *                 windowed_value, additional_args, additional_kwargs)
 *             if residual:
 *               residuals.append(residual)             # <<<<<<<<<<<<<<
 *       finally:
 *         with self.splitting_lock:
 */
            __pyx_t_17 = __Pyx_PyList_Append(__pyx_v_residuals, __pyx_v_residual); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 834, __pyx_L19_error)

            /* "apache_beam/runners/common.py":833
 *             residual = self._invoke_process_per_window(
 *                 windowed_value, additional_args, additional_kwargs)
 *             if residual:             # <<<<<<<<<<<<<<
 *               residuals.append(residual)
 *       finally:
 */
          }

          /* "apache_beam/runners/common.py":829
 *               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":836
 *               residuals.append(residual)
 *       finally:
 *         with self.splitting_lock:             # <<<<<<<<<<<<<<
 *           self.current_windowed_value = None
 *           self.restriction = None
 */
    /*finally:*/ {
      /*normal exit:*/{
        /*with:*/ {
          __pyx_t_9 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->splitting_lock, __pyx_n_s_exit); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 836, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->splitting_lock, __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 836, __pyx_L30_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_3 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
            __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
            if (likely(__pyx_t_3)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_2, function);
            }
          }
          __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 836, __pyx_L30_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          /*try:*/ {
            {
              (void)__pyx_t_12; (void)__pyx_t_11; (void)__pyx_t_10; /* mark used */
              /*try:*/ {

                /* "apache_beam/runners/common.py":837
 *       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(__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":838
 *         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":839
 *           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":840
 *           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":841
 *           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":842
 *           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":836
 *               residuals.append(residual)
 *       finally:
 *         with self.splitting_lock:             # <<<<<<<<<<<<<<
 *           self.current_windowed_value = None
 *           self.restriction = None
 */
              }
            }
          }
          /*finally:*/ {
            /*normal exit:*/{
              if (__pyx_t_9) {
                __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__59, NULL);
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 836, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              goto __pyx_L33;
            }
            __pyx_L33:;
          }
          goto __pyx_L40;
          __pyx_L30_error:;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          goto __pyx_L1_error;
          __pyx_L40:;
        }
        goto __pyx_L20;
      }
      __pyx_L19_error:;
      /*exception exit:*/{
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 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;
        if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_20, &__pyx_t_21);
        if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_9);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_12);
        __Pyx_XGOTREF(__pyx_t_20);
        __Pyx_XGOTREF(__pyx_t_21);
        __pyx_t_5 = __pyx_lineno; __pyx_t_18 = __pyx_clineno; __pyx_t_19 = __pyx_filename;
        {
          /*with:*/ {
            __pyx_t_22 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->splitting_lock, __pyx_n_s_exit); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 836, __pyx_L42_error)
            __Pyx_GOTREF(__pyx_t_22);
            __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->splitting_lock, __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 836, __pyx_L43_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_3 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
              __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
              if (likely(__pyx_t_3)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
                __Pyx_INCREF(__pyx_t_3);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_2, function);
              }
            }
            __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 836, __pyx_L43_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            /*try:*/ {
              {
                (void)__pyx_t_23; (void)__pyx_t_24; (void)__pyx_t_25; /* mark used */
                /*try:*/ {

                  /* "apache_beam/runners/common.py":837
 *       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(__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":838
 *         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":839
 *           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":840
 *           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":841
 *           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":842
 *           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":836
 *               residuals.append(residual)
 *       finally:
 *         with self.splitting_lock:             # <<<<<<<<<<<<<<
 *           self.current_windowed_value = None
 *           self.restriction = None
 */
                }
              }
            }
            /*finally:*/ {
              /*normal exit:*/{
                if (__pyx_t_22) {
                  __pyx_t_25 = __Pyx_PyObject_Call(__pyx_t_22, __pyx_tuple__59, NULL);
                  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
                  if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 836, __pyx_L42_error)
                  __Pyx_GOTREF(__pyx_t_25);
                  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
                }
                goto __pyx_L46;
              }
              __pyx_L46:;
            }
            goto __pyx_L53;
            __pyx_L43_error:;
            __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
            goto __pyx_L42_error;
            __pyx_L53:;
          }
        }
        if (PY_MAJOR_VERSION >= 3) {
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_20, __pyx_t_21);
        }
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
        __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_18; __pyx_filename = __pyx_t_19;
        goto __pyx_L1_error;
        __pyx_L42_error:;
        if (PY_MAJOR_VERSION >= 3) {
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_20, __pyx_t_21);
        }
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_12 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
        goto __pyx_L1_error;
      }
      __pyx_L20:;
    }

    /* "apache_beam/runners/common.py":802
 * 
 *     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":843
 *           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(
 */
  __pyx_t_8 = (__pyx_v_self->has_windowed_inputs != 0);
  if (__pyx_t_8) {
  } else {
    __pyx_t_7 = __pyx_t_8;
    goto __pyx_L54_bool_binop_done;
  }
  __pyx_t_1 = __pyx_v_windowed_value->windows;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_13 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 843, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = ((__pyx_t_13 != 1) != 0);
  __pyx_t_7 = __pyx_t_8;
  __pyx_L54_bool_binop_done:;
  if (__pyx_t_7) {

    /* "apache_beam/runners/common.py":844
 *           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_13 = 0;
      __pyx_t_14 = NULL;
    } else {
      __pyx_t_13 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_windowed_value->windows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 844, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_14 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 844, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_14)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_13); __Pyx_INCREF(__pyx_t_2); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 844, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 844, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_13); __Pyx_INCREF(__pyx_t_2); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 844, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 844, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_14(__pyx_t_1);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 844, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_w, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "apache_beam/runners/common.py":845
 *     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_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_invoke_process_per_window); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 845, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);

      /* "apache_beam/runners/common.py":847
 *         self._invoke_process_per_window(
 *             WindowedValue(
 *                 windowed_value.value, windowed_value.timestamp, (w, )),             # <<<<<<<<<<<<<<
 *             additional_args,
 *             additional_kwargs)
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_windowed_value), __pyx_n_s_timestamp); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 847, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 847, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_INCREF(__pyx_v_w);
      __Pyx_GIVEREF(__pyx_v_w);
      PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_v_w);

      /* "apache_beam/runners/common.py":846
 *       for w in windowed_value.windows:
 *         self._invoke_process_per_window(
 *             WindowedValue(             # <<<<<<<<<<<<<<
 *                 windowed_value.value, windowed_value.timestamp, (w, )),
 *             additional_args,
 */
      __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 846, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_windowed_value->value);
      __Pyx_GIVEREF(__pyx_v_windowed_value->value);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_windowed_value->value);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_15);
      PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_15);
      __pyx_t_6 = 0;
      __pyx_t_15 = 0;
      __pyx_t_15 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue), __pyx_t_4, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 846, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "apache_beam/runners/common.py":849
 *                 windowed_value.value, windowed_value.timestamp, (w, )),
 *             additional_args,
 *             additional_kwargs)             # <<<<<<<<<<<<<<
 *     else:
 *       self._invoke_process_per_window(
 */
      __pyx_t_4 = NULL;
      __pyx_t_18 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_18 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_15, __pyx_v_additional_args, __pyx_v_additional_kwargs};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_18, 3+__pyx_t_18); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 845, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_15, __pyx_v_additional_args, __pyx_v_additional_kwargs};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_18, 3+__pyx_t_18); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 845, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(3+__pyx_t_18); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 845, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (__pyx_t_4) {
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_15);
        PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_18, __pyx_t_15);
        __Pyx_INCREF(__pyx_v_additional_args);
        __Pyx_GIVEREF(__pyx_v_additional_args);
        PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_18, __pyx_v_additional_args);
        __Pyx_INCREF(__pyx_v_additional_kwargs);
        __Pyx_GIVEREF(__pyx_v_additional_kwargs);
        PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_18, __pyx_v_additional_kwargs);
        __pyx_t_15 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 845, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "apache_beam/runners/common.py":844
 *           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":843
 *           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":851
 *             additional_kwargs)
 *     else:
 *       self._invoke_process_per_window(             # <<<<<<<<<<<<<<
 *           windowed_value, additional_args, additional_kwargs)
 *     return residuals
 */
  /*else*/ {
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_invoke_process_per_window); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 851, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "apache_beam/runners/common.py":852
 *     else:
 *       self._invoke_process_per_window(
 *           windowed_value, additional_args, additional_kwargs)             # <<<<<<<<<<<<<<
 *     return residuals
 * 
 */
    __pyx_t_3 = NULL;
    __pyx_t_18 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_18 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[4] = {__pyx_t_3, ((PyObject *)__pyx_v_windowed_value), __pyx_v_additional_args, __pyx_v_additional_kwargs};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_18, 3+__pyx_t_18); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 851, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[4] = {__pyx_t_3, ((PyObject *)__pyx_v_windowed_value), __pyx_v_additional_args, __pyx_v_additional_kwargs};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_18, 3+__pyx_t_18); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 851, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(3+__pyx_t_18); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 851, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_3) {
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL;
      }
      __Pyx_INCREF(((PyObject *)__pyx_v_windowed_value));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_windowed_value));
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_18, ((PyObject *)__pyx_v_windowed_value));
      __Pyx_INCREF(__pyx_v_additional_args);
      __Pyx_GIVEREF(__pyx_v_additional_args);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_18, __pyx_v_additional_args);
      __Pyx_INCREF(__pyx_v_additional_kwargs);
      __Pyx_GIVEREF(__pyx_v_additional_kwargs);
      PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_18, __pyx_v_additional_kwargs);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 851, __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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_L5:;

  /* "apache_beam/runners/common.py":853
 *       self._invoke_process_per_window(
 *           windowed_value, additional_args, additional_kwargs)
 *     return residuals             # <<<<<<<<<<<<<<
 * 
 *   def invoke_process_batch(self,
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_residuals);
  __pyx_r = __pyx_v_residuals;
  goto __pyx_L0;

  /* "apache_beam/runners/common.py":783
 *             signature.process_batch_method, input_args, input_kwargs)
 * 
 *   def invoke_process(self,             # <<<<<<<<<<<<<<
 *                      windowed_value,  # type: WindowedValue
 *                      restriction=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_6);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_3invoke_process(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_3invoke_process = {"invoke_process", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_3invoke_process, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_3invoke_process(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  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;
  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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_windowed_value,&__pyx_n_s_restriction,&__pyx_n_s_watermark_estimator_state,&__pyx_n_s_additional_args,&__pyx_n_s_additional_kwargs,0};
    PyObject* values[5] = {0,0,0,0,0};

    /* "apache_beam/runners/common.py":785
 *   def invoke_process(self,
 *                      windowed_value,  # type: WindowedValue
 *                      restriction=None,             # <<<<<<<<<<<<<<
 *                      watermark_estimator_state=None,
 *                      additional_args=None,
 */
    values[1] = ((PyObject *)Py_None);

    /* "apache_beam/runners/common.py":786
 *                      windowed_value,  # type: WindowedValue
 *                      restriction=None,
 *                      watermark_estimator_state=None,             # <<<<<<<<<<<<<<
 *                      additional_args=None,
 *                      additional_kwargs=None
 */
    values[2] = ((PyObject *)Py_None);

    /* "apache_beam/runners/common.py":787
 *                      restriction=None,
 *                      watermark_estimator_state=None,
 *                      additional_args=None,             # <<<<<<<<<<<<<<
 *                      additional_kwargs=None
 *                     ):
 */
    values[3] = ((PyObject *)Py_None);

    /* "apache_beam/runners/common.py":788
 *                      watermark_estimator_state=None,
 *                      additional_args=None,
 *                      additional_kwargs=None             # <<<<<<<<<<<<<<
 *                     ):
 *     # type: (...) -> Iterable[SplitResultResidual]
 */
    values[4] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_windowed_value)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_restriction);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_watermark_estimator_state);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_additional_args);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_additional_kwargs);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "invoke_process") < 0)) __PYX_ERR(0, 783, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __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_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("invoke_process", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 783, __pyx_L3_error)
  __pyx_L3_error:;
  __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_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, 1, "windowed_value", 0))) __PYX_ERR(0, 784, __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":783
 *             signature.process_batch_method, input_args, input_kwargs)
 * 
 *   def invoke_process(self,             # <<<<<<<<<<<<<<
 *                      windowed_value,  # type: WindowedValue
 *                      restriction=None,
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __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_TraceDeclarations
  __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_TraceFrameInit(__pyx_codeobj__58)
  __Pyx_RefNannySetupContext("invoke_process", 0);
  __Pyx_TraceCall("invoke_process (wrapper)", __pyx_f[0], 783, 0, __PYX_ERR(0, 783, __pyx_L1_error));
  __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, 783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":855
 *     return residuals
 * 
 *   def invoke_process_batch(self,             # <<<<<<<<<<<<<<
 *                      windowed_batch,  # type: WindowedBatch
 *                      additional_args=None,
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_5invoke_process_batch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_5invoke_process_batch = {"invoke_process_batch", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_5invoke_process_batch, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_5invoke_process_batch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_windowed_batch = 0;
  PyObject *__pyx_v_additional_args = 0;
  PyObject *__pyx_v_additional_kwargs = 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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_windowed_batch,&__pyx_n_s_additional_args,&__pyx_n_s_additional_kwargs,0};
    PyObject* values[3] = {0,0,0};

    /* "apache_beam/runners/common.py":857
 *   def invoke_process_batch(self,
 *                      windowed_batch,  # type: WindowedBatch
 *                      additional_args=None,             # <<<<<<<<<<<<<<
 *                      additional_kwargs=None
 *                     ):
 */
    values[1] = ((PyObject *)Py_None);

    /* "apache_beam/runners/common.py":858
 *                      windowed_batch,  # type: WindowedBatch
 *                      additional_args=None,
 *                      additional_kwargs=None             # <<<<<<<<<<<<<<
 *                     ):
 *     # type: (...) -> None
 */
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_windowed_batch)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_additional_args);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_additional_kwargs);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "invoke_process_batch") < 0)) __PYX_ERR(0, 855, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_windowed_batch = values[0];
    __pyx_v_additional_args = values[1];
    __pyx_v_additional_kwargs = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("invoke_process_batch", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 855, __pyx_L3_error)
  __pyx_L3_error:;
  __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":855
 *     return residuals
 * 
 *   def invoke_process_batch(self,             # <<<<<<<<<<<<<<
 *                      windowed_batch,  # type: WindowedBatch
 *                      additional_args=None,
 */

  /* function exit code */
  __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_TraceDeclarations
  __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;
  int __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__60)
  __Pyx_RefNannySetupContext("invoke_process_batch", 0);
  __Pyx_TraceCall("invoke_process_batch", __pyx_f[0], 855, 0, __PYX_ERR(0, 855, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_additional_args);
  __Pyx_INCREF(__pyx_v_additional_kwargs);

  /* "apache_beam/runners/common.py":862
 *     # 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, 862, __pyx_L1_error)
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "apache_beam/runners/common.py":863
 * 
 *     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, 863, __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":862
 *     # type: (...) -> None
 * 
 *     if not additional_args:             # <<<<<<<<<<<<<<
 *       additional_args = []
 *     if not additional_kwargs:
 */
  }

  /* "apache_beam/runners/common.py":864
 *     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, 864, __pyx_L1_error)
  __pyx_t_1 = ((!__pyx_t_2) != 0);
  if (__pyx_t_1) {

    /* "apache_beam/runners/common.py":865
 *       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, 865, __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":864
 *     if not additional_args:
 *       additional_args = []
 *     if not additional_kwargs:             # <<<<<<<<<<<<<<
 *       additional_kwargs = {}
 * 
 */
  }

  /* "apache_beam/runners/common.py":867
 *       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_n_s_HomogeneousWindowedBatch); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 867, __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, 867, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 867, __pyx_L1_error)
    }
  }
  #endif

  /* "apache_beam/runners/common.py":869
 *     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(
 */
  __pyx_t_2 = (__pyx_v_self->has_windowed_inputs != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowed_batch, __pyx_n_s_windows); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 869, __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, 869, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = ((__pyx_t_4 != 1) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "apache_beam/runners/common.py":870
 * 
 *     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_n_s_windows); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 870, __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, 870, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 870, __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))) {
          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 870, __pyx_L1_error)
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 870, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        } else {
          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 870, __pyx_L1_error)
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 870, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_6(__pyx_t_5);
        if (unlikely(!__pyx_t_3)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 870, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_v_w, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "apache_beam/runners/common.py":871
 *     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 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_invoke_process_batch_per_window); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 871, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);

      /* "apache_beam/runners/common.py":872
 *       for w in windowed_batch.windows:
 *         self._invoke_process_batch_per_window(
 *             HomogeneousWindowedBatch.of(             # <<<<<<<<<<<<<<
 *                 windowed_batch.values,
 *                 windowed_batch.timestamp, (w, ),
 */
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_HomogeneousWindowedBatch); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 872, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_of); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 872, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "apache_beam/runners/common.py":873
 *         self._invoke_process_batch_per_window(
 *             HomogeneousWindowedBatch.of(
 *                 windowed_batch.values,             # <<<<<<<<<<<<<<
 *                 windowed_batch.timestamp, (w, ),
 *                 windowed_batch.pane_info),
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowed_batch, __pyx_n_s_values); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 873, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);

      /* "apache_beam/runners/common.py":874
 *             HomogeneousWindowedBatch.of(
 *                 windowed_batch.values,
 *                 windowed_batch.timestamp, (w, ),             # <<<<<<<<<<<<<<
 *                 windowed_batch.pane_info),
 *             additional_args,
 */
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowed_batch, __pyx_n_s_timestamp); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 874, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 874, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_INCREF(__pyx_v_w);
      __Pyx_GIVEREF(__pyx_v_w);
      PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_w);

      /* "apache_beam/runners/common.py":875
 *                 windowed_batch.values,
 *                 windowed_batch.timestamp, (w, ),
 *                 windowed_batch.pane_info),             # <<<<<<<<<<<<<<
 *             additional_args,
 *             additional_kwargs)
 */
      __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowed_batch, __pyx_n_s_pane_info); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 875, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_14 = NULL;
      __pyx_t_15 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
        __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_10);
        if (likely(__pyx_t_14)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
          __Pyx_INCREF(__pyx_t_14);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_10, function);
          __pyx_t_15 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_10)) {
        PyObject *__pyx_temp[5] = {__pyx_t_14, __pyx_t_9, __pyx_t_11, __pyx_t_12, __pyx_t_13};
        __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_15, 4+__pyx_t_15); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 872, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_GOTREF(__pyx_t_8);
        __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;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
        PyObject *__pyx_temp[5] = {__pyx_t_14, __pyx_t_9, __pyx_t_11, __pyx_t_12, __pyx_t_13};
        __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_15, 4+__pyx_t_15); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 872, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_GOTREF(__pyx_t_8);
        __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;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      } else
      #endif
      {
        __pyx_t_16 = PyTuple_New(4+__pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 872, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        if (__pyx_t_14) {
          __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_14); __pyx_t_14 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_9);
        PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_15, __pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_11);
        PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_15, __pyx_t_11);
        __Pyx_GIVEREF(__pyx_t_12);
        PyTuple_SET_ITEM(__pyx_t_16, 2+__pyx_t_15, __pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_13);
        PyTuple_SET_ITEM(__pyx_t_16, 3+__pyx_t_15, __pyx_t_13);
        __pyx_t_9 = 0;
        __pyx_t_11 = 0;
        __pyx_t_12 = 0;
        __pyx_t_13 = 0;
        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_16, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 872, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      }
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "apache_beam/runners/common.py":877
 *                 windowed_batch.pane_info),
 *             additional_args,
 *             additional_kwargs)             # <<<<<<<<<<<<<<
 *     else:
 *       self._invoke_process_batch_per_window(
 */
      __pyx_t_10 = NULL;
      __pyx_t_15 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_15 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_t_8, __pyx_v_additional_args, __pyx_v_additional_kwargs};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_15, 3+__pyx_t_15); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 871, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_t_8, __pyx_v_additional_args, __pyx_v_additional_kwargs};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_15, 3+__pyx_t_15); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 871, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else
      #endif
      {
        __pyx_t_16 = PyTuple_New(3+__pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 871, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        if (__pyx_t_10) {
          __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_10); __pyx_t_10 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_8);
        PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_15, __pyx_t_8);
        __Pyx_INCREF(__pyx_v_additional_args);
        __Pyx_GIVEREF(__pyx_v_additional_args);
        PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_15, __pyx_v_additional_args);
        __Pyx_INCREF(__pyx_v_additional_kwargs);
        __Pyx_GIVEREF(__pyx_v_additional_kwargs);
        PyTuple_SET_ITEM(__pyx_t_16, 2+__pyx_t_15, __pyx_v_additional_kwargs);
        __pyx_t_8 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_16, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 871, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "apache_beam/runners/common.py":870
 * 
 *     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":869
 *     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":879
 *             additional_kwargs)
 *     else:
 *       self._invoke_process_batch_per_window(             # <<<<<<<<<<<<<<
 *           windowed_batch, additional_args, additional_kwargs)
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_invoke_process_batch_per_window); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 879, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);

    /* "apache_beam/runners/common.py":880
 *     else:
 *       self._invoke_process_batch_per_window(
 *           windowed_batch, additional_args, additional_kwargs)             # <<<<<<<<<<<<<<
 * 
 *   def _should_process_window_for_sdf(
 */
    __pyx_t_7 = NULL;
    __pyx_t_15 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_15 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_windowed_batch, __pyx_v_additional_args, __pyx_v_additional_kwargs};
      __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_15, 3+__pyx_t_15); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 879, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_windowed_batch, __pyx_v_additional_args, __pyx_v_additional_kwargs};
      __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_15, 3+__pyx_t_15); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 879, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else
    #endif
    {
      __pyx_t_16 = PyTuple_New(3+__pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 879, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_v_windowed_batch);
      __Pyx_GIVEREF(__pyx_v_windowed_batch);
      PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_15, __pyx_v_windowed_batch);
      __Pyx_INCREF(__pyx_v_additional_args);
      __Pyx_GIVEREF(__pyx_v_additional_args);
      PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_15, __pyx_v_additional_args);
      __Pyx_INCREF(__pyx_v_additional_kwargs);
      __Pyx_GIVEREF(__pyx_v_additional_kwargs);
      PyTuple_SET_ITEM(__pyx_t_16, 2+__pyx_t_15, __pyx_v_additional_kwargs);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_16, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 879, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_L5:;

  /* "apache_beam/runners/common.py":855
 *     return residuals
 * 
 *   def invoke_process_batch(self,             # <<<<<<<<<<<<<<
 *                      windowed_batch,  # type: WindowedBatch
 *                      additional_args=None,
 */

  /* 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_XDECREF(__pyx_t_16);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":882
 *           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, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_7_should_process_window_for_sdf = {"_should_process_window_for_sdf", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_7_should_process_window_for_sdf, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_7_should_process_window_for_sdf(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_windowed_value = 0;
  PyObject *__pyx_v_additional_kwargs = 0;
  PyObject *__pyx_v_window_index = 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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_windowed_value,&__pyx_n_s_additional_kwargs,&__pyx_n_s_window_index,0};
    PyObject* values[3] = {0,0,0};

    /* "apache_beam/runners/common.py":886
 *       windowed_value, # type: WindowedValue
 *       additional_kwargs,
 *       window_index=None, # type: Optional[int]             # <<<<<<<<<<<<<<
 *   ):
 *     restriction_tracker = self.invoke_create_tracker(self.restriction)
 */
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_windowed_value)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_additional_kwargs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_should_process_window_for_sdf", 0, 2, 3, 1); __PYX_ERR(0, 882, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_window_index);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_should_process_window_for_sdf") < 0)) __PYX_ERR(0, 882, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_windowed_value = values[0];
    __pyx_v_additional_kwargs = values[1];
    __pyx_v_window_index = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_should_process_window_for_sdf", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 882, __pyx_L3_error)
  __pyx_L3_error:;
  __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":882
 *           windowed_batch, additional_args, additional_kwargs)
 * 
 *   def _should_process_window_for_sdf(             # <<<<<<<<<<<<<<
 *       self,
 *       windowed_value, # type: WindowedValue
 */

  /* function exit code */
  __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_TraceDeclarations
  __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;
  Py_ssize_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_TraceFrameInit(__pyx_codeobj__61)
  __Pyx_RefNannySetupContext("_should_process_window_for_sdf", 0);
  __Pyx_TraceCall("_should_process_window_for_sdf", __pyx_f[0], 882, 0, __PYX_ERR(0, 882, __pyx_L1_error));

  /* "apache_beam/runners/common.py":888
 *       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, 888, __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":889
 *   ):
 *     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 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_invoke_create_watermark_estimato); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "apache_beam/runners/common.py":890
 *     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 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_v_self->watermark_estimator_state) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_self->watermark_estimator_state);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_watermark_estimator = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":891
 *     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_n_s_exit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 891, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->splitting_lock, __pyx_n_s_enter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 891, __pyx_L3_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 891, __pyx_L3_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    /*try:*/ {
      {
        __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":892
 *         self.watermark_estimator_state)
 *     with self.splitting_lock:
 *       if window_index:             # <<<<<<<<<<<<<<
 *         self.current_window_index = window_index
 *         if window_index == 0:
 */
          __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_window_index); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 892, __pyx_L7_error)
          if (__pyx_t_8) {

            /* "apache_beam/runners/common.py":893
 *     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":894
 *       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_2 = __Pyx_PyInt_EqObjC(__pyx_v_window_index, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 894, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 894, __pyx_L7_error)
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (__pyx_t_8) {

              /* "apache_beam/runners/common.py":895
 *         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_n_s_windows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 895, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_9 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 895, __pyx_L7_error)
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 895, __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":894
 *       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":896
 *         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, 896, __pyx_L7_error)
            __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 896, __pyx_L7_error)
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (__pyx_t_8) {

              /* "apache_beam/runners/common.py":897
 *           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":896
 *         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":892
 *         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":898
 *         if window_index == self.stop_window_index:
 *           return False
 *       self.threadsafe_restriction_tracker = ThreadsafeRestrictionTracker(             # <<<<<<<<<<<<<<
 *           restriction_tracker)
 *       self.threadsafe_watermark_estimator = (
 */
          __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ThreadsafeRestrictionTracker); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 898, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);

          /* "apache_beam/runners/common.py":899
 *           return False
 *       self.threadsafe_restriction_tracker = ThreadsafeRestrictionTracker(
 *           restriction_tracker)             # <<<<<<<<<<<<<<
 *       self.threadsafe_watermark_estimator = (
 *           ThreadsafeWatermarkEstimator(watermark_estimator))
 */
          __pyx_t_3 = NULL;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
            __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
            if (likely(__pyx_t_3)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_1, function);
            }
          }
          __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_v_restriction_tracker) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_restriction_tracker);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 898, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "apache_beam/runners/common.py":898
 *         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":901
 *           restriction_tracker)
 *       self.threadsafe_watermark_estimator = (
 *           ThreadsafeWatermarkEstimator(watermark_estimator))             # <<<<<<<<<<<<<<
 * 
 *     restriction_tracker_param = (
 */
          __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ThreadsafeWatermarkEstimator); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 901, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_3 = NULL;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
            __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
            if (likely(__pyx_t_3)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_1, function);
            }
          }
          __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_v_watermark_estimator) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_watermark_estimator);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 901, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "apache_beam/runners/common.py":900
 *       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":891
 *     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_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_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;
        /*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_1, &__pyx_t_3) < 0) __PYX_ERR(0, 891, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_10 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 891, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 891, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (__pyx_t_8 < 0) __PYX_ERR(0, 891, __pyx_L9_except_error)
          __pyx_t_12 = ((!(__pyx_t_8 != 0)) != 0);
          if (__pyx_t_12) {
            __Pyx_GIVEREF(__pyx_t_2);
            __Pyx_GIVEREF(__pyx_t_1);
            __Pyx_XGIVEREF(__pyx_t_3);
            __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_1, __pyx_t_3);
            __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_3 = 0; 
            __PYX_ERR(0, 891, __pyx_L9_except_error)
          }
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 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_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_L11_try_return:;
        __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_L4_return;
        __pyx_L8_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_L12_try_end:;
      }
    }
    /*finally:*/ {
      /*normal exit:*/{
        if (__pyx_t_4) {
          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__59, NULL);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 891, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        goto __pyx_L6;
      }
      __pyx_L4_return: {
        __pyx_t_7 = __pyx_r;
        __pyx_r = 0;
        if (__pyx_t_4) {
          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__59, NULL);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 891, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __pyx_r = __pyx_t_7;
        __pyx_t_7 = 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":904
 * 
 *     restriction_tracker_param = (
 *         self.signature.process_method.restriction_provider_arg_name)             # <<<<<<<<<<<<<<
 *     if not restriction_tracker_param:
 *       raise ValueError(
 */
  __pyx_t_3 = __pyx_v_self->__pyx_base.signature->process_method->restriction_provider_arg_name;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_v_restriction_tracker_param = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "apache_beam/runners/common.py":905
 *     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_12 = __Pyx_PyObject_IsTrue(__pyx_v_restriction_tracker_param); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 905, __pyx_L1_error)
  __pyx_t_8 = ((!__pyx_t_12) != 0);
  if (unlikely(__pyx_t_8)) {

    /* "apache_beam/runners/common.py":906
 *         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_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 906, __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, 906, __pyx_L1_error)

    /* "apache_beam/runners/common.py":905
 *     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":910
 *           'RestrictionTrackerParam defined')
 *     additional_kwargs[restriction_tracker_param] = (
 *         RestrictionTrackerView(self.threadsafe_restriction_tracker))             # <<<<<<<<<<<<<<
 *     watermark_param = (
 *         self.signature.process_method.watermark_estimator_provider_arg_name)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_RestrictionTrackerView); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, __pyx_v_self->threadsafe_restriction_tracker) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_self->threadsafe_restriction_tracker);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":909
 *           '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_3) < 0)) __PYX_ERR(0, 909, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "apache_beam/runners/common.py":912
 *         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_3 = __pyx_v_self->__pyx_base.signature->process_method->watermark_estimator_provider_arg_name;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_v_watermark_param = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "apache_beam/runners/common.py":915
 *     # 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_8 = (__pyx_v_watermark_param != Py_None);
  __pyx_t_12 = (__pyx_t_8 != 0);
  if (__pyx_t_12) {

    /* "apache_beam/runners/common.py":916
 *     # 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_3 = __pyx_v_self->threadsafe_watermark_estimator;
    __Pyx_INCREF(__pyx_t_3);
    if (unlikely(PyObject_SetItem(__pyx_v_additional_kwargs, __pyx_v_watermark_param, __pyx_t_3) < 0)) __PYX_ERR(0, 916, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "apache_beam/runners/common.py":915
 *     # 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":917
 *     if watermark_param is not None:
 *       additional_kwargs[watermark_param] = self.threadsafe_watermark_estimator
 *     return True             # <<<<<<<<<<<<<<
 * 
 *   def _invoke_process_per_window(self,
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "apache_beam/runners/common.py":882
 *           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_3);
  __Pyx_XDECREF(__pyx_t_10);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":919
 *     return True
 * 
 *   def _invoke_process_per_window(self,             # <<<<<<<<<<<<<<
 *                                  windowed_value,  # type: WindowedValue
 *                                  additional_args,
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_9_invoke_process_per_window(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_9_invoke_process_per_window = {"_invoke_process_per_window", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_9_invoke_process_per_window, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_9_invoke_process_per_window(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_windowed_value = 0;
  PyObject *__pyx_v_additional_args = 0;
  PyObject *__pyx_v_additional_kwargs = 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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_windowed_value,&__pyx_n_s_additional_args,&__pyx_n_s_additional_kwargs,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_windowed_value)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_additional_args)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_invoke_process_per_window", 1, 3, 3, 1); __PYX_ERR(0, 919, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_additional_kwargs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_invoke_process_per_window", 1, 3, 3, 2); __PYX_ERR(0, 919, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_invoke_process_per_window") < 0)) __PYX_ERR(0, 919, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_windowed_value = values[0];
    __pyx_v_additional_args = values[1];
    __pyx_v_additional_kwargs = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_invoke_process_per_window", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 919, __pyx_L3_error)
  __pyx_L3_error:;
  __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 */
  __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_window = NULL;
  PyObject *__pyx_v_side_inputs = NULL;
  PyObject *__pyx_v_args_for_process = NULL;
  PyObject *__pyx_v_kwargs_for_process = NULL;
  PyObject *__pyx_v_global_window = 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_8genexpr7__pyx_v_si = NULL;
  PyObject *__pyx_8genexpr8__pyx_v_si = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  PyObject *(*__pyx_t_6)(PyObject *);
  int __pyx_t_7;
  int __pyx_t_8;
  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;
  Py_UCS4 __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  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_TraceFrameInit(__pyx_codeobj__63)
  __Pyx_RefNannySetupContext("_invoke_process_per_window", 0);
  __Pyx_TraceCall("_invoke_process_per_window", __pyx_f[0], 919, 0, __PYX_ERR(0, 919, __pyx_L1_error));

  /* "apache_beam/runners/common.py":926
 *     # type: (...) -> Optional[SplitResultResidual]
 * 
 *     if self.has_windowed_inputs:             # <<<<<<<<<<<<<<
 *       assert len(windowed_value.windows) <= 1
 *       window, = windowed_value.windows
 */
  __pyx_t_1 = (__pyx_v_self->has_windowed_inputs != 0);
  if (__pyx_t_1) {

    /* "apache_beam/runners/common.py":927
 * 
 *     if self.has_windowed_inputs:
 *       assert len(windowed_value.windows) <= 1             # <<<<<<<<<<<<<<
 *       window, = windowed_value.windows
 *       side_inputs = [si[window] for si in self.side_inputs]
 */
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowed_value, __pyx_n_s_windows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 927, __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, 927, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!((__pyx_t_3 <= 1) != 0))) {
        PyErr_SetNone(PyExc_AssertionError);
        __PYX_ERR(0, 927, __pyx_L1_error)
      }
    }
    #endif

    /* "apache_beam/runners/common.py":928
 *     if self.has_windowed_inputs:
 *       assert len(windowed_value.windows) <= 1
 *       window, = windowed_value.windows             # <<<<<<<<<<<<<<
 *       side_inputs = [si[window] for si in self.side_inputs]
 *       side_inputs.extend(additional_args)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowed_value, __pyx_n_s_windows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 928, __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, 928, __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); 
      } else {
        __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
      }
      __Pyx_INCREF(__pyx_t_4);
      #else
      __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 928, __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, 928, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
      index = 0; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 1) < 0) __PYX_ERR(0, 928, __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, 928, __pyx_L1_error)
      __pyx_L5_unpacking_done:;
    }
    __pyx_v_window = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "apache_beam/runners/common.py":929
 *       assert len(windowed_value.windows) <= 1
 *       window, = windowed_value.windows
 *       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, 929, __pyx_L8_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, 929, __pyx_L8_error)
      }
      __pyx_t_4 = __pyx_v_self->side_inputs; __Pyx_INCREF(__pyx_t_4); __pyx_t_3 = 0;
      for (;;) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 929, __pyx_L8_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 929, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
        __Pyx_XDECREF_SET(__pyx_8genexpr7__pyx_v_si, __pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_8genexpr7__pyx_v_si, __pyx_v_window); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 929, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 929, __pyx_L8_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_si); __pyx_8genexpr7__pyx_v_si = 0;
      goto __pyx_L11_exit_scope;
      __pyx_L8_error:;
      __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_si); __pyx_8genexpr7__pyx_v_si = 0;
      goto __pyx_L1_error;
      __pyx_L11_exit_scope:;
    } /* exit inner scope */
    __pyx_v_side_inputs = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "apache_beam/runners/common.py":930
 *       window, = windowed_value.windows
 *       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,
 */
    __pyx_t_7 = __Pyx_PyList_Extend(__pyx_v_side_inputs, __pyx_v_additional_args); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 930, __pyx_L1_error)

    /* "apache_beam/runners/common.py":931
 *       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_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_util); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 931, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_insert_values_in_args); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 931, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "apache_beam/runners/common.py":933
 *       args_for_process, kwargs_for_process = util.insert_values_in_args(
 *           self.args_for_process, self.kwargs_for_process,
 *           side_inputs)             # <<<<<<<<<<<<<<
 *     elif self.cache_globally_windowed_args:
 *       # Attempt to cache additional args if all inputs are globally
 */
    __pyx_t_4 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_self->args_for_process, __pyx_v_self->kwargs_for_process, __pyx_v_side_inputs};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 931, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_self->args_for_process, __pyx_v_self->kwargs_for_process, __pyx_v_side_inputs};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 931, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 931, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_self->args_for_process);
      __Pyx_GIVEREF(__pyx_v_self->args_for_process);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->args_for_process);
      __Pyx_INCREF(__pyx_v_self->kwargs_for_process);
      __Pyx_GIVEREF(__pyx_v_self->kwargs_for_process);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_self->kwargs_for_process);
      __Pyx_INCREF(__pyx_v_side_inputs);
      __Pyx_GIVEREF(__pyx_v_side_inputs);
      PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_v_side_inputs);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 931, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    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, 931, __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_t_9 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_9);
      #else
      __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 931, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 931, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 931, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext;
      index = 0; __pyx_t_5 = __pyx_t_6(__pyx_t_4); if (unlikely(!__pyx_t_5)) goto __pyx_L12_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      index = 1; __pyx_t_9 = __pyx_t_6(__pyx_t_4); if (unlikely(!__pyx_t_9)) goto __pyx_L12_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_9);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_4), 2) < 0) __PYX_ERR(0, 931, __pyx_L1_error)
      __pyx_t_6 = NULL;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L13_unpacking_done;
      __pyx_L12_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 931, __pyx_L1_error)
      __pyx_L13_unpacking_done:;
    }

    /* "apache_beam/runners/common.py":931
 *       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_v_args_for_process = __pyx_t_5;
    __pyx_t_5 = 0;
    __pyx_v_kwargs_for_process = __pyx_t_9;
    __pyx_t_9 = 0;

    /* "apache_beam/runners/common.py":926
 *     # type: (...) -> Optional[SplitResultResidual]
 * 
 *     if self.has_windowed_inputs:             # <<<<<<<<<<<<<<
 *       assert len(windowed_value.windows) <= 1
 *       window, = windowed_value.windows
 */
    goto __pyx_L3;
  }

  /* "apache_beam/runners/common.py":934
 *           self.args_for_process, self.kwargs_for_process,
 *           side_inputs)
 *     elif self.cache_globally_windowed_args:             # <<<<<<<<<<<<<<
 *       # Attempt to cache additional args if all inputs are globally
 *       # windowed inputs when processing the first element.
 */
  __pyx_t_1 = (__pyx_v_self->cache_globally_windowed_args != 0);
  if (__pyx_t_1) {

    /* "apache_beam/runners/common.py":937
 *       # Attempt to cache additional args if all inputs are globally
 *       # windowed inputs when processing the first element.
 *       self.cache_globally_windowed_args = False             # <<<<<<<<<<<<<<
 * 
 *       # Fill in sideInputs if they are globally windowed
 */
    __pyx_v_self->cache_globally_windowed_args = 0;

    /* "apache_beam/runners/common.py":940
 * 
 *       # Fill in sideInputs if they are globally windowed
 *       global_window = GlobalWindow()             # <<<<<<<<<<<<<<
 *       self.args_for_process, self.kwargs_for_process = (
 *           util.insert_values_in_args(
 */
    __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_GlobalWindow); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 940, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_9);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 940, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_v_global_window = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "apache_beam/runners/common.py":942
 *       global_window = GlobalWindow()
 *       self.args_for_process, self.kwargs_for_process = (
 *           util.insert_values_in_args(             # <<<<<<<<<<<<<<
 *               self.args_for_process, self.kwargs_for_process,
 *               [si[global_window] for si in self.side_inputs]))
 */
    __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_util); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 942, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_insert_values_in_args); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 942, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "apache_beam/runners/common.py":943
 *       self.args_for_process, self.kwargs_for_process = (
 *           util.insert_values_in_args(
 *               self.args_for_process, self.kwargs_for_process,             # <<<<<<<<<<<<<<
 *               [si[global_window] for si in self.side_inputs]))
 *       args_for_process, kwargs_for_process = (
 */
    { /* enter inner scope */

      /* "apache_beam/runners/common.py":944
 *           util.insert_values_in_args(
 *               self.args_for_process, self.kwargs_for_process,
 *               [si[global_window] for si in self.side_inputs]))             # <<<<<<<<<<<<<<
 *       args_for_process, kwargs_for_process = (
 *           self.args_for_process, self.kwargs_for_process)
 */
      __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 944, __pyx_L16_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (unlikely(__pyx_v_self->side_inputs == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
        __PYX_ERR(0, 944, __pyx_L16_error)
      }
      __pyx_t_4 = __pyx_v_self->side_inputs; __Pyx_INCREF(__pyx_t_4); __pyx_t_3 = 0;
      for (;;) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_10 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_3); __Pyx_INCREF(__pyx_t_10); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 944, __pyx_L16_error)
        #else
        __pyx_t_10 = PySequence_ITEM(__pyx_t_4, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 944, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_10);
        #endif
        __Pyx_XDECREF_SET(__pyx_8genexpr8__pyx_v_si, __pyx_t_10);
        __pyx_t_10 = 0;
        __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_8genexpr8__pyx_v_si, __pyx_v_global_window); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 944, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_10);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_9, (PyObject*)__pyx_t_10))) __PYX_ERR(0, 944, __pyx_L16_error)
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_si); __pyx_8genexpr8__pyx_v_si = 0;
      goto __pyx_L19_exit_scope;
      __pyx_L16_error:;
      __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_si); __pyx_8genexpr8__pyx_v_si = 0;
      goto __pyx_L1_error;
      __pyx_L19_exit_scope:;
    } /* exit inner scope */
    __pyx_t_4 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_self->args_for_process, __pyx_v_self->kwargs_for_process, __pyx_t_9};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 942, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_self->args_for_process, __pyx_v_self->kwargs_for_process, __pyx_t_9};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 942, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else
    #endif
    {
      __pyx_t_10 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 942, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_self->args_for_process);
      __Pyx_GIVEREF(__pyx_v_self->args_for_process);
      PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_8, __pyx_v_self->args_for_process);
      __Pyx_INCREF(__pyx_v_self->kwargs_for_process);
      __Pyx_GIVEREF(__pyx_v_self->kwargs_for_process);
      PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_8, __pyx_v_self->kwargs_for_process);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_8, __pyx_t_9);
      __pyx_t_9 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 942, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    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, 941, __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_t_10 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_10 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_10);
      #else
      __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 941, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 941, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 941, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_6 = Py_TYPE(__pyx_t_9)->tp_iternext;
      index = 0; __pyx_t_5 = __pyx_t_6(__pyx_t_9); if (unlikely(!__pyx_t_5)) goto __pyx_L20_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      index = 1; __pyx_t_10 = __pyx_t_6(__pyx_t_9); if (unlikely(!__pyx_t_10)) goto __pyx_L20_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_10);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_9), 2) < 0) __PYX_ERR(0, 941, __pyx_L1_error)
      __pyx_t_6 = NULL;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L21_unpacking_done;
      __pyx_L20_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, 941, __pyx_L1_error)
      __pyx_L21_unpacking_done:;
    }

    /* "apache_beam/runners/common.py":941
 *       # Fill in sideInputs if they are globally windowed
 *       global_window = GlobalWindow()
 *       self.args_for_process, self.kwargs_for_process = (             # <<<<<<<<<<<<<<
 *           util.insert_values_in_args(
 *               self.args_for_process, self.kwargs_for_process,
 */
    if (!(likely(PyList_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_5)->tp_name), 0))) __PYX_ERR(0, 941, __pyx_L1_error)
    if (!(likely(PyDict_CheckExact(__pyx_t_10))||((__pyx_t_10) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_10)->tp_name), 0))) __PYX_ERR(0, 941, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_5);
    __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_5);
    __pyx_t_5 = 0;
    __Pyx_GIVEREF(__pyx_t_10);
    __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_10);
    __pyx_t_10 = 0;

    /* "apache_beam/runners/common.py":946
 *               [si[global_window] for si in self.side_inputs]))
 *       args_for_process, kwargs_for_process = (
 *           self.args_for_process, self.kwargs_for_process)             # <<<<<<<<<<<<<<
 *     else:
 *       args_for_process, kwargs_for_process = (
 */
    __pyx_t_2 = __pyx_v_self->args_for_process;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_10 = __pyx_v_self->kwargs_for_process;
    __Pyx_INCREF(__pyx_t_10);
    __pyx_v_args_for_process = __pyx_t_2;
    __pyx_t_2 = 0;
    __pyx_v_kwargs_for_process = __pyx_t_10;
    __pyx_t_10 = 0;

    /* "apache_beam/runners/common.py":934
 *           self.args_for_process, self.kwargs_for_process,
 *           side_inputs)
 *     elif self.cache_globally_windowed_args:             # <<<<<<<<<<<<<<
 *       # Attempt to cache additional args if all inputs are globally
 *       # windowed inputs when processing the first element.
 */
    goto __pyx_L3;
  }

  /* "apache_beam/runners/common.py":949
 *     else:
 *       args_for_process, kwargs_for_process = (
 *           self.args_for_process, self.kwargs_for_process)             # <<<<<<<<<<<<<<
 * 
 *     # Extract key in the case of a stateful DoFn. Note that in the case of a
 */
  /*else*/ {
    __pyx_t_10 = __pyx_v_self->args_for_process;
    __Pyx_INCREF(__pyx_t_10);
    __pyx_t_2 = __pyx_v_self->kwargs_for_process;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v_args_for_process = __pyx_t_10;
    __pyx_t_10 = 0;
    __pyx_v_kwargs_for_process = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_L3:;

  /* "apache_beam/runners/common.py":955
 *     # 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_11 = __Pyx_PyObject_IsTrue(__pyx_v_self->__pyx_base.user_state_context); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 955, __pyx_L1_error)
  if (!__pyx_t_11) {
  } else {
    __pyx_t_1 = __pyx_t_11;
    goto __pyx_L23_bool_binop_done;
  }
  __pyx_t_11 = (__pyx_v_self->is_key_param_required != 0);
  __pyx_t_1 = __pyx_t_11;
  __pyx_L23_bool_binop_done:;
  if (__pyx_t_1) {

    /* "apache_beam/runners/common.py":956
 *     # 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_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/common.py":957
 *     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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowed_value, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 957, __pyx_L25_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, 957, __pyx_L25_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_10 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
          } else {
            __pyx_t_10 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
          }
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(__pyx_t_5);
          #else
          __pyx_t_10 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 957, __pyx_L25_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 957, __pyx_L25_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 957, __pyx_L25_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_6 = Py_TYPE(__pyx_t_9)->tp_iternext;
          index = 0; __pyx_t_10 = __pyx_t_6(__pyx_t_9); if (unlikely(!__pyx_t_10)) goto __pyx_L31_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_10);
          index = 1; __pyx_t_5 = __pyx_t_6(__pyx_t_9); if (unlikely(!__pyx_t_5)) goto __pyx_L31_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_5);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_9), 2) < 0) __PYX_ERR(0, 957, __pyx_L25_error)
          __pyx_t_6 = NULL;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          goto __pyx_L32_unpacking_done;
          __pyx_L31_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, 957, __pyx_L25_error)
          __pyx_L32_unpacking_done:;
        }
        __pyx_v_key = __pyx_t_10;
        __pyx_t_10 = 0;
        __pyx_v_unused_value = __pyx_t_5;
        __pyx_t_5 = 0;

        /* "apache_beam/runners/common.py":956
 *     # 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_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_L30_try_end;
      __pyx_L25_error:;
      __Pyx_XDECREF(__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_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "apache_beam/runners/common.py":958
 *       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_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
      if (__pyx_t_8) {
        __Pyx_AddTraceback("apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_5, &__pyx_t_10) < 0) __PYX_ERR(0, 958, __pyx_L27_except_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GOTREF(__pyx_t_10);

        /* "apache_beam/runners/common.py":960
 *       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_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 960, __pyx_L27_except_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_3 = 0;
        __pyx_t_15 = 127;
        __Pyx_INCREF(__pyx_kp_u_Input_value_to_a_stateful_DoFn_o);
        __pyx_t_3 += 77;
        __Pyx_GIVEREF(__pyx_kp_u_Input_value_to_a_stateful_DoFn_o);
        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_kp_u_Input_value_to_a_stateful_DoFn_o);

        /* "apache_beam/runners/common.py":961
 *         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_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowed_value, __pyx_n_s_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 961, __pyx_L27_except_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_16 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 961, __pyx_L27_except_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) : __pyx_t_15;
        __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16);
        __Pyx_GIVEREF(__pyx_t_16);
        PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_16);
        __pyx_t_16 = 0;
        __Pyx_INCREF(__pyx_kp_u__64);
        __pyx_t_3 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__64);
        PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_kp_u__64);

        /* "apache_beam/runners/common.py":960
 *       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_9, 3, __pyx_t_3, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 960, __pyx_L27_except_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "apache_beam/runners/common.py":959
 *         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_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_16); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 959, __pyx_L27_except_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_Raise(__pyx_t_9, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __PYX_ERR(0, 959, __pyx_L27_except_error)
      }
      goto __pyx_L27_except_error;
      __pyx_L27_except_error:;

      /* "apache_beam/runners/common.py":956
 *     # 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_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_L1_error;
      __pyx_L30_try_end:;
    }

    /* "apache_beam/runners/common.py":955
 *     # 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":963
 *             '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, 963, __pyx_L1_error)
  }
  __pyx_t_10 = __pyx_v_self->placeholders_for_process; __Pyx_INCREF(__pyx_t_10); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_10)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_5 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 963, __pyx_L1_error)
    #else
    __pyx_t_5 = PySequence_ITEM(__pyx_t_10, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 963, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    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, 963, __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_t_9 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      #else
      __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 963, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 963, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      #endif
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_16 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 963, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_6 = Py_TYPE(__pyx_t_16)->tp_iternext;
      index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_16); if (unlikely(!__pyx_t_2)) goto __pyx_L37_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      index = 1; __pyx_t_9 = __pyx_t_6(__pyx_t_16); if (unlikely(!__pyx_t_9)) goto __pyx_L37_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_9);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_16), 2) < 0) __PYX_ERR(0, 963, __pyx_L1_error)
      __pyx_t_6 = NULL;
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      goto __pyx_L38_unpacking_done;
      __pyx_L37_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, 963, __pyx_L1_error)
      __pyx_L38_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_p, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "apache_beam/runners/common.py":964
 * 
 *     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_5, __pyx_n_s_core); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 964, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 964, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_ElementParam); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 964, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = PyObject_RichCompare(__pyx_t_5, __pyx_v_p, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 964, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 964, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (__pyx_t_1) {

      /* "apache_beam/runners/common.py":965
 *     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_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowed_value, __pyx_n_s_value); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 965, __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, 965, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "apache_beam/runners/common.py":964
 * 
 *     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_L39;
    }

    /* "apache_beam/runners/common.py":966
 *       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_9, __pyx_n_s_core); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 966, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 966, __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_n_s_KeyParam); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 966, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_9, __pyx_v_p, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 966, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 966, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_1) {

      /* "apache_beam/runners/common.py":967
 *         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, 967, __pyx_L1_error) }
      if (unlikely(PyObject_SetItem(__pyx_v_args_for_process, __pyx_v_i, __pyx_v_key) < 0)) __PYX_ERR(0, 967, __pyx_L1_error)

      /* "apache_beam/runners/common.py":966
 *       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_L39;
    }

    /* "apache_beam/runners/common.py":968
 *       elif core.DoFn.KeyParam == p:
 *         args_for_process[i] = key
 *       elif core.DoFn.WindowParam == p:             # <<<<<<<<<<<<<<
 *         args_for_process[i] = window
 *       elif core.DoFn.TimestampParam == p:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_core); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 968, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 968, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_WindowParam); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 968, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = PyObject_RichCompare(__pyx_t_5, __pyx_v_p, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 968, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 968, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (__pyx_t_1) {

      /* "apache_beam/runners/common.py":969
 *         args_for_process[i] = key
 *       elif core.DoFn.WindowParam == p:
 *         args_for_process[i] = window             # <<<<<<<<<<<<<<
 *       elif core.DoFn.TimestampParam == p:
 *         args_for_process[i] = windowed_value.timestamp
 */
      if (unlikely(!__pyx_v_window)) { __Pyx_RaiseUnboundLocalError("window"); __PYX_ERR(0, 969, __pyx_L1_error) }
      if (unlikely(PyObject_SetItem(__pyx_v_args_for_process, __pyx_v_i, __pyx_v_window) < 0)) __PYX_ERR(0, 969, __pyx_L1_error)

      /* "apache_beam/runners/common.py":968
 *       elif core.DoFn.KeyParam == p:
 *         args_for_process[i] = key
 *       elif core.DoFn.WindowParam == p:             # <<<<<<<<<<<<<<
 *         args_for_process[i] = window
 *       elif core.DoFn.TimestampParam == p:
 */
      goto __pyx_L39;
    }

    /* "apache_beam/runners/common.py":970
 *       elif core.DoFn.WindowParam == p:
 *         args_for_process[i] = window
 *       elif core.DoFn.TimestampParam == p:             # <<<<<<<<<<<<<<
 *         args_for_process[i] = windowed_value.timestamp
 *       elif core.DoFn.PaneInfoParam == p:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_core); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 970, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 970, __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_n_s_TimestampParam); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 970, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_9, __pyx_v_p, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 970, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 970, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_1) {

      /* "apache_beam/runners/common.py":971
 *         args_for_process[i] = window
 *       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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowed_value, __pyx_n_s_timestamp); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 971, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(PyObject_SetItem(__pyx_v_args_for_process, __pyx_v_i, __pyx_t_5) < 0)) __PYX_ERR(0, 971, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "apache_beam/runners/common.py":970
 *       elif core.DoFn.WindowParam == p:
 *         args_for_process[i] = window
 *       elif core.DoFn.TimestampParam == p:             # <<<<<<<<<<<<<<
 *         args_for_process[i] = windowed_value.timestamp
 *       elif core.DoFn.PaneInfoParam == p:
 */
      goto __pyx_L39;
    }

    /* "apache_beam/runners/common.py":972
 *       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_5, __pyx_n_s_core); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 972, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 972, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_PaneInfoParam); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 972, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = PyObject_RichCompare(__pyx_t_5, __pyx_v_p, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 972, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 972, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (__pyx_t_1) {

      /* "apache_beam/runners/common.py":973
 *         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_n_s_pane_info); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 973, __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, 973, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "apache_beam/runners/common.py":972
 *       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_L39;
    }

    /* "apache_beam/runners/common.py":974
 *       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_n_s_core); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 974, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 974, __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_n_s_StateParam); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 974, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_1 = PyObject_IsInstance(__pyx_v_p, __pyx_t_9); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 974, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_11 = (__pyx_t_1 != 0);
    if (__pyx_t_11) {

      /* "apache_beam/runners/common.py":975
 *         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_11 = (__pyx_v_self->__pyx_base.user_state_context != Py_None);
        if (unlikely(!(__pyx_t_11 != 0))) {
          PyErr_SetNone(PyExc_AssertionError);
          __PYX_ERR(0, 975, __pyx_L1_error)
        }
      }
      #endif

      /* "apache_beam/runners/common.py":977
 *         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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.user_state_context, __pyx_n_s_get_state); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 977, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_p, __pyx_n_s_state_spec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 977, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (unlikely(!__pyx_v_key)) { __Pyx_RaiseUnboundLocalError("key"); __PYX_ERR(0, 977, __pyx_L1_error) }
      if (unlikely(!__pyx_v_window)) { __Pyx_RaiseUnboundLocalError("window"); __PYX_ERR(0, 977, __pyx_L1_error) }
      __pyx_t_16 = NULL;
      __pyx_t_8 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_16)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_16);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_8 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[4] = {__pyx_t_16, __pyx_t_2, __pyx_v_key, __pyx_v_window};
        __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 977, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[4] = {__pyx_t_16, __pyx_t_2, __pyx_v_key, __pyx_v_window};
        __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 977, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else
      #endif
      {
        __pyx_t_4 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 977, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (__pyx_t_16) {
          __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_16); __pyx_t_16 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_8, __pyx_t_2);
        __Pyx_INCREF(__pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_8, __pyx_v_key);
        __Pyx_INCREF(__pyx_v_window);
        __Pyx_GIVEREF(__pyx_v_window);
        PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_8, __pyx_v_window);
        __pyx_t_2 = 0;
        __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 977, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "apache_beam/runners/common.py":976
 *       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, 976, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "apache_beam/runners/common.py":974
 *       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_L39;
    }

    /* "apache_beam/runners/common.py":978
 *         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_n_s_core); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 978, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 978, __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_n_s_TimerParam); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 978, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_11 = PyObject_IsInstance(__pyx_v_p, __pyx_t_9); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 978, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_1 = (__pyx_t_11 != 0);
    if (__pyx_t_1) {

      /* "apache_beam/runners/common.py":979
 *             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_1 = (__pyx_v_self->__pyx_base.user_state_context != Py_None);
        if (unlikely(!(__pyx_t_1 != 0))) {
          PyErr_SetNone(PyExc_AssertionError);
          __PYX_ERR(0, 979, __pyx_L1_error)
        }
      }
      #endif

      /* "apache_beam/runners/common.py":981
 *         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_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.user_state_context, __pyx_n_s_get_timer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 981, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);

      /* "apache_beam/runners/common.py":982
 *         args_for_process[i] = (
 *             self.user_state_context.get_timer(
 *                 p.timer_spec,             # <<<<<<<<<<<<<<
 *                 key,
 *                 window,
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_p, __pyx_n_s_timer_spec); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 982, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);

      /* "apache_beam/runners/common.py":983
 *             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, 983, __pyx_L1_error) }

      /* "apache_beam/runners/common.py":984
 *                 p.timer_spec,
 *                 key,
 *                 window,             # <<<<<<<<<<<<<<
 *                 windowed_value.timestamp,
 *                 windowed_value.pane_info))
 */
      if (unlikely(!__pyx_v_window)) { __Pyx_RaiseUnboundLocalError("window"); __PYX_ERR(0, 984, __pyx_L1_error) }

      /* "apache_beam/runners/common.py":985
 *                 key,
 *                 window,
 *                 windowed_value.timestamp,             # <<<<<<<<<<<<<<
 *                 windowed_value.pane_info))
 *       elif core.DoFn.BundleFinalizerParam == p:
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowed_value, __pyx_n_s_timestamp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 985, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);

      /* "apache_beam/runners/common.py":986
 *                 window,
 *                 windowed_value.timestamp,
 *                 windowed_value.pane_info))             # <<<<<<<<<<<<<<
 *       elif core.DoFn.BundleFinalizerParam == p:
 *         args_for_process[i] = self.bundle_finalizer_param
 */
      __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowed_value, __pyx_n_s_pane_info); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 986, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __pyx_t_17 = NULL;
      __pyx_t_8 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_17)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_17);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_8 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[6] = {__pyx_t_17, __pyx_t_4, __pyx_v_key, __pyx_v_window, __pyx_t_2, __pyx_t_16};
        __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 5+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 981, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[6] = {__pyx_t_17, __pyx_t_4, __pyx_v_key, __pyx_v_window, __pyx_t_2, __pyx_t_16};
        __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 5+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 981, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      } else
      #endif
      {
        __pyx_t_18 = PyTuple_New(5+__pyx_t_8); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 981, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_18);
        if (__pyx_t_17) {
          __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_17); __pyx_t_17 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_18, 0+__pyx_t_8, __pyx_t_4);
        __Pyx_INCREF(__pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_18, 1+__pyx_t_8, __pyx_v_key);
        __Pyx_INCREF(__pyx_v_window);
        __Pyx_GIVEREF(__pyx_v_window);
        PyTuple_SET_ITEM(__pyx_t_18, 2+__pyx_t_8, __pyx_v_window);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_18, 3+__pyx_t_8, __pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_16);
        PyTuple_SET_ITEM(__pyx_t_18, 4+__pyx_t_8, __pyx_t_16);
        __pyx_t_4 = 0;
        __pyx_t_2 = 0;
        __pyx_t_16 = 0;
        __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_18, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 981, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "apache_beam/runners/common.py":980
 *       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, 980, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "apache_beam/runners/common.py":978
 *         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_L39;
    }

    /* "apache_beam/runners/common.py":987
 *                 windowed_value.timestamp,
 *                 windowed_value.pane_info))
 *       elif core.DoFn.BundleFinalizerParam == p:             # <<<<<<<<<<<<<<
 *         args_for_process[i] = self.bundle_finalizer_param
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_core); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 987, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 987, __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_n_s_BundleFinalizerParam); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 987, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_9, __pyx_v_p, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 987, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 987, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_1) {

      /* "apache_beam/runners/common.py":988
 *                 windowed_value.pane_info))
 *       elif core.DoFn.BundleFinalizerParam == p:
 *         args_for_process[i] = self.bundle_finalizer_param             # <<<<<<<<<<<<<<
 * 
 *     kwargs_for_process = kwargs_for_process or {}
 */
      __pyx_t_5 = __pyx_v_self->__pyx_base.bundle_finalizer_param;
      __Pyx_INCREF(__pyx_t_5);
      if (unlikely(PyObject_SetItem(__pyx_v_args_for_process, __pyx_v_i, __pyx_t_5) < 0)) __PYX_ERR(0, 988, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "apache_beam/runners/common.py":987
 *                 windowed_value.timestamp,
 *                 windowed_value.pane_info))
 *       elif core.DoFn.BundleFinalizerParam == p:             # <<<<<<<<<<<<<<
 *         args_for_process[i] = self.bundle_finalizer_param
 * 
 */
    }
    __pyx_L39:;

    /* "apache_beam/runners/common.py":963
 *             '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_10); __pyx_t_10 = 0;

  /* "apache_beam/runners/common.py":990
 *         args_for_process[i] = self.bundle_finalizer_param
 * 
 *     kwargs_for_process = kwargs_for_process or {}             # <<<<<<<<<<<<<<
 * 
 *     if additional_kwargs:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs_for_process); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 990, __pyx_L1_error)
  if (!__pyx_t_1) {
  } else {
    __Pyx_INCREF(__pyx_v_kwargs_for_process);
    __pyx_t_10 = __pyx_v_kwargs_for_process;
    goto __pyx_L40_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 990, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_10 = __pyx_t_5;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_L40_bool_binop_done:;
  __Pyx_DECREF_SET(__pyx_v_kwargs_for_process, __pyx_t_10);
  __pyx_t_10 = 0;

  /* "apache_beam/runners/common.py":992
 *     kwargs_for_process = kwargs_for_process or {}
 * 
 *     if additional_kwargs:             # <<<<<<<<<<<<<<
 *       kwargs_for_process.update(additional_kwargs)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_additional_kwargs); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 992, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "apache_beam/runners/common.py":993
 * 
 *     if additional_kwargs:
 *       kwargs_for_process.update(additional_kwargs)             # <<<<<<<<<<<<<<
 * 
 *     self.output_handler.handle_process_outputs(
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_kwargs_for_process, __pyx_n_s_update); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 993, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_10 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_v_additional_kwargs) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_additional_kwargs);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 993, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "apache_beam/runners/common.py":992
 *     kwargs_for_process = kwargs_for_process or {}
 * 
 *     if additional_kwargs:             # <<<<<<<<<<<<<<
 *       kwargs_for_process.update(additional_kwargs)
 * 
 */
  }

  /* "apache_beam/runners/common.py":996
 * 
 *     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_ptype_11apache_beam_5utils_14windowed_value_WindowedValue))))) __PYX_ERR(0, 996, __pyx_L1_error)

  /* "apache_beam/runners/common.py":997
 *     self.output_handler.handle_process_outputs(
 *         windowed_value,
 *         self.process_method(*args_for_process, **kwargs_for_process),             # <<<<<<<<<<<<<<
 *         self.threadsafe_watermark_estimator)
 * 
 */
  __pyx_t_10 = __Pyx_PySequence_Tuple(__pyx_v_args_for_process); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 997, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (unlikely(__pyx_v_kwargs_for_process == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
    __PYX_ERR(0, 997, __pyx_L1_error)
  }
  if (likely(PyDict_CheckExact(__pyx_v_kwargs_for_process))) {
    __pyx_t_5 = PyDict_Copy(__pyx_v_kwargs_for_process); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 997, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  } else {
    __pyx_t_5 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_kwargs_for_process, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 997, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_v_self->process_method, __pyx_t_10, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 997, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "apache_beam/runners/common.py":998
 *         windowed_value,
 *         self.process_method(*args_for_process, **kwargs_for_process),
 *         self.threadsafe_watermark_estimator)             # <<<<<<<<<<<<<<
 * 
 *     if self.is_splittable:
 */
  __pyx_t_5 = __pyx_v_self->threadsafe_watermark_estimator;
  __Pyx_INCREF(__pyx_t_5);

  /* "apache_beam/runners/common.py":995
 *       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_5;
  __pyx_t_10 = ((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_10)) __PYX_ERR(0, 995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "apache_beam/runners/common.py":1000
 *         self.threadsafe_watermark_estimator)
 * 
 *     if self.is_splittable:             # <<<<<<<<<<<<<<
 *       assert self.threadsafe_restriction_tracker is not None
 *       self.threadsafe_restriction_tracker.check_done()
 */
  __pyx_t_1 = (__pyx_v_self->is_splittable != 0);
  if (__pyx_t_1) {

    /* "apache_beam/runners/common.py":1001
 * 
 *     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_1 = (__pyx_v_self->threadsafe_restriction_tracker != Py_None);
      if (unlikely(!(__pyx_t_1 != 0))) {
        PyErr_SetNone(PyExc_AssertionError);
        __PYX_ERR(0, 1001, __pyx_L1_error)
      }
    }
    #endif

    /* "apache_beam/runners/common.py":1002
 *     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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->threadsafe_restriction_tracker, __pyx_n_s_check_done); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1002, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_10 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1002, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "apache_beam/runners/common.py":1003
 *       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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->threadsafe_restriction_tracker, __pyx_n_s_deferred_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1003, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_10 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1003, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_deferred_status = __pyx_t_10;
    __pyx_t_10 = 0;

    /* "apache_beam/runners/common.py":1004
 *       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_1 = __Pyx_PyObject_IsTrue(__pyx_v_deferred_status); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1004, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "apache_beam/runners/common.py":1005
 *       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, 1005, __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_t_5 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_10 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(__pyx_t_5);
        #else
        __pyx_t_10 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1005, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1005, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      } else {
        Py_ssize_t index = -1;
        __pyx_t_9 = PyObject_GetIter(__pyx_v_deferred_status); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1005, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_6 = Py_TYPE(__pyx_t_9)->tp_iternext;
        index = 0; __pyx_t_10 = __pyx_t_6(__pyx_t_9); if (unlikely(!__pyx_t_10)) goto __pyx_L45_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_10);
        index = 1; __pyx_t_5 = __pyx_t_6(__pyx_t_9); if (unlikely(!__pyx_t_5)) goto __pyx_L45_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_5);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_9), 2) < 0) __PYX_ERR(0, 1005, __pyx_L1_error)
        __pyx_t_6 = NULL;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L46_unpacking_done;
        __pyx_L45_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, 1005, __pyx_L1_error)
        __pyx_L46_unpacking_done:;
      }
      __pyx_v_deferred_restriction = __pyx_t_10;
      __pyx_t_10 = 0;
      __pyx_v_deferred_timestamp = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "apache_beam/runners/common.py":1006
 *       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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowed_value, __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1006, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_v_element = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "apache_beam/runners/common.py":1007
 *         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_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.signature), __pyx_n_s_get_restriction_provider); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1007, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_18 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_18)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_18);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
        }
      }
      __pyx_t_10 = (__pyx_t_18) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_18) : __Pyx_PyObject_CallNoArg(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1007, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_restriction_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1007, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "apache_beam/runners/common.py":1008
 *         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_10 = NULL;
      __pyx_t_8 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
          __pyx_t_8 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_element, __pyx_v_deferred_restriction};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1007, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_5);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_element, __pyx_v_deferred_restriction};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1007, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_5);
      } else
      #endif
      {
        __pyx_t_18 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1007, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_18);
        if (__pyx_t_10) {
          __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_10); __pyx_t_10 = NULL;
        }
        __Pyx_INCREF(__pyx_v_element);
        __Pyx_GIVEREF(__pyx_v_element);
        PyTuple_SET_ITEM(__pyx_t_18, 0+__pyx_t_8, __pyx_v_element);
        __Pyx_INCREF(__pyx_v_deferred_restriction);
        __Pyx_GIVEREF(__pyx_v_deferred_restriction);
        PyTuple_SET_ITEM(__pyx_t_18, 1+__pyx_t_8, __pyx_v_deferred_restriction);
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_18, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1007, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      }
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_v_size = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "apache_beam/runners/common.py":1009
 *         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_5 = PyObject_RichCompare(__pyx_v_size, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1009, __pyx_L1_error)
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1009, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(__pyx_t_1)) {

        /* "apache_beam/runners/common.py":1010
 *             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_5 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Expected_size_0_but_received_s, __pyx_v_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1010, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1010, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_Raise(__pyx_t_9, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __PYX_ERR(0, 1010, __pyx_L1_error)

        /* "apache_beam/runners/common.py":1009
 *         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":1012
 *           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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->threadsafe_watermark_estimator, __pyx_n_s_current_watermark); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1012, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_18 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_18)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_18);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_9 = (__pyx_t_18) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_18) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1012, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_current_watermark = __pyx_t_9;
      __pyx_t_9 = 0;

      /* "apache_beam/runners/common.py":1014
 *             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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->threadsafe_watermark_estimator, __pyx_n_s_get_estimator_state); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1014, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_18 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_18)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_18);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_9 = (__pyx_t_18) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_18) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1014, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_estimator_state = __pyx_t_9;
      __pyx_t_9 = 0;

      /* "apache_beam/runners/common.py":1015
 *         estimator_state = (
 *             self.threadsafe_watermark_estimator.get_estimator_state())
 *         residual_value = ((element, (deferred_restriction, estimator_state)),             # <<<<<<<<<<<<<<
 *                           size)
 *         return SplitResultResidual(
 */
      __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1015, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_INCREF(__pyx_v_deferred_restriction);
      __Pyx_GIVEREF(__pyx_v_deferred_restriction);
      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_deferred_restriction);
      __Pyx_INCREF(__pyx_v_estimator_state);
      __Pyx_GIVEREF(__pyx_v_estimator_state);
      PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_estimator_state);
      __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1015, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v_element);
      __Pyx_GIVEREF(__pyx_v_element);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_element);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "apache_beam/runners/common.py":1016
 *             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_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1015, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5);
      __Pyx_INCREF(__pyx_v_size);
      __Pyx_GIVEREF(__pyx_v_size);
      PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_size);
      __pyx_t_5 = 0;
      __pyx_v_residual_value = ((PyObject*)__pyx_t_9);
      __pyx_t_9 = 0;

      /* "apache_beam/runners/common.py":1017
 *         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_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_SplitResultResidual); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1017, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);

      /* "apache_beam/runners/common.py":1018
 *                           size)
 *         return SplitResultResidual(
 *             residual_value=windowed_value.with_value(residual_value),             # <<<<<<<<<<<<<<
 *             current_watermark=current_watermark,
 *             deferred_timestamp=deferred_timestamp)
 */
      __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1018, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowed_value, __pyx_n_s_with_value); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1018, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_16 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
        __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_10);
        if (likely(__pyx_t_16)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
          __Pyx_INCREF(__pyx_t_16);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_10, function);
        }
      }
      __pyx_t_18 = (__pyx_t_16) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_16, __pyx_v_residual_value) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_residual_value);
      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
      if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1018, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_residual_value, __pyx_t_18) < 0) __PYX_ERR(0, 1018, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;

      /* "apache_beam/runners/common.py":1019
 *         return SplitResultResidual(
 *             residual_value=windowed_value.with_value(residual_value),
 *             current_watermark=current_watermark,             # <<<<<<<<<<<<<<
 *             deferred_timestamp=deferred_timestamp)
 *     return None
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_current_watermark, __pyx_v_current_watermark) < 0) __PYX_ERR(0, 1018, __pyx_L1_error)

      /* "apache_beam/runners/common.py":1020
 *             residual_value=windowed_value.with_value(residual_value),
 *             current_watermark=current_watermark,
 *             deferred_timestamp=deferred_timestamp)             # <<<<<<<<<<<<<<
 *     return None
 * 
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_deferred_timestamp, __pyx_v_deferred_timestamp) < 0) __PYX_ERR(0, 1018, __pyx_L1_error)

      /* "apache_beam/runners/common.py":1017
 *         residual_value = ((element, (deferred_restriction, estimator_state)),
 *                           size)
 *         return SplitResultResidual(             # <<<<<<<<<<<<<<
 *             residual_value=windowed_value.with_value(residual_value),
 *             current_watermark=current_watermark,
 */
      __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1017, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_r = __pyx_t_18;
      __pyx_t_18 = 0;
      goto __pyx_L0;

      /* "apache_beam/runners/common.py":1004
 *       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":1000
 *         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":1021
 *             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":919
 *     return True
 * 
 *   def _invoke_process_per_window(self,             # <<<<<<<<<<<<<<
 *                                  windowed_value,  # type: WindowedValue
 *                                  additional_args,
 */

  /* 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_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __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_window);
  __Pyx_XDECREF(__pyx_v_side_inputs);
  __Pyx_XDECREF(__pyx_v_args_for_process);
  __Pyx_XDECREF(__pyx_v_kwargs_for_process);
  __Pyx_XDECREF(__pyx_v_global_window);
  __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_8genexpr7__pyx_v_si);
  __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_si);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1023
 *     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, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_11_invoke_process_batch_per_window = {"_invoke_process_batch_per_window", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_11_invoke_process_batch_per_window, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_11_invoke_process_batch_per_window(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch = 0;
  PyObject *__pyx_v_additional_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_additional_kwargs = 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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_windowed_batch,&__pyx_n_s_additional_args,&__pyx_n_s_additional_kwargs,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_windowed_batch)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_additional_args)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_invoke_process_batch_per_window", 1, 3, 3, 1); __PYX_ERR(0, 1023, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_additional_kwargs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_invoke_process_batch_per_window", 1, 3, 3, 2); __PYX_ERR(0, 1023, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_invoke_process_batch_per_window") < 0)) __PYX_ERR(0, 1023, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __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_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_invoke_process_batch_per_window", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1023, __pyx_L3_error)
  __pyx_L3_error:;
  __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_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch, 1, "windowed_batch", 0))) __PYX_ERR(0, 1025, __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;
  __pyx_L0:;
  __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, CYTHON_UNUSED PyObject *__pyx_v_additional_kwargs) {
  PyObject *__pyx_v_window = NULL;
  PyObject *__pyx_v_side_inputs = NULL;
  PyObject *__pyx_v_args_for_process_batch = NULL;
  PyObject *__pyx_v_kwargs_for_process_batch = NULL;
  PyObject *__pyx_v_global_window = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_p = NULL;
  PyObject *__pyx_8genexpr9__pyx_v_si = NULL;
  PyObject *__pyx_9genexpr10__pyx_v_si = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  PyObject *(*__pyx_t_6)(PyObject *);
  int __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  struct __pyx_opt_args_11apache_beam_7runners_6common_13OutputHandler_handle_process_batch_outputs __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__65)
  __Pyx_RefNannySetupContext("_invoke_process_batch_per_window", 0);
  __Pyx_TraceCall("_invoke_process_batch_per_window", __pyx_f[0], 1023, 0, __PYX_ERR(0, 1023, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1031
 *     # type: (...) -> Optional[SplitResultResidual]
 * 
 *     if self.has_windowed_inputs:             # <<<<<<<<<<<<<<
 *       assert isinstance(windowed_batch, HomogeneousWindowedBatch)
 *       assert len(windowed_batch.windows) <= 1
 */
  __pyx_t_1 = (__pyx_v_self->has_windowed_inputs != 0);
  if (__pyx_t_1) {

    /* "apache_beam/runners/common.py":1032
 * 
 *     if self.has_windowed_inputs:
 *       assert isinstance(windowed_batch, HomogeneousWindowedBatch)             # <<<<<<<<<<<<<<
 *       assert len(windowed_batch.windows) <= 1
 * 
 */
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_HomogeneousWindowedBatch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1032, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = PyObject_IsInstance(((PyObject *)__pyx_v_windowed_batch), __pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1032, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!(__pyx_t_1 != 0))) {
        PyErr_SetNone(PyExc_AssertionError);
        __PYX_ERR(0, 1032, __pyx_L1_error)
      }
    }
    #endif

    /* "apache_beam/runners/common.py":1033
 *     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_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_windowed_batch), __pyx_n_s_windows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1033, __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, 1033, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!((__pyx_t_3 <= 1) != 0))) {
        PyErr_SetNone(PyExc_AssertionError);
        __PYX_ERR(0, 1033, __pyx_L1_error)
      }
    }
    #endif

    /* "apache_beam/runners/common.py":1035
 *       assert len(windowed_batch.windows) <= 1
 * 
 *       window, = windowed_batch.windows             # <<<<<<<<<<<<<<
 *       side_inputs = [si[window] for si in self.side_inputs]
 *       side_inputs.extend(additional_args)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_windowed_batch), __pyx_n_s_windows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1035, __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, 1035, __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); 
      } else {
        __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
      }
      __Pyx_INCREF(__pyx_t_4);
      #else
      __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1035, __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, 1035, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
      index = 0; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 1) < 0) __PYX_ERR(0, 1035, __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, 1035, __pyx_L1_error)
      __pyx_L5_unpacking_done:;
    }
    __pyx_v_window = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "apache_beam/runners/common.py":1036
 * 
 *       window, = windowed_batch.windows
 *       side_inputs = [si[window] for si in self.side_inputs]             # <<<<<<<<<<<<<<
 *       side_inputs.extend(additional_args)
 *       (args_for_process_batch,
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1036, __pyx_L8_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, 1036, __pyx_L8_error)
      }
      __pyx_t_4 = __pyx_v_self->side_inputs; __Pyx_INCREF(__pyx_t_4); __pyx_t_3 = 0;
      for (;;) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1036, __pyx_L8_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1036, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
        __Pyx_XDECREF_SET(__pyx_8genexpr9__pyx_v_si, __pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_8genexpr9__pyx_v_si, __pyx_v_window); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1036, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 1036, __pyx_L8_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_si); __pyx_8genexpr9__pyx_v_si = 0;
      goto __pyx_L11_exit_scope;
      __pyx_L8_error:;
      __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_si); __pyx_8genexpr9__pyx_v_si = 0;
      goto __pyx_L1_error;
      __pyx_L11_exit_scope:;
    } /* exit inner scope */
    __pyx_v_side_inputs = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "apache_beam/runners/common.py":1037
 *       window, = windowed_batch.windows
 *       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_7 = __Pyx_PyList_Extend(__pyx_v_side_inputs, __pyx_v_additional_args); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1037, __pyx_L1_error)

    /* "apache_beam/runners/common.py":1039
 *       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_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_util); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1039, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_insert_values_in_args); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1039, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "apache_beam/runners/common.py":1042
 *            self.args_for_process_batch,
 *            self.kwargs_for_process_batch,
 *            side_inputs)             # <<<<<<<<<<<<<<
 *     elif self.cache_globally_windowed_args:
 *       # Attempt to cache additional args if all inputs are globally
 */
    __pyx_t_4 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_self->args_for_process_batch, __pyx_v_self->kwargs_for_process_batch, __pyx_v_side_inputs};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1039, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_self->args_for_process_batch, __pyx_v_self->kwargs_for_process_batch, __pyx_v_side_inputs};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1039, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1039, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_self->args_for_process_batch);
      __Pyx_GIVEREF(__pyx_v_self->args_for_process_batch);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->args_for_process_batch);
      __Pyx_INCREF(__pyx_v_self->kwargs_for_process_batch);
      __Pyx_GIVEREF(__pyx_v_self->kwargs_for_process_batch);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_self->kwargs_for_process_batch);
      __Pyx_INCREF(__pyx_v_side_inputs);
      __Pyx_GIVEREF(__pyx_v_side_inputs);
      PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_v_side_inputs);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1039, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    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, 1038, __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_t_9 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_9);
      #else
      __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1038, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1038, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1038, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext;
      index = 0; __pyx_t_5 = __pyx_t_6(__pyx_t_4); if (unlikely(!__pyx_t_5)) goto __pyx_L12_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      index = 1; __pyx_t_9 = __pyx_t_6(__pyx_t_4); if (unlikely(!__pyx_t_9)) goto __pyx_L12_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_9);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1038, __pyx_L1_error)
      __pyx_t_6 = NULL;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L13_unpacking_done;
      __pyx_L12_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 1038, __pyx_L1_error)
      __pyx_L13_unpacking_done:;
    }

    /* "apache_beam/runners/common.py":1038
 *       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_5;
    __pyx_t_5 = 0;
    __pyx_v_kwargs_for_process_batch = __pyx_t_9;
    __pyx_t_9 = 0;

    /* "apache_beam/runners/common.py":1031
 *     # type: (...) -> Optional[SplitResultResidual]
 * 
 *     if self.has_windowed_inputs:             # <<<<<<<<<<<<<<
 *       assert isinstance(windowed_batch, HomogeneousWindowedBatch)
 *       assert len(windowed_batch.windows) <= 1
 */
    goto __pyx_L3;
  }

  /* "apache_beam/runners/common.py":1043
 *            self.kwargs_for_process_batch,
 *            side_inputs)
 *     elif self.cache_globally_windowed_args:             # <<<<<<<<<<<<<<
 *       # Attempt to cache additional args if all inputs are globally
 *       # windowed inputs when processing the first element.
 */
  __pyx_t_1 = (__pyx_v_self->cache_globally_windowed_args != 0);
  if (__pyx_t_1) {

    /* "apache_beam/runners/common.py":1046
 *       # Attempt to cache additional args if all inputs are globally
 *       # windowed inputs when processing the first element.
 *       self.cache_globally_windowed_args = False             # <<<<<<<<<<<<<<
 * 
 *       # Fill in sideInputs if they are globally windowed
 */
    __pyx_v_self->cache_globally_windowed_args = 0;

    /* "apache_beam/runners/common.py":1049
 * 
 *       # Fill in sideInputs if they are globally windowed
 *       global_window = GlobalWindow()             # <<<<<<<<<<<<<<
 *       self.args_for_process_batch, self.kwargs_for_process_batch = (
 *           util.insert_values_in_args(
 */
    __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_GlobalWindow); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1049, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_9);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1049, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_v_global_window = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "apache_beam/runners/common.py":1051
 *       global_window = GlobalWindow()
 *       self.args_for_process_batch, self.kwargs_for_process_batch = (
 *           util.insert_values_in_args(             # <<<<<<<<<<<<<<
 *               self.args_for_process_batch, self.kwargs_for_process_batch,
 *               [si[global_window] for si in self.side_inputs]))
 */
    __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_util); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1051, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_insert_values_in_args); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1051, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "apache_beam/runners/common.py":1052
 *       self.args_for_process_batch, self.kwargs_for_process_batch = (
 *           util.insert_values_in_args(
 *               self.args_for_process_batch, self.kwargs_for_process_batch,             # <<<<<<<<<<<<<<
 *               [si[global_window] for si in self.side_inputs]))
 *       args_for_process_batch, kwargs_for_process_batch = (
 */
    { /* enter inner scope */

      /* "apache_beam/runners/common.py":1053
 *           util.insert_values_in_args(
 *               self.args_for_process_batch, self.kwargs_for_process_batch,
 *               [si[global_window] for si in self.side_inputs]))             # <<<<<<<<<<<<<<
 *       args_for_process_batch, kwargs_for_process_batch = (
 *           self.args_for_process_batch, self.kwargs_for_process_batch)
 */
      __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1053, __pyx_L16_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (unlikely(__pyx_v_self->side_inputs == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
        __PYX_ERR(0, 1053, __pyx_L16_error)
      }
      __pyx_t_4 = __pyx_v_self->side_inputs; __Pyx_INCREF(__pyx_t_4); __pyx_t_3 = 0;
      for (;;) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_10 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_3); __Pyx_INCREF(__pyx_t_10); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1053, __pyx_L16_error)
        #else
        __pyx_t_10 = PySequence_ITEM(__pyx_t_4, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1053, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_10);
        #endif
        __Pyx_XDECREF_SET(__pyx_9genexpr10__pyx_v_si, __pyx_t_10);
        __pyx_t_10 = 0;
        __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_9genexpr10__pyx_v_si, __pyx_v_global_window); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1053, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_10);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_9, (PyObject*)__pyx_t_10))) __PYX_ERR(0, 1053, __pyx_L16_error)
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_si); __pyx_9genexpr10__pyx_v_si = 0;
      goto __pyx_L19_exit_scope;
      __pyx_L16_error:;
      __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_si); __pyx_9genexpr10__pyx_v_si = 0;
      goto __pyx_L1_error;
      __pyx_L19_exit_scope:;
    } /* exit inner scope */
    __pyx_t_4 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_self->args_for_process_batch, __pyx_v_self->kwargs_for_process_batch, __pyx_t_9};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1051, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_self->args_for_process_batch, __pyx_v_self->kwargs_for_process_batch, __pyx_t_9};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1051, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else
    #endif
    {
      __pyx_t_10 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1051, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_self->args_for_process_batch);
      __Pyx_GIVEREF(__pyx_v_self->args_for_process_batch);
      PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_8, __pyx_v_self->args_for_process_batch);
      __Pyx_INCREF(__pyx_v_self->kwargs_for_process_batch);
      __Pyx_GIVEREF(__pyx_v_self->kwargs_for_process_batch);
      PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_8, __pyx_v_self->kwargs_for_process_batch);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_8, __pyx_t_9);
      __pyx_t_9 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1051, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    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, 1050, __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_t_10 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_10 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_10);
      #else
      __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1050, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1050, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1050, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_6 = Py_TYPE(__pyx_t_9)->tp_iternext;
      index = 0; __pyx_t_5 = __pyx_t_6(__pyx_t_9); if (unlikely(!__pyx_t_5)) goto __pyx_L20_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      index = 1; __pyx_t_10 = __pyx_t_6(__pyx_t_9); if (unlikely(!__pyx_t_10)) goto __pyx_L20_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_10);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_9), 2) < 0) __PYX_ERR(0, 1050, __pyx_L1_error)
      __pyx_t_6 = NULL;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L21_unpacking_done;
      __pyx_L20_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, 1050, __pyx_L1_error)
      __pyx_L21_unpacking_done:;
    }

    /* "apache_beam/runners/common.py":1050
 *       # Fill in sideInputs if they are globally windowed
 *       global_window = GlobalWindow()
 *       self.args_for_process_batch, self.kwargs_for_process_batch = (             # <<<<<<<<<<<<<<
 *           util.insert_values_in_args(
 *               self.args_for_process_batch, self.kwargs_for_process_batch,
 */
    if (!(likely(PyList_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_5)->tp_name), 0))) __PYX_ERR(0, 1050, __pyx_L1_error)
    if (!(likely(PyDict_CheckExact(__pyx_t_10))||((__pyx_t_10) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_10)->tp_name), 0))) __PYX_ERR(0, 1050, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_5);
    __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_5);
    __pyx_t_5 = 0;
    __Pyx_GIVEREF(__pyx_t_10);
    __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_10);
    __pyx_t_10 = 0;

    /* "apache_beam/runners/common.py":1055
 *               [si[global_window] for si in self.side_inputs]))
 *       args_for_process_batch, kwargs_for_process_batch = (
 *           self.args_for_process_batch, self.kwargs_for_process_batch)             # <<<<<<<<<<<<<<
 *     else:
 *       args_for_process_batch, kwargs_for_process_batch = (
 */
    __pyx_t_2 = __pyx_v_self->args_for_process_batch;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_10 = __pyx_v_self->kwargs_for_process_batch;
    __Pyx_INCREF(__pyx_t_10);
    __pyx_v_args_for_process_batch = __pyx_t_2;
    __pyx_t_2 = 0;
    __pyx_v_kwargs_for_process_batch = __pyx_t_10;
    __pyx_t_10 = 0;

    /* "apache_beam/runners/common.py":1043
 *            self.kwargs_for_process_batch,
 *            side_inputs)
 *     elif self.cache_globally_windowed_args:             # <<<<<<<<<<<<<<
 *       # Attempt to cache additional args if all inputs are globally
 *       # windowed inputs when processing the first element.
 */
    goto __pyx_L3;
  }

  /* "apache_beam/runners/common.py":1058
 *     else:
 *       args_for_process_batch, kwargs_for_process_batch = (
 *           self.args_for_process_batch, self.kwargs_for_process_batch)             # <<<<<<<<<<<<<<
 * 
 *     for i, p in self.placeholders_for_process_batch:
 */
  /*else*/ {
    __pyx_t_10 = __pyx_v_self->args_for_process_batch;
    __Pyx_INCREF(__pyx_t_10);
    __pyx_t_2 = __pyx_v_self->kwargs_for_process_batch;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v_args_for_process_batch = __pyx_t_10;
    __pyx_t_10 = 0;
    __pyx_v_kwargs_for_process_batch = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_L3:;

  /* "apache_beam/runners/common.py":1060
 *           self.args_for_process_batch, self.kwargs_for_process_batch)
 * 
 *     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, 1060, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_v_self->placeholders_for_process_batch; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_10 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_10); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1060, __pyx_L1_error)
    #else
    __pyx_t_10 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1060, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    #endif
    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, 1060, __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_t_9 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_9);
      #else
      __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1060, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1060, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      #endif
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_4 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1060, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext;
      index = 0; __pyx_t_5 = __pyx_t_6(__pyx_t_4); if (unlikely(!__pyx_t_5)) goto __pyx_L24_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      index = 1; __pyx_t_9 = __pyx_t_6(__pyx_t_4); if (unlikely(!__pyx_t_9)) goto __pyx_L24_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_9);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1060, __pyx_L1_error)
      __pyx_t_6 = NULL;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L25_unpacking_done;
      __pyx_L24_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 1060, __pyx_L1_error)
      __pyx_L25_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_p, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "apache_beam/runners/common.py":1061
 * 
 *     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_10, __pyx_n_s_core); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1061, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1061, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_ElementParam); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1061, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = PyObject_RichCompare(__pyx_t_10, __pyx_v_p, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1061, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1061, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (__pyx_t_1) {

      /* "apache_beam/runners/common.py":1062
 *     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_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_windowed_batch), __pyx_n_s_values); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1062, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (unlikely(PyObject_SetItem(__pyx_v_args_for_process_batch, __pyx_v_i, __pyx_t_9) < 0)) __PYX_ERR(0, 1062, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "apache_beam/runners/common.py":1061
 * 
 *     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_L26;
    }

    /* "apache_beam/runners/common.py":1063
 *       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: "
 */
    __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_core); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1063, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1063, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_KeyParam); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1063, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = PyObject_RichCompare(__pyx_t_9, __pyx_v_p, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1063, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1063, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(__pyx_t_1)) {

      /* "apache_beam/runners/common.py":1064
 *         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_10 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1064, __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, 1064, __pyx_L1_error)

      /* "apache_beam/runners/common.py":1063
 *       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: "
 */
    }

    /* "apache_beam/runners/common.py":1067
 *             "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_10, __pyx_n_s_core); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1067, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1067, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_WindowParam); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1067, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = PyObject_RichCompare(__pyx_t_10, __pyx_v_p, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1067, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1067, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (__pyx_t_1) {

      /* "apache_beam/runners/common.py":1068
 *             "Per-key process_batch")
 *       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, 1068, __pyx_L1_error) }
      if (unlikely(PyObject_SetItem(__pyx_v_args_for_process_batch, __pyx_v_i, __pyx_v_window) < 0)) __PYX_ERR(0, 1068, __pyx_L1_error)

      /* "apache_beam/runners/common.py":1067
 *             "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_L26;
    }

    /* "apache_beam/runners/common.py":1069
 *       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_9, __pyx_n_s_core); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1069, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1069, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_TimestampParam); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1069, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = PyObject_RichCompare(__pyx_t_9, __pyx_v_p, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1069, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1069, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (__pyx_t_1) {

      /* "apache_beam/runners/common.py":1070
 *         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_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_windowed_batch), __pyx_n_s_timestamp); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1070, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      if (unlikely(PyObject_SetItem(__pyx_v_args_for_process_batch, __pyx_v_i, __pyx_t_10) < 0)) __PYX_ERR(0, 1070, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "apache_beam/runners/common.py":1069
 *       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_L26;
    }

    /* "apache_beam/runners/common.py":1071
 *       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_10, __pyx_n_s_core); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1071, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1071, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_PaneInfoParam); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1071, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = PyObject_RichCompare(__pyx_t_10, __pyx_v_p, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1071, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1071, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (__pyx_t_1) {

      /* "apache_beam/runners/common.py":1072
 *         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_9, __pyx_n_s_HomogeneousWindowedBatch); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1072, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_1 = PyObject_IsInstance(((PyObject *)__pyx_v_windowed_batch), __pyx_t_9); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1072, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!(__pyx_t_1 != 0))) {
          PyErr_SetNone(PyExc_AssertionError);
          __PYX_ERR(0, 1072, __pyx_L1_error)
        }
      }
      #endif

      /* "apache_beam/runners/common.py":1073
 *       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_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_windowed_batch), __pyx_n_s_pane_info); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1073, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (unlikely(PyObject_SetItem(__pyx_v_args_for_process_batch, __pyx_v_i, __pyx_t_9) < 0)) __PYX_ERR(0, 1073, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "apache_beam/runners/common.py":1071
 *       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_L26;
    }

    /* "apache_beam/runners/common.py":1074
 *         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_9, __pyx_n_s_core); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1074, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1074, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_StateParam); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1074, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_1 = PyObject_IsInstance(__pyx_v_p, __pyx_t_9); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1074, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_11 = (__pyx_t_1 != 0);
    if (unlikely(__pyx_t_11)) {

      /* "apache_beam/runners/common.py":1075
 *         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_9 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1075, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __PYX_ERR(0, 1075, __pyx_L1_error)

      /* "apache_beam/runners/common.py":1074
 *         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":1078
 *             "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_9, __pyx_n_s_core); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1078, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1078, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_TimerParam); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1078, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_11 = PyObject_IsInstance(__pyx_v_p, __pyx_t_9); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 1078, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_1 = (__pyx_t_11 != 0);
    if (unlikely(__pyx_t_1)) {

      /* "apache_beam/runners/common.py":1079
 *             "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_9 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1079, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __PYX_ERR(0, 1079, __pyx_L1_error)

      /* "apache_beam/runners/common.py":1078
 *             "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_L26:;

    /* "apache_beam/runners/common.py":1060
 *           self.args_for_process_batch, self.kwargs_for_process_batch)
 * 
 *     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_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":1083
 *             "Per-key process_batch")
 * 
 *     kwargs_for_process_batch = kwargs_for_process_batch or {}             # <<<<<<<<<<<<<<
 * 
 *     self.output_handler.handle_process_batch_outputs(
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs_for_process_batch); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1083, __pyx_L1_error)
  if (!__pyx_t_1) {
  } else {
    __Pyx_INCREF(__pyx_v_kwargs_for_process_batch);
    __pyx_t_2 = __pyx_v_kwargs_for_process_batch;
    goto __pyx_L27_bool_binop_done;
  }
  __pyx_t_9 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1083, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_INCREF(__pyx_t_9);
  __pyx_t_2 = __pyx_t_9;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_L27_bool_binop_done:;
  __Pyx_DECREF_SET(__pyx_v_kwargs_for_process_batch, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":1087
 *     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_PySequence_Tuple(__pyx_v_args_for_process_batch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "apache_beam/runners/common.py":1088
 *         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, 1088, __pyx_L1_error)
  }
  if (likely(PyDict_CheckExact(__pyx_v_kwargs_for_process_batch))) {
    __pyx_t_9 = PyDict_Copy(__pyx_v_kwargs_for_process_batch); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1088, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    __pyx_t_9 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_kwargs_for_process_batch, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1087, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
  }

  /* "apache_beam/runners/common.py":1087
 *     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_10 = __Pyx_PyObject_Call(__pyx_v_self->process_batch_method, __pyx_t_2, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "apache_beam/runners/common.py":1089
 *         self.process_batch_method(
 *             *args_for_process_batch, **kwargs_for_process_batch),
 *         self.threadsafe_watermark_estimator)             # <<<<<<<<<<<<<<
 * 
 *   @staticmethod
 */
  __pyx_t_9 = __pyx_v_self->threadsafe_watermark_estimator;
  __Pyx_INCREF(__pyx_t_9);

  /* "apache_beam/runners/common.py":1085
 *     kwargs_for_process_batch = kwargs_for_process_batch or {}
 * 
 *     self.output_handler.handle_process_batch_outputs(             # <<<<<<<<<<<<<<
 *         windowed_batch,
 *         self.process_batch_method(
 */
  __pyx_t_12.__pyx_n = 1;
  __pyx_t_12.watermark_estimator = __pyx_t_9;
  __pyx_t_2 = ((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_10, 0, &__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1085, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":1023
 *     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_2);
  __Pyx_XDECREF(__pyx_t_4);
  __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_window);
  __Pyx_XDECREF(__pyx_v_side_inputs);
  __Pyx_XDECREF(__pyx_v_args_for_process_batch);
  __Pyx_XDECREF(__pyx_v_kwargs_for_process_batch);
  __Pyx_XDECREF(__pyx_v_global_window);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_si);
  __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_si);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1092
 * 
 *   @staticmethod
 *   def _try_split(fraction,             # <<<<<<<<<<<<<<
 *       window_index, # type: Optional[int]
 *       stop_window_index, # type: Optional[int]
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_13_try_split(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __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*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_13_try_split, METH_VARARGS|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, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  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;
  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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fraction,&__pyx_n_s_window_index,&__pyx_n_s_stop_window_index,&__pyx_n_s_windowed_value,&__pyx_n_s_restriction,&__pyx_n_s_watermark_estimator_state,&__pyx_n_s_restriction_provider,&__pyx_n_s_restriction_tracker,&__pyx_n_s_watermark_estimator,0};
    PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fraction)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_window_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_try_split", 1, 9, 9, 1); __PYX_ERR(0, 1092, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stop_window_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_try_split", 1, 9, 9, 2); __PYX_ERR(0, 1092, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_windowed_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_try_split", 1, 9, 9, 3); __PYX_ERR(0, 1092, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_restriction)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_try_split", 1, 9, 9, 4); __PYX_ERR(0, 1092, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_watermark_estimator_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_try_split", 1, 9, 9, 5); __PYX_ERR(0, 1092, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_restriction_provider)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_try_split", 1, 9, 9, 6); __PYX_ERR(0, 1092, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_restriction_tracker)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_try_split", 1, 9, 9, 7); __PYX_ERR(0, 1092, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  8:
        if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_watermark_estimator)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_try_split", 1, 9, 9, 8); __PYX_ERR(0, 1092, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_try_split") < 0)) __PYX_ERR(0, 1092, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 9) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
      values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
      values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
      values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
    }
    __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_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_try_split", 1, 9, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1092, __pyx_L3_error)
  __pyx_L3_error:;
  __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 */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1136
 *       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, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_10_try_split_1compute_whole_window_split = {"compute_whole_window_split", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_10_try_split_1compute_whole_window_split, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_10_try_split_1compute_whole_window_split(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_to_index = 0;
  PyObject *__pyx_v_from_index = 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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_to_index,&__pyx_n_s_from_index,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_to_index)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_from_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("compute_whole_window_split", 1, 2, 2, 1); __PYX_ERR(0, 1136, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compute_whole_window_split") < 0)) __PYX_ERR(0, 1136, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_to_index = values[0];
    __pyx_v_from_index = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("compute_whole_window_split", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1136, __pyx_L3_error)
  __pyx_L3_error:;
  __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 */
  __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_TraceDeclarations
  __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;
  int __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("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;
  __Pyx_TraceCall("compute_whole_window_split", __pyx_f[0], 1136, 0, __PYX_ERR(0, 1136, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1137
 *     """
 *     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, 1137, __pyx_L1_error) }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_restriction_provider, __pyx_n_s_restriction_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "apache_beam/runners/common.py":1138
 *     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, 1138, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_v_restriction)) { __Pyx_RaiseClosureNameError("restriction"); __PYX_ERR(0, 1138, __pyx_L1_error) }
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_windowed_value, __pyx_cur_scope->__pyx_v_restriction};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1137, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_windowed_value, __pyx_cur_scope->__pyx_v_restriction};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1137, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_windowed_value);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_windowed_value);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_cur_scope->__pyx_v_windowed_value);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_restriction);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_restriction);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_cur_scope->__pyx_v_restriction);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_restriction_size = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":1139
 *       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_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1139, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1139, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_t_6)) {

    /* "apache_beam/runners/common.py":1141
 *       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_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Expected_size_0_but_received_s, __pyx_v_restriction_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1141, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "apache_beam/runners/common.py":1140
 *           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 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1140, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1140, __pyx_L1_error)

    /* "apache_beam/runners/common.py":1139
 *       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":1144
 *       # 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, 1144, __pyx_L1_error) }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_windowed_value, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely(!__pyx_cur_scope->__pyx_v_restriction)) { __Pyx_RaiseClosureNameError("restriction"); __PYX_ERR(0, 1144, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_v_watermark_estimator_state)) { __Pyx_RaiseClosureNameError("watermark_estimator_state"); __PYX_ERR(0, 1144, __pyx_L1_error) }
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_restriction);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_restriction);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_cur_scope->__pyx_v_restriction);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_watermark_estimator_state);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_watermark_estimator_state);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_cur_scope->__pyx_v_watermark_estimator_state);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":1145
 *       # 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_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
  __Pyx_INCREF(__pyx_v_restriction_size);
  __Pyx_GIVEREF(__pyx_v_restriction_size);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_restriction_size);
  __pyx_t_5 = 0;
  __pyx_v_value = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":1150
 *               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_5 = PyObject_RichCompare(__pyx_v_to_index, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1150, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1150, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_6) {

    /* "apache_beam/runners/common.py":1146
 *       value = ((windowed_value.value, (restriction, watermark_estimator_state)),
 *                restriction_size)
 *       primary_restriction = SplitResultPrimary(             # <<<<<<<<<<<<<<
 *           primary_value=WindowedValue(
 *               value,
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_SplitResultPrimary); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1146, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);

    /* "apache_beam/runners/common.py":1147
 *                restriction_size)
 *       primary_restriction = SplitResultPrimary(
 *           primary_value=WindowedValue(             # <<<<<<<<<<<<<<
 *               value,
 *               windowed_value.timestamp,
 */
    __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "apache_beam/runners/common.py":1149
 *           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, 1149, __pyx_L1_error) }
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_windowed_value, __pyx_n_s_timestamp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);

    /* "apache_beam/runners/common.py":1150
 *               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, 1150, __pyx_L1_error) }
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_windowed_value, __pyx_n_s_windows); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_t_7, 0, 0, NULL, &__pyx_v_to_index, NULL, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "apache_beam/runners/common.py":1147
 *                restriction_size)
 *       primary_restriction = SplitResultPrimary(
 *           primary_value=WindowedValue(             # <<<<<<<<<<<<<<
 *               value,
 *               windowed_value.timestamp,
 */
    __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_value);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_8);
    __pyx_t_3 = 0;
    __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue), __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_primary_value, __pyx_t_8) < 0) __PYX_ERR(0, 1147, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "apache_beam/runners/common.py":1146
 *       value = ((windowed_value.value, (restriction, watermark_estimator_state)),
 *                restriction_size)
 *       primary_restriction = SplitResultPrimary(             # <<<<<<<<<<<<<<
 *           primary_value=WindowedValue(
 *               value,
 */
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1146, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_1 = __pyx_t_8;
    __pyx_t_8 = 0;
  } else {

    /* "apache_beam/runners/common.py":1150
 *               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_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_primary_restriction = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":1159
 *               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, 1159, __pyx_L1_error) }
  __pyx_t_8 = PyObject_RichCompare(__pyx_v_from_index, __pyx_cur_scope->__pyx_v_stop_window_index, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1159, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1159, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__pyx_t_6) {

    /* "apache_beam/runners/common.py":1153
 *       # 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_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_SplitResultResidual); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);

    /* "apache_beam/runners/common.py":1154
 *       # not processed any part of the restriction.
 *       residual_restriction = SplitResultResidual(
 *           residual_value=WindowedValue(             # <<<<<<<<<<<<<<
 *               value,
 *               windowed_value.timestamp,
 */
    __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "apache_beam/runners/common.py":1156
 *           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, 1156, __pyx_L1_error) }
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_windowed_value, __pyx_n_s_timestamp); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);

    /* "apache_beam/runners/common.py":1157
 *               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, 1157, __pyx_L1_error) }
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_windowed_value, __pyx_n_s_windows); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1157, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (unlikely(!__pyx_cur_scope->__pyx_v_stop_window_index)) { __Pyx_RaiseClosureNameError("stop_window_index"); __PYX_ERR(0, 1157, __pyx_L1_error) }
    __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_7, 0, 0, &__pyx_v_from_index, &__pyx_cur_scope->__pyx_v_stop_window_index, NULL, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1157, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "apache_beam/runners/common.py":1154
 *       # not processed any part of the restriction.
 *       residual_restriction = SplitResultResidual(
 *           residual_value=WindowedValue(             # <<<<<<<<<<<<<<
 *               value,
 *               windowed_value.timestamp,
 */
    __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_value);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3);
    __pyx_t_5 = 0;
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue), __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_residual_value, __pyx_t_3) < 0) __PYX_ERR(0, 1154, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "apache_beam/runners/common.py":1158
 *               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
 *       return (primary_restriction, residual_restriction)
 */
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_current_watermark, Py_None) < 0) __PYX_ERR(0, 1154, __pyx_L1_error)

    /* "apache_beam/runners/common.py":1159
 *               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 (PyDict_SetItem(__pyx_t_2, __pyx_n_s_deferred_timestamp, Py_None) < 0) __PYX_ERR(0, 1154, __pyx_L1_error)

    /* "apache_beam/runners/common.py":1153
 *       # 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_3 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {

    /* "apache_beam/runners/common.py":1159
 *               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_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_residual_restriction = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":1160
 *           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_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_primary_restriction);
  __Pyx_GIVEREF(__pyx_v_primary_restriction);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_primary_restriction);
  __Pyx_INCREF(__pyx_v_residual_restriction);
  __Pyx_GIVEREF(__pyx_v_residual_restriction);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_residual_restriction);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/runners/common.py":1136
 *       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_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1092
 * 
 *   @staticmethod
 *   def _try_split(fraction,             # <<<<<<<<<<<<<<
 *       window_index, # type: Optional[int]
 *       stop_window_index, # type: Optional[int]
 */

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_TraceDeclarations
  __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_t_6;
  PyObject *__pyx_t_7 = NULL;
  long __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__67)
  __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_ptype_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split, __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, 1092, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("_try_split", __pyx_f[0], 1092, 0, __PYX_ERR(0, 1092, __pyx_L1_error));
  __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":1136
 *       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_n_s_try_split_locals_compute_whole, ((PyObject*)__pyx_cur_scope), __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1136, __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":1162
 *       return (primary_restriction, residual_restriction)
 * 
 *     primary_restrictions = []             # <<<<<<<<<<<<<<
 *     residual_restrictions = []
 * 
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1162, __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":1163
 * 
 *     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, 1163, __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":1165
 *     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, 1165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_window_observing = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":1169
 *     # 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, 1169, __pyx_L1_error)
  if (__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_cur_scope->__pyx_v_stop_window_index, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1169, __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, 1169, __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, 1169, __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":1170
 *     # 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_PyObject_GetAttrStr(__pyx_v_restriction_tracker, __pyx_n_s_current_progress); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1170, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1170, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_progress = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "apache_beam/runners/common.py":1171
 *     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, 1171, __pyx_L1_error)
    __pyx_t_3 = ((!__pyx_t_2) != 0);
    if (__pyx_t_3) {

      /* "apache_beam/runners/common.py":1174
 *         # 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)
 * 
 */
      __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1174, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_n_s_RestrictionProgress);
      __Pyx_GIVEREF(__pyx_n_s_RestrictionProgress);
      PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_RestrictionProgress);
      __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_io_iobase, __pyx_t_4, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1174, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_RestrictionProgress); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1174, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_4);
      __pyx_v_RestrictionProgress = __pyx_t_4;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "apache_beam/runners/common.py":1175
 *         # is unavailable.
 *         from apache_beam.io.iobase import RestrictionProgress
 *         progress = RestrictionProgress(completed=0, remaining=1)             # <<<<<<<<<<<<<<
 * 
 *       scaled_progress = PerWindowInvoker._scale_progress(
 */
      __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1175, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_completed, __pyx_int_0) < 0) __PYX_ERR(0, 1175, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_remaining, __pyx_int_1) < 0) __PYX_ERR(0, 1175, __pyx_L1_error)
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_RestrictionProgress, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1175, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_progress, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "apache_beam/runners/common.py":1171
 *     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":1177
 *         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_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker), __pyx_n_s_scale_progress); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "apache_beam/runners/common.py":1178
 * 
 *       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 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_progress, __pyx_v_window_index, __pyx_cur_scope->__pyx_v_stop_window_index};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1177, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_progress, __pyx_v_window_index, __pyx_cur_scope->__pyx_v_stop_window_index};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1177, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1177, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_v_progress);
      __Pyx_GIVEREF(__pyx_v_progress);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_progress);
      __Pyx_INCREF(__pyx_v_window_index);
      __Pyx_GIVEREF(__pyx_v_window_index);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_window_index);
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_stop_window_index);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_stop_window_index);
      PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_cur_scope->__pyx_v_stop_window_index);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1177, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_scaled_progress = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "apache_beam/runners/common.py":1182
 *       # 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_n_s_remaining_work); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyNumber_Multiply(__pyx_t_4, __pyx_v_fraction); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_fraction_of_remainder = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "apache_beam/runners/common.py":1183
 *       # 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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_progress, __pyx_n_s_remaining_work); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1183, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_fraction_of_remainder, __pyx_t_1, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1183, __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, 1183, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_3) {

      /* "apache_beam/runners/common.py":1194
 *                 int(
 *                     round((
 *                         progress.completed_work +             # <<<<<<<<<<<<<<
 *                         scaled_progress.remaining_work * fraction) /
 *                           progress.total_work))))
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_progress, __pyx_n_s_completed_work); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1194, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);

      /* "apache_beam/runners/common.py":1195
 *                     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_n_s_remaining_work); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1195, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = PyNumber_Multiply(__pyx_t_1, __pyx_v_fraction); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1195, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "apache_beam/runners/common.py":1194
 *                 int(
 *                     round((
 *                         progress.completed_work +             # <<<<<<<<<<<<<<
 *                         scaled_progress.remaining_work * fraction) /
 *                           progress.total_work))))
 */
      __pyx_t_1 = PyNumber_Add(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1194, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "apache_beam/runners/common.py":1196
 *                         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_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_progress, __pyx_n_s_total_work); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1196, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);

      /* "apache_beam/runners/common.py":1195
 *                     round((
 *                         progress.completed_work +
 *                         scaled_progress.remaining_work * fraction) /             # <<<<<<<<<<<<<<
 *                           progress.total_work))))
 *         primary, residual = compute_whole_window_split(
 */
      __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1195, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "apache_beam/runners/common.py":1193
 *                 1,
 *                 int(
 *                     round((             # <<<<<<<<<<<<<<
 *                         progress.completed_work +
 *                         scaled_progress.remaining_work * fraction) /
 */
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_round, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1193, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "apache_beam/runners/common.py":1192
 *             window_index + max(
 *                 1,
 *                 int(             # <<<<<<<<<<<<<<
 *                     round((
 *                         progress.completed_work +
 */
      __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1192, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = 1;

      /* "apache_beam/runners/common.py":1191
 *             stop_window_index - 1,
 *             window_index + max(
 *                 1,             # <<<<<<<<<<<<<<
 *                 int(
 *                     round((
 */
      __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1191, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1192, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "apache_beam/runners/common.py":1192
 *             window_index + max(
 *                 1,
 *                 int(             # <<<<<<<<<<<<<<
 *                     round((
 *                         progress.completed_work +
 */
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1192, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_3) {
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_7 = __pyx_t_4;
      } else {

        /* "apache_beam/runners/common.py":1191
 *             stop_window_index - 1,
 *             window_index + max(
 *                 1,             # <<<<<<<<<<<<<<
 *                 int(
 *                     round((
 */
        __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1191, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_7 = __pyx_t_5;
        __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "apache_beam/runners/common.py":1190
 *         new_stop_window_index = min(
 *             stop_window_index - 1,
 *             window_index + max(             # <<<<<<<<<<<<<<
 *                 1,
 *                 int(
 */
      __pyx_t_4 = PyNumber_Add(__pyx_v_window_index, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1190, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "apache_beam/runners/common.py":1189
 *         # based upon the fraction.
 *         new_stop_window_index = min(
 *             stop_window_index - 1,             # <<<<<<<<<<<<<<
 *             window_index + max(
 *                 1,
 */
      __pyx_t_7 = __Pyx_PyInt_SubtractObjC(__pyx_cur_scope->__pyx_v_stop_window_index, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1189, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);

      /* "apache_beam/runners/common.py":1190
 *         new_stop_window_index = min(
 *             stop_window_index - 1,
 *             window_index + max(             # <<<<<<<<<<<<<<
 *                 1,
 *                 int(
 */
      __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_t_7, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1190, __pyx_L1_error)
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1190, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_3) {
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_5 = __pyx_t_4;
      } else {
        __Pyx_INCREF(__pyx_t_7);
        __pyx_t_5 = __pyx_t_7;
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __pyx_t_5;
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_new_stop_window_index = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "apache_beam/runners/common.py":1197
 *                         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_4 = __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_4)) __PYX_ERR(0, 1197, __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, 1197, __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_t_7 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        #else
        __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1197, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1197, __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_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1197, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext;
        index = 0; __pyx_t_5 = __pyx_t_9(__pyx_t_1); if (unlikely(!__pyx_t_5)) goto __pyx_L8_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_5);
        index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_1); if (unlikely(!__pyx_t_7)) goto __pyx_L8_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_7);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_1), 2) < 0) __PYX_ERR(0, 1197, __pyx_L1_error)
        __pyx_t_9 = NULL;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L9_unpacking_done;
        __pyx_L8_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, 1197, __pyx_L1_error)
        __pyx_L9_unpacking_done:;
      }
      __pyx_v_primary = __pyx_t_5;
      __pyx_t_5 = 0;
      __pyx_v_residual = __pyx_t_7;
      __pyx_t_7 = 0;

      /* "apache_beam/runners/common.py":1199
 *         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 != 0))) {
          PyErr_SetNone(PyExc_AssertionError);
          __PYX_ERR(0, 1199, __pyx_L1_error)
        }
      }
      #endif

      /* "apache_beam/runners/common.py":1200
 *             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 != 0))) {
          PyErr_SetNone(PyExc_AssertionError);
          __PYX_ERR(0, 1200, __pyx_L1_error)
        }
      }
      #endif

      /* "apache_beam/runners/common.py":1201
 *         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_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1201, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_primary);
      __Pyx_GIVEREF(__pyx_v_primary);
      PyList_SET_ITEM(__pyx_t_4, 0, __pyx_v_primary);
      __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1201, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_v_residual);
      __Pyx_GIVEREF(__pyx_v_residual);
      PyList_SET_ITEM(__pyx_t_7, 0, __pyx_v_residual);
      __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1201, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_7);
      __Pyx_INCREF(__pyx_v_new_stop_window_index);
      __Pyx_GIVEREF(__pyx_v_new_stop_window_index);
      PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_new_stop_window_index);
      __pyx_t_4 = 0;
      __pyx_t_7 = 0;
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "apache_beam/runners/common.py":1183
 *       # 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":1205
 *         # 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_5 = __Pyx_PyInt_AddObjC(__pyx_v_window_index, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1205, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_v_new_stop_window_index = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "apache_beam/runners/common.py":1206
 *         # 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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_progress, __pyx_n_s_remaining_work); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1206, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = __Pyx_PyNumber_Divide(__pyx_v_fraction_of_remainder, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1206, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF_SET(__pyx_v_fraction, __pyx_t_7);
      __pyx_t_7 = 0;
    }

    /* "apache_beam/runners/common.py":1169
 *     # 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":1212
 *       # 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":1217
 *     # 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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_watermark_estimator, __pyx_n_s_current_watermark); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_7 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_current_watermark = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "apache_beam/runners/common.py":1218
 *     # 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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_watermark_estimator, __pyx_n_s_get_estimator_state); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_7 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_current_estimator_state = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "apache_beam/runners/common.py":1219
 *     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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_restriction_tracker, __pyx_n_s_try_split); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_7 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_v_fraction) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_fraction);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_split = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "apache_beam/runners/common.py":1220
 *     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, 1220, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "apache_beam/runners/common.py":1221
 *     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, 1221, __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_t_5 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_7 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_5);
      #else
      __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1221, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1221, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      #endif
    } else {
      Py_ssize_t index = -1;
      __pyx_t_4 = PyObject_GetIter(__pyx_v_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1221, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_9 = Py_TYPE(__pyx_t_4)->tp_iternext;
      index = 0; __pyx_t_7 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_7)) goto __pyx_L11_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      index = 1; __pyx_t_5 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_5)) goto __pyx_L11_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1221, __pyx_L1_error)
      __pyx_t_9 = NULL;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L12_unpacking_done;
      __pyx_L11_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_9 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 1221, __pyx_L1_error)
      __pyx_L12_unpacking_done:;
    }
    __pyx_v_primary = __pyx_t_7;
    __pyx_t_7 = 0;
    __pyx_v_residual = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "apache_beam/runners/common.py":1222
 *     if split:
 *       primary, residual = split
 *       element = windowed_value.value             # <<<<<<<<<<<<<<
 *       primary_size = restriction_provider.restriction_size(
 *           windowed_value.value, primary)
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_windowed_value, __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1222, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_element = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "apache_beam/runners/common.py":1223
 *       primary, residual = split
 *       element = windowed_value.value
 *       primary_size = restriction_provider.restriction_size(             # <<<<<<<<<<<<<<
 *           windowed_value.value, primary)
 *       if primary_size < 0:
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_restriction_provider, __pyx_n_s_restriction_size); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);

    /* "apache_beam/runners/common.py":1224
 *       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_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_windowed_value, __pyx_n_s_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1224, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_4, __pyx_v_primary};
      __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1223, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_4, __pyx_v_primary};
      __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1223, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_10 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1223, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      if (__pyx_t_1) {
        __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1); __pyx_t_1 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_6, __pyx_t_4);
      __Pyx_INCREF(__pyx_v_primary);
      __Pyx_GIVEREF(__pyx_v_primary);
      PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_6, __pyx_v_primary);
      __pyx_t_4 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1223, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_v_primary_size = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "apache_beam/runners/common.py":1225
 *       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_5 = PyObject_RichCompare(__pyx_v_primary_size, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1225, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1225, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(__pyx_t_3)) {

      /* "apache_beam/runners/common.py":1226
 *           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_5 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Expected_size_0_but_received_s, __pyx_v_primary_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1226, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1226, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __PYX_ERR(0, 1226, __pyx_L1_error)

      /* "apache_beam/runners/common.py":1225
 *       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":1227
 *       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_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_restriction_provider, __pyx_n_s_restriction_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);

    /* "apache_beam/runners/common.py":1228
 *         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_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_windowed_value, __pyx_n_s_value); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1228, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_4 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_10, __pyx_v_residual};
      __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1227, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_10, __pyx_v_residual};
      __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1227, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    } else
    #endif
    {
      __pyx_t_1 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1227, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_10);
      PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_6, __pyx_t_10);
      __Pyx_INCREF(__pyx_v_residual);
      __Pyx_GIVEREF(__pyx_v_residual);
      PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_6, __pyx_v_residual);
      __pyx_t_10 = 0;
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1227, __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_v_residual_size = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "apache_beam/runners/common.py":1229
 *       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_7 = PyObject_RichCompare(__pyx_v_residual_size, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1229, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1229, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_t_3)) {

      /* "apache_beam/runners/common.py":1230
 *           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_7 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Expected_size_0_but_received_s, __pyx_v_residual_size); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1230, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1230, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __PYX_ERR(0, 1230, __pyx_L1_error)

      /* "apache_beam/runners/common.py":1229
 *       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":1234
 *       # 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_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1234, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_primary);
    __Pyx_GIVEREF(__pyx_v_primary);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_primary);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_watermark_estimator_state);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_watermark_estimator_state);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_cur_scope->__pyx_v_watermark_estimator_state);
    __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1234, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_v_element);
    __Pyx_GIVEREF(__pyx_v_element);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_element);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "apache_beam/runners/common.py":1235
 *       # 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_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1234, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7);
    __Pyx_INCREF(__pyx_v_primary_size);
    __Pyx_GIVEREF(__pyx_v_primary_size);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_primary_size);
    __pyx_t_7 = 0;
    __pyx_v_primary_split_value = ((PyObject*)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "apache_beam/runners/common.py":1236
 *       primary_split_value = ((element, (primary, watermark_estimator_state)),
 *                              primary_size)
 *       residual_split_value = ((element, (residual, current_estimator_state)),             # <<<<<<<<<<<<<<
 *                               residual_size)
 *       windows = (
 */
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1236, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_residual);
    __Pyx_GIVEREF(__pyx_v_residual);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_residual);
    __Pyx_INCREF(__pyx_v_current_estimator_state);
    __Pyx_GIVEREF(__pyx_v_current_estimator_state);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_current_estimator_state);
    __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1236, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_v_element);
    __Pyx_GIVEREF(__pyx_v_element);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_element);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "apache_beam/runners/common.py":1237
 *                              primary_size)
 *       residual_split_value = ((element, (residual, current_estimator_state)),
 *                               residual_size)             # <<<<<<<<<<<<<<
 *       windows = (
 *           windowed_value.windows[window_index],
 */
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1236, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7);
    __Pyx_INCREF(__pyx_v_residual_size);
    __Pyx_GIVEREF(__pyx_v_residual_size);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_residual_size);
    __pyx_t_7 = 0;
    __pyx_v_residual_split_value = ((PyObject*)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "apache_beam/runners/common.py":1240
 *       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, 1240, __pyx_L1_error)
    if (__pyx_t_3) {

      /* "apache_beam/runners/common.py":1239
 *                               residual_size)
 *       windows = (
 *           windowed_value.windows[window_index],             # <<<<<<<<<<<<<<
 *       ) if window_observing else windowed_value.windows
 *       primary_restrictions.append(
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_windowed_value, __pyx_n_s_windows); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1239, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_v_window_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1239, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1239, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_5 = __pyx_t_7;
      __pyx_t_7 = 0;
    } else {

      /* "apache_beam/runners/common.py":1240
 *       windows = (
 *           windowed_value.windows[window_index],
 *       ) if window_observing else windowed_value.windows             # <<<<<<<<<<<<<<
 *       primary_restrictions.append(
 *           SplitResultPrimary(
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_windowed_value, __pyx_n_s_windows); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1240, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_5 = __pyx_t_7;
      __pyx_t_7 = 0;
    }
    __pyx_v_windows = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "apache_beam/runners/common.py":1242
 *       ) if window_observing else windowed_value.windows
 *       primary_restrictions.append(
 *           SplitResultPrimary(             # <<<<<<<<<<<<<<
 *               primary_value=WindowedValue(
 *                   primary_split_value, windowed_value.timestamp, windows)))
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_SplitResultPrimary); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1242, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);

    /* "apache_beam/runners/common.py":1243
 *       primary_restrictions.append(
 *           SplitResultPrimary(
 *               primary_value=WindowedValue(             # <<<<<<<<<<<<<<
 *                   primary_split_value, windowed_value.timestamp, windows)))
 *       residual_restrictions.append(
 */
    __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1243, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);

    /* "apache_beam/runners/common.py":1244
 *           SplitResultPrimary(
 *               primary_value=WindowedValue(
 *                   primary_split_value, windowed_value.timestamp, windows)))             # <<<<<<<<<<<<<<
 *       residual_restrictions.append(
 *           SplitResultResidual(
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_windowed_value, __pyx_n_s_timestamp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1244, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "apache_beam/runners/common.py":1243
 *       primary_restrictions.append(
 *           SplitResultPrimary(
 *               primary_value=WindowedValue(             # <<<<<<<<<<<<<<
 *                   primary_split_value, windowed_value.timestamp, windows)))
 *       residual_restrictions.append(
 */
    __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1243, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_INCREF(__pyx_v_primary_split_value);
    __Pyx_GIVEREF(__pyx_v_primary_split_value);
    PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_primary_split_value);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_windows);
    __Pyx_GIVEREF(__pyx_v_windows);
    PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_windows);
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue), __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1243, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_primary_value, __pyx_t_1) < 0) __PYX_ERR(0, 1243, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/runners/common.py":1242
 *       ) if window_observing else windowed_value.windows
 *       primary_restrictions.append(
 *           SplitResultPrimary(             # <<<<<<<<<<<<<<
 *               primary_value=WindowedValue(
 *                   primary_split_value, windowed_value.timestamp, windows)))
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1242, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "apache_beam/runners/common.py":1241
 *           windowed_value.windows[window_index],
 *       ) if window_observing else windowed_value.windows
 *       primary_restrictions.append(             # <<<<<<<<<<<<<<
 *           SplitResultPrimary(
 *               primary_value=WindowedValue(
 */
    __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_primary_restrictions, __pyx_t_1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 1241, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/runners/common.py":1246
 *                   primary_split_value, windowed_value.timestamp, windows)))
 *       residual_restrictions.append(
 *           SplitResultResidual(             # <<<<<<<<<<<<<<
 *               residual_value=WindowedValue(
 *                   residual_split_value, windowed_value.timestamp, windows),
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SplitResultResidual); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1246, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "apache_beam/runners/common.py":1247
 *       residual_restrictions.append(
 *           SplitResultResidual(
 *               residual_value=WindowedValue(             # <<<<<<<<<<<<<<
 *                   residual_split_value, windowed_value.timestamp, windows),
 *               current_watermark=current_watermark,
 */
    __pyx_t_7 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);

    /* "apache_beam/runners/common.py":1248
 *           SplitResultResidual(
 *               residual_value=WindowedValue(
 *                   residual_split_value, windowed_value.timestamp, windows),             # <<<<<<<<<<<<<<
 *               current_watermark=current_watermark,
 *               deferred_timestamp=None))
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_windowed_value, __pyx_n_s_timestamp); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1248, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);

    /* "apache_beam/runners/common.py":1247
 *       residual_restrictions.append(
 *           SplitResultResidual(
 *               residual_value=WindowedValue(             # <<<<<<<<<<<<<<
 *                   residual_split_value, windowed_value.timestamp, windows),
 *               current_watermark=current_watermark,
 */
    __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_INCREF(__pyx_v_residual_split_value);
    __Pyx_GIVEREF(__pyx_v_residual_split_value);
    PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_residual_split_value);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_5);
    __Pyx_INCREF(__pyx_v_windows);
    __Pyx_GIVEREF(__pyx_v_windows);
    PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_windows);
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue), __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_residual_value, __pyx_t_5) < 0) __PYX_ERR(0, 1247, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "apache_beam/runners/common.py":1249
 *               residual_value=WindowedValue(
 *                   residual_split_value, windowed_value.timestamp, windows),
 *               current_watermark=current_watermark,             # <<<<<<<<<<<<<<
 *               deferred_timestamp=None))
 * 
 */
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_current_watermark, __pyx_v_current_watermark) < 0) __PYX_ERR(0, 1247, __pyx_L1_error)

    /* "apache_beam/runners/common.py":1250
 *                   residual_split_value, windowed_value.timestamp, windows),
 *               current_watermark=current_watermark,
 *               deferred_timestamp=None))             # <<<<<<<<<<<<<<
 * 
 *       if window_observing:
 */
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_deferred_timestamp, Py_None) < 0) __PYX_ERR(0, 1247, __pyx_L1_error)

    /* "apache_beam/runners/common.py":1246
 *                   primary_split_value, windowed_value.timestamp, windows)))
 *       residual_restrictions.append(
 *           SplitResultResidual(             # <<<<<<<<<<<<<<
 *               residual_value=WindowedValue(
 *                   residual_split_value, windowed_value.timestamp, windows),
 */
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1246, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "apache_beam/runners/common.py":1245
 *               primary_value=WindowedValue(
 *                   primary_split_value, windowed_value.timestamp, windows)))
 *       residual_restrictions.append(             # <<<<<<<<<<<<<<
 *           SplitResultResidual(
 *               residual_value=WindowedValue(
 */
    __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_residual_restrictions, __pyx_t_5); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 1245, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "apache_beam/runners/common.py":1252
 *               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, 1252, __pyx_L1_error)
    if (__pyx_t_3) {

      /* "apache_beam/runners/common.py":1253
 * 
 *       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_5 = __Pyx_PyInt_AddObjC(__pyx_v_window_index, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1253, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_7 = PyObject_RichCompare(__pyx_v_new_stop_window_index, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1253, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1253, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_3)) {
          PyErr_SetNone(PyExc_AssertionError);
          __PYX_ERR(0, 1253, __pyx_L1_error)
        }
      }
      #endif

      /* "apache_beam/runners/common.py":1255
 *         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_7 = __Pyx_PyInt_AddObjC(__pyx_v_window_index, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1255, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);

      /* "apache_beam/runners/common.py":1254
 *       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_5 = __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_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1254, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      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, 1254, __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_t_1 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_7 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_1);
        #else
        __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1254, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1254, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_10 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1254, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_9 = Py_TYPE(__pyx_t_10)->tp_iternext;
        index = 0; __pyx_t_7 = __pyx_t_9(__pyx_t_10); if (unlikely(!__pyx_t_7)) goto __pyx_L16_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_7);
        index = 1; __pyx_t_1 = __pyx_t_9(__pyx_t_10); if (unlikely(!__pyx_t_1)) goto __pyx_L16_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_1);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_10), 2) < 0) __PYX_ERR(0, 1254, __pyx_L1_error)
        __pyx_t_9 = NULL;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L17_unpacking_done;
        __pyx_L16_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_9 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 1254, __pyx_L1_error)
        __pyx_L17_unpacking_done:;
      }
      __Pyx_DECREF_SET(__pyx_v_primary, __pyx_t_7);
      __pyx_t_7 = 0;
      __Pyx_DECREF_SET(__pyx_v_residual, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "apache_beam/runners/common.py":1256
 *         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, 1256, __pyx_L1_error)
      if (__pyx_t_3) {

        /* "apache_beam/runners/common.py":1257
 *             window_index, window_index + 1)
 *         if primary:
 *           primary_restrictions.append(primary)             # <<<<<<<<<<<<<<
 *         if residual:
 *           residual_restrictions.append(residual)
 */
        __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_primary_restrictions, __pyx_v_primary); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 1257, __pyx_L1_error)

        /* "apache_beam/runners/common.py":1256
 *         primary, residual = compute_whole_window_split(
 *             window_index, window_index + 1)
 *         if primary:             # <<<<<<<<<<<<<<
 *           primary_restrictions.append(primary)
 *         if residual:
 */
      }

      /* "apache_beam/runners/common.py":1258
 *         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, 1258, __pyx_L1_error)
      if (__pyx_t_3) {

        /* "apache_beam/runners/common.py":1259
 *           primary_restrictions.append(primary)
 *         if residual:
 *           residual_restrictions.append(residual)             # <<<<<<<<<<<<<<
 *       return (
 *           primary_restrictions, residual_restrictions, new_stop_window_index)
 */
        __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_residual_restrictions, __pyx_v_residual); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 1259, __pyx_L1_error)

        /* "apache_beam/runners/common.py":1258
 *         if primary:
 *           primary_restrictions.append(primary)
 *         if residual:             # <<<<<<<<<<<<<<
 *           residual_restrictions.append(residual)
 *       return (
 */
      }

      /* "apache_beam/runners/common.py":1252
 *               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":1260
 *         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":1261
 *           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_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1261, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_primary_restrictions);
    __Pyx_GIVEREF(__pyx_v_primary_restrictions);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_primary_restrictions);
    __Pyx_INCREF(__pyx_v_residual_restrictions);
    __Pyx_GIVEREF(__pyx_v_residual_restrictions);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_residual_restrictions);
    __Pyx_INCREF(__pyx_v_new_stop_window_index);
    __Pyx_GIVEREF(__pyx_v_new_stop_window_index);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_new_stop_window_index);
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "apache_beam/runners/common.py":1220
 *     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":1262
 *       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, 1262, __pyx_L1_error)
  if (__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L20_bool_binop_done;
  }
  __pyx_t_5 = PyObject_RichCompare(__pyx_v_new_stop_window_index, __pyx_cur_scope->__pyx_v_stop_window_index, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1262, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1262, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = __pyx_t_2;
  __pyx_L20_bool_binop_done:;
  if (__pyx_t_3) {

    /* "apache_beam/runners/common.py":1265
 *       # 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_5 = __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_5)) __PYX_ERR(0, 1265, __pyx_L1_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, 1265, __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_t_7 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_7);
      #else
      __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1265, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1265, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      #endif
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_10 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1265, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_9 = Py_TYPE(__pyx_t_10)->tp_iternext;
      index = 0; __pyx_t_1 = __pyx_t_9(__pyx_t_10); if (unlikely(!__pyx_t_1)) goto __pyx_L22_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_1);
      index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_10); if (unlikely(!__pyx_t_7)) goto __pyx_L22_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_10), 2) < 0) __PYX_ERR(0, 1265, __pyx_L1_error)
      __pyx_t_9 = NULL;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      goto __pyx_L23_unpacking_done;
      __pyx_L22_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_9 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 1265, __pyx_L1_error)
      __pyx_L23_unpacking_done:;
    }
    __pyx_v_primary = __pyx_t_1;
    __pyx_t_1 = 0;
    __pyx_v_residual = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "apache_beam/runners/common.py":1267
 *       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 != 0))) {
        PyErr_SetNone(PyExc_AssertionError);
        __PYX_ERR(0, 1267, __pyx_L1_error)
      }
    }
    #endif

    /* "apache_beam/runners/common.py":1268
 *           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 != 0))) {
        PyErr_SetNone(PyExc_AssertionError);
        __PYX_ERR(0, 1268, __pyx_L1_error)
      }
    }
    #endif

    /* "apache_beam/runners/common.py":1269
 *       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_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1269, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_primary);
    __Pyx_GIVEREF(__pyx_v_primary);
    PyList_SET_ITEM(__pyx_t_5, 0, __pyx_v_primary);
    __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1269, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_v_residual);
    __Pyx_GIVEREF(__pyx_v_residual);
    PyList_SET_ITEM(__pyx_t_7, 0, __pyx_v_residual);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1269, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_7);
    __Pyx_INCREF(__pyx_v_new_stop_window_index);
    __Pyx_GIVEREF(__pyx_v_new_stop_window_index);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_new_stop_window_index);
    __pyx_t_5 = 0;
    __pyx_t_7 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "apache_beam/runners/common.py":1262
 *       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":1271
 *       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":1092
 * 
 *   @staticmethod
 *   def _try_split(fraction,             # <<<<<<<<<<<<<<
 *       window_index, # type: Optional[int]
 *       stop_window_index, # type: Optional[int]
 */

  /* 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_10);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1273
 *       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, PyObject *__pyx_v_fraction); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_15try_split = {"try_split", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_15try_split, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_15try_split(PyObject *__pyx_v_self, PyObject *__pyx_v_fraction) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("try_split (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_14try_split(((struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *)__pyx_v_self), ((PyObject *)__pyx_v_fraction));

  /* function exit code */
  __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_TraceDeclarations
  __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;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  PyObject *(*__pyx_t_13)(PyObject *);
  PyObject *__pyx_t_14 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__70)
  __Pyx_RefNannySetupContext("try_split", 0);
  __Pyx_TraceCall("try_split", __pyx_f[0], 1273, 0, __PYX_ERR(0, 1273, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1275
 *   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 != 0)) != 0);
  if (__pyx_t_1) {

    /* "apache_beam/runners/common.py":1276
 *     # 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":1275
 *   def try_split(self, fraction):
 *     # type: (...) -> Optional[Tuple[Iterable[SplitResultPrimary], Iterable[SplitResultResidual]]]
 *     if not self.is_splittable:             # <<<<<<<<<<<<<<
 *       return None
 * 
 */
  }

  /* "apache_beam/runners/common.py":1278
 *       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_n_s_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1278, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->splitting_lock, __pyx_n_s_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1278, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1278, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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":1279
 * 
 *     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, 1279, __pyx_L8_error)
          __pyx_t_9 = ((!__pyx_t_1) != 0);
          if (__pyx_t_9) {

            /* "apache_beam/runners/common.py":1280
 *     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":1279
 * 
 *     with self.splitting_lock:
 *       if not self.threadsafe_restriction_tracker:             # <<<<<<<<<<<<<<
 *         return None
 * 
 */
          }

          /* "apache_beam/runners/common.py":1285
 *       # 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_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker), __pyx_n_s_try_split_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1285, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_4);

          /* "apache_beam/runners/common.py":1292
 *           self.restriction,
 *           self.watermark_estimator_state,
 *           self.signature.get_restriction_provider(),             # <<<<<<<<<<<<<<
 *           self.threadsafe_restriction_tracker,
 *           self.threadsafe_watermark_estimator)
 */
          __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.signature), __pyx_n_s_get_restriction_provider); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1292, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_11 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
            __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
            if (likely(__pyx_t_11)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
              __Pyx_INCREF(__pyx_t_11);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_10, function);
            }
          }
          __pyx_t_5 = (__pyx_t_11) ? __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_11) : __Pyx_PyObject_CallNoArg(__pyx_t_10);
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1292, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

          /* "apache_beam/runners/common.py":1294
 *           self.signature.get_restriction_provider(),
 *           self.threadsafe_restriction_tracker,
 *           self.threadsafe_watermark_estimator)             # <<<<<<<<<<<<<<
 *       if not result:
 *         return None
 */
          __pyx_t_10 = NULL;
          __pyx_t_12 = 0;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
            __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4);
            if (likely(__pyx_t_10)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_10);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_4, function);
              __pyx_t_12 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_4)) {
            PyObject *__pyx_temp[10] = {__pyx_t_10, __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_5, __pyx_v_self->threadsafe_restriction_tracker, __pyx_v_self->threadsafe_watermark_estimator};
            __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_12, 9+__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1285, __pyx_L8_error)
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
            PyObject *__pyx_temp[10] = {__pyx_t_10, __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_5, __pyx_v_self->threadsafe_restriction_tracker, __pyx_v_self->threadsafe_watermark_estimator};
            __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_12, 9+__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1285, __pyx_L8_error)
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          } else
          #endif
          {
            __pyx_t_11 = PyTuple_New(9+__pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1285, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_11);
            if (__pyx_t_10) {
              __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL;
            }
            __Pyx_INCREF(__pyx_v_fraction);
            __Pyx_GIVEREF(__pyx_v_fraction);
            PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_12, __pyx_v_fraction);
            __Pyx_INCREF(__pyx_v_self->current_window_index);
            __Pyx_GIVEREF(__pyx_v_self->current_window_index);
            PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_12, __pyx_v_self->current_window_index);
            __Pyx_INCREF(__pyx_v_self->stop_window_index);
            __Pyx_GIVEREF(__pyx_v_self->stop_window_index);
            PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_12, __pyx_v_self->stop_window_index);
            __Pyx_INCREF(((PyObject *)__pyx_v_self->current_windowed_value));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_self->current_windowed_value));
            PyTuple_SET_ITEM(__pyx_t_11, 3+__pyx_t_12, ((PyObject *)__pyx_v_self->current_windowed_value));
            __Pyx_INCREF(__pyx_v_self->restriction);
            __Pyx_GIVEREF(__pyx_v_self->restriction);
            PyTuple_SET_ITEM(__pyx_t_11, 4+__pyx_t_12, __pyx_v_self->restriction);
            __Pyx_INCREF(__pyx_v_self->watermark_estimator_state);
            __Pyx_GIVEREF(__pyx_v_self->watermark_estimator_state);
            PyTuple_SET_ITEM(__pyx_t_11, 5+__pyx_t_12, __pyx_v_self->watermark_estimator_state);
            __Pyx_GIVEREF(__pyx_t_5);
            PyTuple_SET_ITEM(__pyx_t_11, 6+__pyx_t_12, __pyx_t_5);
            __Pyx_INCREF(__pyx_v_self->threadsafe_restriction_tracker);
            __Pyx_GIVEREF(__pyx_v_self->threadsafe_restriction_tracker);
            PyTuple_SET_ITEM(__pyx_t_11, 7+__pyx_t_12, __pyx_v_self->threadsafe_restriction_tracker);
            __Pyx_INCREF(__pyx_v_self->threadsafe_watermark_estimator);
            __Pyx_GIVEREF(__pyx_v_self->threadsafe_watermark_estimator);
            PyTuple_SET_ITEM(__pyx_t_11, 8+__pyx_t_12, __pyx_v_self->threadsafe_watermark_estimator);
            __pyx_t_5 = 0;
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1285, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          }
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_v_result = __pyx_t_3;
          __pyx_t_3 = 0;

          /* "apache_beam/runners/common.py":1295
 *           self.threadsafe_restriction_tracker,
 *           self.threadsafe_watermark_estimator)
 *       if not result:             # <<<<<<<<<<<<<<
 *         return None
 * 
 */
          __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1295, __pyx_L8_error)
          __pyx_t_1 = ((!__pyx_t_9) != 0);
          if (__pyx_t_1) {

            /* "apache_beam/runners/common.py":1296
 *           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":1295
 *           self.threadsafe_restriction_tracker,
 *           self.threadsafe_watermark_estimator)
 *       if not result:             # <<<<<<<<<<<<<<
 *         return None
 * 
 */
          }

          /* "apache_beam/runners/common.py":1298
 *         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, 1298, __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_t_4 = PyTuple_GET_ITEM(sequence, 1); 
              __pyx_t_11 = PyTuple_GET_ITEM(sequence, 2); 
            } else {
              __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
              __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
              __pyx_t_11 = PyList_GET_ITEM(sequence, 2); 
            }
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_11);
            #else
            __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1298, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1298, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_11 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1298, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_11);
            #endif
          } else {
            Py_ssize_t index = -1;
            __pyx_t_5 = PyObject_GetIter(__pyx_v_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1298, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_13 = Py_TYPE(__pyx_t_5)->tp_iternext;
            index = 0; __pyx_t_3 = __pyx_t_13(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L16_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_3);
            index = 1; __pyx_t_4 = __pyx_t_13(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L16_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_4);
            index = 2; __pyx_t_11 = __pyx_t_13(__pyx_t_5); if (unlikely(!__pyx_t_11)) goto __pyx_L16_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_11);
            if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_5), 3) < 0) __PYX_ERR(0, 1298, __pyx_L8_error)
            __pyx_t_13 = NULL;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            goto __pyx_L17_unpacking_done;
            __pyx_L16_unpacking_failed:;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __pyx_t_13 = NULL;
            if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
            __PYX_ERR(0, 1298, __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_11);
          __Pyx_GOTREF(__pyx_v_self->stop_window_index);
          __Pyx_DECREF(__pyx_v_self->stop_window_index);
          __pyx_v_self->stop_window_index = __pyx_t_11;
          __pyx_t_11 = 0;

          /* "apache_beam/runners/common.py":1299
 * 
 *       residuals, primaries, self.stop_window_index = result
 *       return (residuals, primaries)             # <<<<<<<<<<<<<<
 * 
 *   @staticmethod
 */
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1299, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_INCREF(__pyx_v_residuals);
          __Pyx_GIVEREF(__pyx_v_residuals);
          PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_residuals);
          __Pyx_INCREF(__pyx_v_primaries);
          __Pyx_GIVEREF(__pyx_v_primaries);
          PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_primaries);
          __pyx_r = __pyx_t_11;
          __pyx_t_11 = 0;
          goto __pyx_L12_try_return;

          /* "apache_beam/runners/common.py":1278
 *       return None
 * 
 *     with self.splitting_lock:             # <<<<<<<<<<<<<<
 *       if not self.threadsafe_restriction_tracker:
 *         return None
 */
        }
        __pyx_L8_error:;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 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_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_11, &__pyx_t_4, &__pyx_t_3) < 0) __PYX_ERR(0, 1278, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_5 = PyTuple_Pack(3, __pyx_t_11, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1278, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1278, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_14);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          if (__pyx_t_1 < 0) __PYX_ERR(0, 1278, __pyx_L10_except_error)
          __pyx_t_9 = ((!(__pyx_t_1 != 0)) != 0);
          if (__pyx_t_9) {
            __Pyx_GIVEREF(__pyx_t_11);
            __Pyx_GIVEREF(__pyx_t_4);
            __Pyx_XGIVEREF(__pyx_t_3);
            __Pyx_ErrRestoreWithState(__pyx_t_11, __pyx_t_4, __pyx_t_3);
            __pyx_t_11 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; 
            __PYX_ERR(0, 1278, __pyx_L10_except_error)
          }
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 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_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_L12_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_L5_return;
        __pyx_L9_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_2) {
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__59, NULL);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1278, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        goto __pyx_L7;
      }
      __pyx_L5_return: {
        __pyx_t_8 = __pyx_r;
        __pyx_r = 0;
        if (__pyx_t_2) {
          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__59, NULL);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1278, __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_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":1273
 *       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_10);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1302
 * 
 *   @staticmethod
 *   def _scale_progress(progress, window_index, stop_window_index):             # <<<<<<<<<<<<<<
 *     # We scale progress based upon the amount of work we will do for one
 *     # window and have it apply for all windows.
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_17_scale_progress(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_17_scale_progress = {"_scale_progress", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_17_scale_progress, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_17_scale_progress(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_progress = 0;
  PyObject *__pyx_v_window_index = 0;
  PyObject *__pyx_v_stop_window_index = 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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_progress,&__pyx_n_s_window_index,&__pyx_n_s_stop_window_index,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_progress)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_window_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_scale_progress", 1, 3, 3, 1); __PYX_ERR(0, 1302, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stop_window_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_scale_progress", 1, 3, 3, 2); __PYX_ERR(0, 1302, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_scale_progress") < 0)) __PYX_ERR(0, 1302, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_progress = values[0];
    __pyx_v_window_index = values[1];
    __pyx_v_stop_window_index = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_scale_progress", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1302, __pyx_L3_error)
  __pyx_L3_error:;
  __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 */
  __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_TraceDeclarations
  __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_TraceFrameInit(__pyx_codeobj__71)
  __Pyx_RefNannySetupContext("_scale_progress", 0);
  __Pyx_TraceCall("_scale_progress", __pyx_f[0], 1302, 0, __PYX_ERR(0, 1302, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1305
 *     # 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_n_s_total_work); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1305, __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, 1305, __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_n_s_completed_work); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1305, __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, 1305, __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":1308
 *     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_PyInt_AddObjC(__pyx_v_window_index, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "apache_beam/runners/common.py":1307
 *     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, 1307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "apache_beam/runners/common.py":1308
 *     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_n_s_total_work); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1308, __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, 1308, __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_n_s_remaining_work); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1308, __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, 1308, __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":1309
 *         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_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_RestrictionProgress);
  __Pyx_GIVEREF(__pyx_n_s_RestrictionProgress);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_RestrictionProgress);
  __pyx_t_3 = __Pyx_Import(__pyx_n_s_apache_beam_io_iobase, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_RestrictionProgress); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_RestrictionProgress = __pyx_t_1;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "apache_beam/runners/common.py":1310
 *         (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 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_completed, __pyx_v_completed) < 0) __PYX_ERR(0, 1310, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_remaining, __pyx_v_remaining) < 0) __PYX_ERR(0, 1310, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_RestrictionProgress, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1310, __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/common.py":1302
 * 
 *   @staticmethod
 *   def _scale_progress(progress, window_index, stop_window_index):             # <<<<<<<<<<<<<<
 *     # We scale progress based upon the amount of work we will do for one
 *     # window and have it apply for all windows.
 */

  /* 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.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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1312
 *     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, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_19current_element_progress = {"current_element_progress", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_19current_element_progress, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_19current_element_progress(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("current_element_progress (wrapper)", 0);
  __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_TraceDeclarations
  __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;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__72)
  __Pyx_RefNannySetupContext("current_element_progress", 0);
  __Pyx_TraceCall("current_element_progress", __pyx_f[0], 1312, 0, __PYX_ERR(0, 1312, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1314
 *   def current_element_progress(self):
 *     # type: () -> Optional[RestrictionProgress]
 *     if not self.is_splittable:             # <<<<<<<<<<<<<<
 *       return None
 * 
 */
  __pyx_t_1 = ((!(__pyx_v_self->is_splittable != 0)) != 0);
  if (__pyx_t_1) {

    /* "apache_beam/runners/common.py":1315
 *     # 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":1314
 *   def current_element_progress(self):
 *     # type: () -> Optional[RestrictionProgress]
 *     if not self.is_splittable:             # <<<<<<<<<<<<<<
 *       return None
 * 
 */
  }

  /* "apache_beam/runners/common.py":1317
 *       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_n_s_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1317, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->splitting_lock, __pyx_n_s_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1317, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1317, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    /*try:*/ {
      {
        (void)__pyx_t_6; (void)__pyx_t_7; (void)__pyx_t_8; /* mark used */
        /*try:*/ {

          /* "apache_beam/runners/common.py":1318
 * 
 *     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":1319
 *     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":1320
 *       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":1317
 *       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_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__59, NULL);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1317, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 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":1322
 *       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, 1322, __pyx_L1_error) }
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_threadsafe_restriction_tracker); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1322, __pyx_L1_error)
  __pyx_t_9 = ((!__pyx_t_1) != 0);
  if (__pyx_t_9) {

    /* "apache_beam/runners/common.py":1323
 * 
 *     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":1322
 *       threadsafe_restriction_tracker = self.threadsafe_restriction_tracker
 * 
 *     if not threadsafe_restriction_tracker:             # <<<<<<<<<<<<<<
 *       return None
 * 
 */
  }

  /* "apache_beam/runners/common.py":1325
 *       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, 1325, __pyx_L1_error) }
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_threadsafe_restriction_tracker, __pyx_n_s_current_progress); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_progress = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "apache_beam/runners/common.py":1326
 * 
 *     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, 1326, __pyx_L1_error) }
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_current_window_index); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1326, __pyx_L1_error)
  __pyx_t_10 = ((!__pyx_t_1) != 0);
  if (!__pyx_t_10) {
  } else {
    __pyx_t_9 = __pyx_t_10;
    goto __pyx_L17_bool_binop_done;
  }
  __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_progress); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1326, __pyx_L1_error)
  __pyx_t_1 = ((!__pyx_t_10) != 0);
  __pyx_t_9 = __pyx_t_1;
  __pyx_L17_bool_binop_done:;
  if (__pyx_t_9) {

    /* "apache_beam/runners/common.py":1327
 *     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":1326
 * 
 *     progress = threadsafe_restriction_tracker.current_progress()
 *     if not current_window_index or not progress:             # <<<<<<<<<<<<<<
 *       return progress
 * 
 */
  }

  /* "apache_beam/runners/common.py":1331
 *     # 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, 1331, __pyx_L1_error) }
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_stop_window_index); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1331, __pyx_L1_error)
    if (unlikely(!__pyx_t_9)) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 1331, __pyx_L1_error)
    }
  }
  #endif

  /* "apache_beam/runners/common.py":1332
 *     # 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_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker), __pyx_n_s_scale_progress); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "apache_beam/runners/common.py":1333
 *     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, 1333, __pyx_L1_error) }
  if (unlikely(!__pyx_v_stop_window_index)) { __Pyx_RaiseUnboundLocalError("stop_window_index"); __PYX_ERR(0, 1333, __pyx_L1_error) }
  __pyx_t_5 = NULL;
  __pyx_t_11 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_11 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_progress, __pyx_v_current_window_index, __pyx_v_stop_window_index};
    __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1332, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_progress, __pyx_v_current_window_index, __pyx_v_stop_window_index};
    __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1332, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else
  #endif
  {
    __pyx_t_12 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1332, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_INCREF(__pyx_v_progress);
    __Pyx_GIVEREF(__pyx_v_progress);
    PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_v_progress);
    __Pyx_INCREF(__pyx_v_current_window_index);
    __Pyx_GIVEREF(__pyx_v_current_window_index);
    PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_v_current_window_index);
    __Pyx_INCREF(__pyx_v_stop_window_index);
    __Pyx_GIVEREF(__pyx_v_stop_window_index);
    PyTuple_SET_ITEM(__pyx_t_12, 2+__pyx_t_11, __pyx_v_stop_window_index);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_12, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1332, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "apache_beam/runners/common.py":1312
 *     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_XDECREF(__pyx_t_12);
  __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_TraceReturn(__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_16PerWindowInvoker_21__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_21__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_21__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_21__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __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_TraceDeclarations
  __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_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__73)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self.args_for_process, self.args_for_process_batch, self.bundle_finalizer_param, self.cache_globally_windowed_args, self.context, self.current_window_index, self.current_windowed_value, 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.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:
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->cache_globally_windowed_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_windowed_inputs); 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->is_key_param_required); 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_splittable); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(26); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_self->args_for_process);
  __Pyx_GIVEREF(__pyx_v_self->args_for_process);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_self->args_for_process);
  __Pyx_INCREF(__pyx_v_self->args_for_process_batch);
  __Pyx_GIVEREF(__pyx_v_self->args_for_process_batch);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_self->args_for_process_batch);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.bundle_finalizer_param);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.bundle_finalizer_param);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_self->__pyx_base.bundle_finalizer_param);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->context));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->context));
  PyTuple_SET_ITEM(__pyx_t_5, 4, ((PyObject *)__pyx_v_self->context));
  __Pyx_INCREF(__pyx_v_self->current_window_index);
  __Pyx_GIVEREF(__pyx_v_self->current_window_index);
  PyTuple_SET_ITEM(__pyx_t_5, 5, __pyx_v_self->current_window_index);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->current_windowed_value));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->current_windowed_value));
  PyTuple_SET_ITEM(__pyx_t_5, 6, ((PyObject *)__pyx_v_self->current_windowed_value));
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 7, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 8, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 9, __pyx_t_4);
  __Pyx_INCREF(__pyx_v_self->kwargs_for_process);
  __Pyx_GIVEREF(__pyx_v_self->kwargs_for_process);
  PyTuple_SET_ITEM(__pyx_t_5, 10, __pyx_v_self->kwargs_for_process);
  __Pyx_INCREF(__pyx_v_self->kwargs_for_process_batch);
  __Pyx_GIVEREF(__pyx_v_self->kwargs_for_process_batch);
  PyTuple_SET_ITEM(__pyx_t_5, 11, __pyx_v_self->kwargs_for_process_batch);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.output_handler));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.output_handler));
  PyTuple_SET_ITEM(__pyx_t_5, 12, ((PyObject *)__pyx_v_self->__pyx_base.output_handler));
  __Pyx_INCREF(__pyx_v_self->placeholders_for_process);
  __Pyx_GIVEREF(__pyx_v_self->placeholders_for_process);
  PyTuple_SET_ITEM(__pyx_t_5, 13, __pyx_v_self->placeholders_for_process);
  __Pyx_INCREF(__pyx_v_self->placeholders_for_process_batch);
  __Pyx_GIVEREF(__pyx_v_self->placeholders_for_process_batch);
  PyTuple_SET_ITEM(__pyx_t_5, 14, __pyx_v_self->placeholders_for_process_batch);
  __Pyx_INCREF(__pyx_v_self->process_batch_method);
  __Pyx_GIVEREF(__pyx_v_self->process_batch_method);
  PyTuple_SET_ITEM(__pyx_t_5, 15, __pyx_v_self->process_batch_method);
  __Pyx_INCREF(__pyx_v_self->process_method);
  __Pyx_GIVEREF(__pyx_v_self->process_method);
  PyTuple_SET_ITEM(__pyx_t_5, 16, __pyx_v_self->process_method);
  __Pyx_INCREF(__pyx_v_self->restriction);
  __Pyx_GIVEREF(__pyx_v_self->restriction);
  PyTuple_SET_ITEM(__pyx_t_5, 17, __pyx_v_self->restriction);
  __Pyx_INCREF(__pyx_v_self->side_inputs);
  __Pyx_GIVEREF(__pyx_v_self->side_inputs);
  PyTuple_SET_ITEM(__pyx_t_5, 18, __pyx_v_self->side_inputs);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.signature));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.signature));
  PyTuple_SET_ITEM(__pyx_t_5, 19, ((PyObject *)__pyx_v_self->__pyx_base.signature));
  __Pyx_INCREF(__pyx_v_self->splitting_lock);
  __Pyx_GIVEREF(__pyx_v_self->splitting_lock);
  PyTuple_SET_ITEM(__pyx_t_5, 20, __pyx_v_self->splitting_lock);
  __Pyx_INCREF(__pyx_v_self->stop_window_index);
  __Pyx_GIVEREF(__pyx_v_self->stop_window_index);
  PyTuple_SET_ITEM(__pyx_t_5, 21, __pyx_v_self->stop_window_index);
  __Pyx_INCREF(__pyx_v_self->threadsafe_restriction_tracker);
  __Pyx_GIVEREF(__pyx_v_self->threadsafe_restriction_tracker);
  PyTuple_SET_ITEM(__pyx_t_5, 22, __pyx_v_self->threadsafe_restriction_tracker);
  __Pyx_INCREF(__pyx_v_self->threadsafe_watermark_estimator);
  __Pyx_GIVEREF(__pyx_v_self->threadsafe_watermark_estimator);
  PyTuple_SET_ITEM(__pyx_t_5, 23, __pyx_v_self->threadsafe_watermark_estimator);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.user_state_context);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.user_state_context);
  PyTuple_SET_ITEM(__pyx_t_5, 24, __pyx_v_self->__pyx_base.user_state_context);
  __Pyx_INCREF(__pyx_v_self->watermark_estimator_state);
  __Pyx_GIVEREF(__pyx_v_self->watermark_estimator_state);
  PyTuple_SET_ITEM(__pyx_t_5, 25, __pyx_v_self->watermark_estimator_state);
  __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.args_for_process, self.args_for_process_batch, self.bundle_finalizer_param, self.cache_globally_windowed_args, self.context, self.current_window_index, self.current_windowed_value, 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.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:
 *         state += (_dict,)
 */
  __pyx_t_5 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v__dict = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "(tree fragment)":7
 *     state = (self.args_for_process, self.args_for_process_batch, self.bundle_finalizer_param, self.cache_globally_windowed_args, self.context, self.current_window_index, self.current_windowed_value, 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.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:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_6 = (__pyx_v__dict != Py_None);
  __pyx_t_7 = (__pyx_t_6 != 0);
  if (__pyx_t_7) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = 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.args_for_process, self.args_for_process_batch, self.bundle_finalizer_param, self.cache_globally_windowed_args, self.context, self.current_window_index, self.current_windowed_value, 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.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:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = 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), 0xb7d4fae, None), state
 */
  /*else*/ {
    __pyx_t_6 = (__pyx_v_self->args_for_process != ((PyObject*)Py_None));
    __pyx_t_8 = (__pyx_t_6 != 0);
    if (!__pyx_t_8) {
    } else {
      __pyx_t_7 = __pyx_t_8;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_8 = (__pyx_v_self->args_for_process_batch != ((PyObject*)Py_None));
    __pyx_t_6 = (__pyx_t_8 != 0);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_7 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (__pyx_v_self->__pyx_base.bundle_finalizer_param != Py_None);
    __pyx_t_8 = (__pyx_t_6 != 0);
    if (!__pyx_t_8) {
    } else {
      __pyx_t_7 = __pyx_t_8;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_8 = (((PyObject *)__pyx_v_self->context) != Py_None);
    __pyx_t_6 = (__pyx_t_8 != 0);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_7 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (__pyx_v_self->current_window_index != Py_None);
    __pyx_t_8 = (__pyx_t_6 != 0);
    if (!__pyx_t_8) {
    } else {
      __pyx_t_7 = __pyx_t_8;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_8 = (((PyObject *)__pyx_v_self->current_windowed_value) != Py_None);
    __pyx_t_6 = (__pyx_t_8 != 0);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_7 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (__pyx_v_self->kwargs_for_process != ((PyObject*)Py_None));
    __pyx_t_8 = (__pyx_t_6 != 0);
    if (!__pyx_t_8) {
    } else {
      __pyx_t_7 = __pyx_t_8;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_8 = (__pyx_v_self->kwargs_for_process_batch != ((PyObject*)Py_None));
    __pyx_t_6 = (__pyx_t_8 != 0);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_7 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (((PyObject *)__pyx_v_self->__pyx_base.output_handler) != Py_None);
    __pyx_t_8 = (__pyx_t_6 != 0);
    if (!__pyx_t_8) {
    } else {
      __pyx_t_7 = __pyx_t_8;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_8 = (__pyx_v_self->placeholders_for_process != ((PyObject*)Py_None));
    __pyx_t_6 = (__pyx_t_8 != 0);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_7 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (__pyx_v_self->placeholders_for_process_batch != ((PyObject*)Py_None));
    __pyx_t_8 = (__pyx_t_6 != 0);
    if (!__pyx_t_8) {
    } else {
      __pyx_t_7 = __pyx_t_8;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_8 = (__pyx_v_self->process_batch_method != Py_None);
    __pyx_t_6 = (__pyx_t_8 != 0);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_7 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (__pyx_v_self->process_method != Py_None);
    __pyx_t_8 = (__pyx_t_6 != 0);
    if (!__pyx_t_8) {
    } else {
      __pyx_t_7 = __pyx_t_8;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_8 = (__pyx_v_self->restriction != Py_None);
    __pyx_t_6 = (__pyx_t_8 != 0);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_7 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (__pyx_v_self->side_inputs != ((PyObject*)Py_None));
    __pyx_t_8 = (__pyx_t_6 != 0);
    if (!__pyx_t_8) {
    } else {
      __pyx_t_7 = __pyx_t_8;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_8 = (((PyObject *)__pyx_v_self->__pyx_base.signature) != Py_None);
    __pyx_t_6 = (__pyx_t_8 != 0);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_7 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (__pyx_v_self->splitting_lock != Py_None);
    __pyx_t_8 = (__pyx_t_6 != 0);
    if (!__pyx_t_8) {
    } else {
      __pyx_t_7 = __pyx_t_8;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_8 = (__pyx_v_self->stop_window_index != Py_None);
    __pyx_t_6 = (__pyx_t_8 != 0);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_7 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (__pyx_v_self->threadsafe_restriction_tracker != Py_None);
    __pyx_t_8 = (__pyx_t_6 != 0);
    if (!__pyx_t_8) {
    } else {
      __pyx_t_7 = __pyx_t_8;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_8 = (__pyx_v_self->threadsafe_watermark_estimator != Py_None);
    __pyx_t_6 = (__pyx_t_8 != 0);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_7 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (__pyx_v_self->__pyx_base.user_state_context != Py_None);
    __pyx_t_8 = (__pyx_t_6 != 0);
    if (!__pyx_t_8) {
    } else {
      __pyx_t_7 = __pyx_t_8;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_8 = (__pyx_v_self->watermark_estimator_state != Py_None);
    __pyx_t_6 = (__pyx_t_8 != 0);
    __pyx_t_7 = __pyx_t_6;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_7;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = 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), 0xb7d4fae, None), state
 *     else:
 */
  __pyx_t_7 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_7) {

    /* "(tree fragment)":13
 *         use_setstate = 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), 0xb7d4fae, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_PerWindowInvoker, (type(self), 0xb7d4fae, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_PerWindowInvoker); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 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))));
    PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_192761774);
    __Pyx_GIVEREF(__pyx_int_192761774);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_192761774);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_5, 2, Py_None);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state);
    __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 = 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), 0xb7d4fae, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_PerWindowInvoker, (type(self), 0xb7d4fae, None), state
 *     else:
 *         return __pyx_unpickle_PerWindowInvoker, (type(self), 0xb7d4fae, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_PerWindowInvoker__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_PerWindowInvoker); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 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))));
    PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_192761774);
    __Pyx_GIVEREF(__pyx_int_192761774);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_192761774);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __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_3);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5);
    __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.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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_PerWindowInvoker, (type(self), 0xb7d4fae, 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, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_23__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_23__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_23__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __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));

  /* function exit code */
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__74)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 16, 0, __PYX_ERR(1, 16, __pyx_L1_error));

  /* "(tree fragment)":17
 *         return __pyx_unpickle_PerWindowInvoker, (type(self), 0xb7d4fae, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_PerWindowInvoker__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6common___pyx_unpickle_PerWindowInvoker__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_PerWindowInvoker, (type(self), 0xb7d4fae, 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_AddTraceback("apache_beam.runners.common.PerWindowInvoker.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1342
 *   """
 * 
 *   def __init__(self,             # <<<<<<<<<<<<<<
 *                fn,  # type: core.DoFn
 *                args,
 */

/* Python wrapper */
static int __pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fn,&__pyx_n_s_args,&__pyx_n_s_kwargs,&__pyx_n_s_side_inputs,&__pyx_n_s_windowing,&__pyx_n_s_tagged_receivers,&__pyx_n_s_step_name,&__pyx_n_s_logging_context,&__pyx_n_s_state,&__pyx_n_s_scoped_metrics_container,&__pyx_n_s_operation_name,&__pyx_n_s_transform_id,&__pyx_n_s_user_state_context,0};
    PyObject* values[13] = {0,0,0,0,0,0,0,0,0,0,0,0,0};

    /* "apache_beam/runners/common.py":1349
 *                windowing,
 *                tagged_receivers,  # type: Mapping[Optional[str], Receiver]
 *                step_name=None,  # type: Optional[str]             # <<<<<<<<<<<<<<
 *                logging_context=None,
 *                state=None,
 */
    values[6] = ((PyObject *)Py_None);

    /* "apache_beam/runners/common.py":1350
 *                tagged_receivers,  # type: Mapping[Optional[str], Receiver]
 *                step_name=None,  # type: Optional[str]
 *                logging_context=None,             # <<<<<<<<<<<<<<
 *                state=None,
 *                scoped_metrics_container=None,
 */
    values[7] = ((PyObject *)Py_None);

    /* "apache_beam/runners/common.py":1351
 *                step_name=None,  # type: Optional[str]
 *                logging_context=None,
 *                state=None,             # <<<<<<<<<<<<<<
 *                scoped_metrics_container=None,
 *                operation_name=None,
 */
    values[8] = ((PyObject *)Py_None);

    /* "apache_beam/runners/common.py":1352
 *                logging_context=None,
 *                state=None,
 *                scoped_metrics_container=None,             # <<<<<<<<<<<<<<
 *                operation_name=None,
 *                transform_id=None,
 */
    values[9] = ((PyObject *)Py_None);

    /* "apache_beam/runners/common.py":1353
 *                state=None,
 *                scoped_metrics_container=None,
 *                operation_name=None,             # <<<<<<<<<<<<<<
 *                transform_id=None,
 *                user_state_context=None,  # type: Optional[userstate.UserStateContext]
 */
    values[10] = ((PyObject *)Py_None);

    /* "apache_beam/runners/common.py":1354
 *                scoped_metrics_container=None,
 *                operation_name=None,
 *                transform_id=None,             # <<<<<<<<<<<<<<
 *                user_state_context=None,  # type: Optional[userstate.UserStateContext]
 *               ):
 */
    values[11] = ((PyObject *)Py_None);

    /* "apache_beam/runners/common.py":1355
 *                operation_name=None,
 *                transform_id=None,
 *                user_state_context=None,  # type: Optional[userstate.UserStateContext]             # <<<<<<<<<<<<<<
 *               ):
 *     """Initializes a DoFnRunner.
 */
    values[12] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
        CYTHON_FALLTHROUGH;
        case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
        CYTHON_FALLTHROUGH;
        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        CYTHON_FALLTHROUGH;
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fn)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 6, 13, 1); __PYX_ERR(0, 1342, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 6, 13, 2); __PYX_ERR(0, 1342, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_side_inputs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 6, 13, 3); __PYX_ERR(0, 1342, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_windowing)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 6, 13, 4); __PYX_ERR(0, 1342, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tagged_receivers)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 6, 13, 5); __PYX_ERR(0, 1342, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_step_name);
          if (value) { values[6] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_logging_context);
          if (value) { values[7] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  8:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_state);
          if (value) { values[8] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  9:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_scoped_metrics_container);
          if (value) { values[9] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 10:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_operation_name);
          if (value) { values[10] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 11:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_transform_id);
          if (value) { values[11] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 12:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_user_state_context);
          if (value) { values[12] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1342, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
        CYTHON_FALLTHROUGH;
        case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
        CYTHON_FALLTHROUGH;
        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        CYTHON_FALLTHROUGH;
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __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_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 6, 13, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1342, __pyx_L3_error)
  __pyx_L3_error:;
  __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":1342
 *   """
 * 
 *   def __init__(self,             # <<<<<<<<<<<<<<
 *                fn,  # type: core.DoFn
 *                args,
 */

  /* function exit code */
  __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_TraceDeclarations
  __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;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 1342, 0, __PYX_ERR(0, 1342, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_side_inputs);

  /* "apache_beam/runners/common.py":1376
 *     """
 *     # 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, 1376, __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":1378
 *     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":1379
 * 
 *     self.step_name = step_name
 *     self.transform_id = transform_id             # <<<<<<<<<<<<<<
 *     self.context = DoFnContext(step_name, state=state)
 *     self.bundle_finalizer_param = DoFn.BundleFinalizerParam()
 */
  if (!(likely(PyString_CheckExact(__pyx_v_transform_id))||((__pyx_v_transform_id) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_transform_id)->tp_name), 0))) __PYX_ERR(0, 1379, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_transform_id;
  __Pyx_INCREF(__pyx_t_1);
  __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":1380
 *     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_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_step_name);
  __Pyx_GIVEREF(__pyx_v_step_name);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_step_name);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_state, __pyx_v_state) < 0) __PYX_ERR(0, 1380, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnContext), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1380, __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_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__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_3);
  __pyx_t_3 = 0;

  /* "apache_beam/runners/common.py":1381
 *     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_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_BundleFinalizerParam); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  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_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->bundle_finalizer_param);
  __Pyx_DECREF(__pyx_v_self->bundle_finalizer_param);
  __pyx_v_self->bundle_finalizer_param = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "apache_beam/runners/common.py":1382
 *     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":1384
 *     self.execution_context = None  # type: Optional[ExecutionContext]
 * 
 *     do_fn_signature = DoFnSignature(fn)             # <<<<<<<<<<<<<<
 * 
 *     # Optimize for the common case.
 */
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature), __pyx_v_fn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_do_fn_signature = ((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "apache_beam/runners/common.py":1387
 * 
 *     # Optimize for the common case.
 *     main_receivers = tagged_receivers[None]             # <<<<<<<<<<<<<<
 * 
 *     # TODO(https://github.com/apache/beam/issues/18886): Remove if block after
 */
  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_tagged_receivers, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_main_receivers = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "apache_beam/runners/common.py":1391
 *     # 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_3, __pyx_n_s_RuntimeValueProvider); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_experiments); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_outputs_per_element_counter, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1391, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {

    /* "apache_beam/runners/common.py":1394
 *       # 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_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CounterName); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_step_name, __pyx_v_operation_name) < 0) __PYX_ERR(0, 1394, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__75, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1394, __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_v_output_counter_name = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "apache_beam/runners/common.py":1395
 *       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_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_n_s_counter_factory); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1395, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1395, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "apache_beam/runners/common.py":1396
 *           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_3, __pyx_n_s_Counter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DATAFLOW_DISTRIBUTION); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_7 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_output_counter_name, __pyx_t_6};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1395, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_output_counter_name, __pyx_t_6};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1395, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1395, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_3) {
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __pyx_t_3 = NULL;
      }
      __Pyx_INCREF(__pyx_v_output_counter_name);
      __Pyx_GIVEREF(__pyx_v_output_counter_name);
      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_output_counter_name);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1395, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_accumulator); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_per_element_output_counter = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "apache_beam/runners/common.py":1391
 *     # 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":1398
 *           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":1401
 * 
 *     output_handler = _OutputHandler(
 *         windowing.windowfn,             # <<<<<<<<<<<<<<
 *         main_receivers,
 *         tagged_receivers,
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowing, __pyx_n_s_windowfn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "apache_beam/runners/common.py":1405
 *         tagged_receivers,
 *         per_element_output_counter,
 *         getattr(fn, 'output_batch_converter', None),             # <<<<<<<<<<<<<<
 *         getattr(
 *             do_fn_signature.process_method.method_value,
 */
  __pyx_t_2 = __Pyx_GetAttr3(__pyx_v_fn, __pyx_n_u_output_batch_converter, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "apache_beam/runners/common.py":1407
 *         getattr(fn, 'output_batch_converter', None),
 *         getattr(
 *             do_fn_signature.process_method.method_value,             # <<<<<<<<<<<<<<
 *             '_beam_yields_batches',
 *             False),
 */
  __pyx_t_8 = __pyx_v_do_fn_signature->process_method->method_value;
  __Pyx_INCREF(__pyx_t_8);

  /* "apache_beam/runners/common.py":1406
 *         per_element_output_counter,
 *         getattr(fn, 'output_batch_converter', None),
 *         getattr(             # <<<<<<<<<<<<<<
 *             do_fn_signature.process_method.method_value,
 *             '_beam_yields_batches',
 */
  __pyx_t_6 = __Pyx_GetAttr3(__pyx_t_8, __pyx_n_u_beam_yields_batches, Py_False); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "apache_beam/runners/common.py":1411
 *             False),
 *         getattr(
 *             do_fn_signature.process_batch_method.method_value,             # <<<<<<<<<<<<<<
 *             '_beam_yields_elements',
 *             False),
 */
  __pyx_t_8 = __pyx_v_do_fn_signature->process_batch_method->method_value;
  __Pyx_INCREF(__pyx_t_8);

  /* "apache_beam/runners/common.py":1410
 *             '_beam_yields_batches',
 *             False),
 *         getattr(             # <<<<<<<<<<<<<<
 *             do_fn_signature.process_batch_method.method_value,
 *             '_beam_yields_elements',
 */
  __pyx_t_3 = __Pyx_GetAttr3(__pyx_t_8, __pyx_n_u_beam_yields_elements, Py_False); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "apache_beam/runners/common.py":1400
 *       per_element_output_counter = None
 * 
 *     output_handler = _OutputHandler(             # <<<<<<<<<<<<<<
 *         windowing.windowfn,
 *         main_receivers,
 */
  __pyx_t_8 = PyTuple_New(7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_main_receivers);
  __Pyx_GIVEREF(__pyx_v_main_receivers);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_main_receivers);
  __Pyx_INCREF(__pyx_v_tagged_receivers);
  __Pyx_GIVEREF(__pyx_v_tagged_receivers);
  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_tagged_receivers);
  __Pyx_INCREF(__pyx_v_per_element_output_counter);
  __Pyx_GIVEREF(__pyx_v_per_element_output_counter);
  PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_v_per_element_output_counter);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_8, 5, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_8, 6, __pyx_t_3);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_6 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_7runners_6common__OutputHandler), __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_v_output_handler = ((struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "apache_beam/runners/common.py":1416
 *     )
 * 
 *     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_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_do_fn_signature), __pyx_n_s_is_stateful_dofn); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1416, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {
  } else {
    __pyx_t_5 = __pyx_t_4;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_user_state_context); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1416, __pyx_L1_error)
  __pyx_t_9 = ((!__pyx_t_4) != 0);
  __pyx_t_5 = __pyx_t_9;
  __pyx_L5_bool_binop_done:;
  if (unlikely(__pyx_t_5)) {

    /* "apache_beam/runners/common.py":1417
 * 
 *     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_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__76, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1417, __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, 1417, __pyx_L1_error)

    /* "apache_beam/runners/common.py":1416
 *     )
 * 
 *     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":1422
 *           'support the execution of stateful DoFns.')
 * 
 *     self.do_fn_invoker = DoFnInvoker.create_invoker(             # <<<<<<<<<<<<<<
 *         do_fn_signature,
 *         output_handler,
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker), __pyx_n_s_create_invoker); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "apache_beam/runners/common.py":1428
 *         side_inputs,
 *         args,
 *         kwargs,             # <<<<<<<<<<<<<<
 *         user_state_context=user_state_context,
 *         bundle_finalizer_param=self.bundle_finalizer_param)
 */
  __pyx_t_8 = PyTuple_New(6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_INCREF(((PyObject *)__pyx_v_do_fn_signature));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_do_fn_signature));
  PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v_do_fn_signature));
  __Pyx_INCREF(((PyObject *)__pyx_v_output_handler));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_output_handler));
  PyTuple_SET_ITEM(__pyx_t_8, 1, ((PyObject *)__pyx_v_output_handler));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->context));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->context));
  PyTuple_SET_ITEM(__pyx_t_8, 2, ((PyObject *)__pyx_v_self->context));
  __Pyx_INCREF(__pyx_v_side_inputs);
  __Pyx_GIVEREF(__pyx_v_side_inputs);
  PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_v_side_inputs);
  __Pyx_INCREF(__pyx_v_args);
  __Pyx_GIVEREF(__pyx_v_args);
  PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_v_args);
  __Pyx_INCREF(__pyx_v_kwargs);
  __Pyx_GIVEREF(__pyx_v_kwargs);
  PyTuple_SET_ITEM(__pyx_t_8, 5, __pyx_v_kwargs);

  /* "apache_beam/runners/common.py":1429
 *         args,
 *         kwargs,
 *         user_state_context=user_state_context,             # <<<<<<<<<<<<<<
 *         bundle_finalizer_param=self.bundle_finalizer_param)
 * 
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_user_state_context, __pyx_v_user_state_context) < 0) __PYX_ERR(0, 1429, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1430
 *         kwargs,
 *         user_state_context=user_state_context,
 *         bundle_finalizer_param=self.bundle_finalizer_param)             # <<<<<<<<<<<<<<
 * 
 *   def process(self, windowed_value):
 */
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_bundle_finalizer_param, __pyx_v_self->bundle_finalizer_param) < 0) __PYX_ERR(0, 1429, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1422
 *           'support the execution of stateful DoFns.')
 * 
 *     self.do_fn_invoker = DoFnInvoker.create_invoker(             # <<<<<<<<<<<<<<
 *         do_fn_signature,
 *         output_handler,
 */
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__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;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker))))) __PYX_ERR(0, 1422, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__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":1342
 *   """
 * 
 *   def __init__(self,             # <<<<<<<<<<<<<<
 *                fn,  # type: core.DoFn
 *                args,
 */

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_8);
  __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_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1432
 *         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, PyObject *__pyx_v_windowed_value); /*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_TraceDeclarations
  __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;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  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_TraceFrameInit(__pyx_codeobj__77)
  __Pyx_RefNannySetupContext("process", 0);
  __Pyx_TraceCall("process", __pyx_f[0], 1432, 0, __PYX_ERR(0, 1432, __pyx_L1_error));
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_process); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1432, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_3process)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_windowed_value)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_windowed_value));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1432, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __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_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_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":1434
 *   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_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":1435
 *     # 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, 1435, __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":1434
 *   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":1436
 *     try:
 *       return self.do_fn_invoker.invoke_process(windowed_value)
 *     except BaseException as exn:             # <<<<<<<<<<<<<<
 *       self._reraise_augmented(exn, windowed_value)
 *       return []
 */
    __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException);
    if (__pyx_t_8) {
      __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_3) < 0) __PYX_ERR(0, 1436, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_v_exn = __pyx_t_2;
      /*try:*/ {

        /* "apache_beam/runners/common.py":1437
 *       return self.do_fn_invoker.invoke_process(windowed_value)
 *     except BaseException as exn:
 *       self._reraise_augmented(exn, windowed_value)             # <<<<<<<<<<<<<<
 *       return []
 * 
 */
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reraise_augmented); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1437, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_10 = NULL;
        __pyx_t_8 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_10)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
            __pyx_t_8 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_9)) {
          PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_exn, ((PyObject *)__pyx_v_windowed_value)};
          __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1437, __pyx_L14_error)
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_GOTREF(__pyx_t_4);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
          PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_exn, ((PyObject *)__pyx_v_windowed_value)};
          __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1437, __pyx_L14_error)
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_GOTREF(__pyx_t_4);
        } else
        #endif
        {
          __pyx_t_11 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1437, __pyx_L14_error)
          __Pyx_GOTREF(__pyx_t_11);
          if (__pyx_t_10) {
            __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL;
          }
          __Pyx_INCREF(__pyx_v_exn);
          __Pyx_GIVEREF(__pyx_v_exn);
          PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_8, __pyx_v_exn);
          __Pyx_INCREF(((PyObject *)__pyx_v_windowed_value));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_windowed_value));
          PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_8, ((PyObject *)__pyx_v_windowed_value));
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1437, __pyx_L14_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        }
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "apache_beam/runners/common.py":1438
 *     except BaseException as exn:
 *       self._reraise_augmented(exn, windowed_value)
 *       return []             # <<<<<<<<<<<<<<
 * 
 *   def _maybe_sample_exception(
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1438, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_r = __pyx_t_4;
        __pyx_t_4 = 0;
        __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;
        goto __pyx_L13_return;
      }

      /* "apache_beam/runners/common.py":1436
 *     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_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_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
          if ((PY_MAJOR_VERSION < 3) || 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_8 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_exn);
            __pyx_v_exn = NULL;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __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_8; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13;
          goto __pyx_L5_except_error;
        }
        __pyx_L13_return: {
          __pyx_t_19 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_exn);
          __pyx_v_exn = NULL;
          __pyx_r = __pyx_t_19;
          __pyx_t_19 = 0;
          goto __pyx_L6_except_return;
        }
      }
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "apache_beam/runners/common.py":1434
 *   def process(self, windowed_value):
 *     # type: (WindowedValue) -> Iterable[SplitResultResidual]
 *     try:             # <<<<<<<<<<<<<<
 *       return self.do_fn_invoker.invoke_process(windowed_value)
 *     except BaseException as exn:
 */
    __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_try_return:;
    __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_L0;
    __pyx_L6_except_return:;
    __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_L0;
  }

  /* "apache_beam/runners/common.py":1432
 *         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_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_3process(PyObject *__pyx_v_self, PyObject *__pyx_v_windowed_value); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_3process = {"process", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_3process, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_3process(PyObject *__pyx_v_self, PyObject *__pyx_v_windowed_value) {
  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 (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_windowed_value), __pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, 1, "windowed_value", 0))) __PYX_ERR(0, 1432, __pyx_L1_error)
  __pyx_r = __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));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__77)
  __Pyx_RefNannySetupContext("process", 0);
  __Pyx_TraceCall("process (wrapper)", __pyx_f[0], 1432, 0, __PYX_ERR(0, 1432, __pyx_L1_error));
  __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, 1432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1440
 *       return []
 * 
 *   def _maybe_sample_exception(             # <<<<<<<<<<<<<<
 *       self, exn: BaseException,
 *       windowed_value: Optional[WindowedValue]) -> None:
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_5_maybe_sample_exception(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_5_maybe_sample_exception = {"_maybe_sample_exception", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_5_maybe_sample_exception, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_5_maybe_sample_exception(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_exn = 0;
  PyObject *__pyx_v_windowed_value = 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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exn,&__pyx_n_s_windowed_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exn)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_windowed_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_maybe_sample_exception", 1, 2, 2, 1); __PYX_ERR(0, 1440, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_maybe_sample_exception") < 0)) __PYX_ERR(0, 1440, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_exn = values[0];
    __pyx_v_windowed_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_maybe_sample_exception", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1440, __pyx_L3_error)
  __pyx_L3_error:;
  __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:;
  __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_exn, __pyx_v_windowed_value);

  /* function exit code */
  __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_exn, PyObject *__pyx_v_windowed_value) {
  PyObject *__pyx_v_output_sampler = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__78)
  __Pyx_RefNannySetupContext("_maybe_sample_exception", 0);
  __Pyx_TraceCall("_maybe_sample_exception", __pyx_f[0], 1440, 0, __PYX_ERR(0, 1440, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1444
 *       windowed_value: Optional[WindowedValue]) -> None:
 * 
 *     if self.execution_context is None:             # <<<<<<<<<<<<<<
 *       return
 * 
 */
  __pyx_t_1 = (__pyx_v_self->execution_context == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "apache_beam/runners/common.py":1445
 * 
 *     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":1444
 *       windowed_value: Optional[WindowedValue]) -> None:
 * 
 *     if self.execution_context is None:             # <<<<<<<<<<<<<<
 *       return
 * 
 */
  }

  /* "apache_beam/runners/common.py":1447
 *       return
 * 
 *     output_sampler = self.execution_context.output_sampler             # <<<<<<<<<<<<<<
 *     if output_sampler is None:
 *       return
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->execution_context, __pyx_n_s_output_sampler); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_output_sampler = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "apache_beam/runners/common.py":1448
 * 
 *     output_sampler = self.execution_context.output_sampler
 *     if output_sampler is None:             # <<<<<<<<<<<<<<
 *       return
 * 
 */
  __pyx_t_2 = (__pyx_v_output_sampler == Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "apache_beam/runners/common.py":1449
 *     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":1448
 * 
 *     output_sampler = self.execution_context.output_sampler
 *     if output_sampler is None:             # <<<<<<<<<<<<<<
 *       return
 * 
 */
  }

  /* "apache_beam/runners/common.py":1451
 *       return
 * 
 *     output_sampler.sample_exception(             # <<<<<<<<<<<<<<
 *         windowed_value,
 *         exn,
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_output_sampler, __pyx_n_s_sample_exception); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "apache_beam/runners/common.py":1455
 *         exn,
 *         self.transform_id,
 *         self.execution_context.instruction_id)             # <<<<<<<<<<<<<<
 * 
 *   def process_batch(self, windowed_batch):
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->execution_context, __pyx_n_s_instruction_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[5] = {__pyx_t_6, __pyx_v_windowed_value, __pyx_v_exn, __pyx_v_self->transform_id, __pyx_t_5};
    __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1451, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[5] = {__pyx_t_6, __pyx_v_windowed_value, __pyx_v_exn, __pyx_v_self->transform_id, __pyx_t_5};
    __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1451, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_8 = PyTuple_New(4+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1451, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_INCREF(__pyx_v_windowed_value);
    __Pyx_GIVEREF(__pyx_v_windowed_value);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_windowed_value);
    __Pyx_INCREF(__pyx_v_exn);
    __Pyx_GIVEREF(__pyx_v_exn);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_exn);
    __Pyx_INCREF(__pyx_v_self->transform_id);
    __Pyx_GIVEREF(__pyx_v_self->transform_id);
    PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_v_self->transform_id);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_8, 3+__pyx_t_7, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1451, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "apache_beam/runners/common.py":1440
 *       return []
 * 
 *   def _maybe_sample_exception(             # <<<<<<<<<<<<<<
 *       self, exn: BaseException,
 *       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_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.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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1457
 *         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, PyObject *__pyx_v_windowed_batch); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_7process_batch = {"process_batch", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_7process_batch, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_7process_batch(PyObject *__pyx_v_self, PyObject *__pyx_v_windowed_batch) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("process_batch (wrapper)", 0);
  __pyx_r = __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));

  /* function exit code */
  __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_TraceDeclarations
  __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;
  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_TraceFrameInit(__pyx_codeobj__79)
  __Pyx_RefNannySetupContext("process_batch", 0);
  __Pyx_TraceCall("process_batch", __pyx_f[0], 1457, 0, __PYX_ERR(0, 1457, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1459
 *   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":1460
 *     # type: (WindowedBatch) -> None
 *     try:
 *       self.do_fn_invoker.invoke_process_batch(windowed_batch)             # <<<<<<<<<<<<<<
 *     except BaseException as exn:
 *       self._reraise_augmented(exn)
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->do_fn_invoker), __pyx_n_s_invoke_process_batch); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1460, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_windowed_batch) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_windowed_batch);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1460, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "apache_beam/runners/common.py":1459
 *   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;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "apache_beam/runners/common.py":1461
 *     try:
 *       self.do_fn_invoker.invoke_process_batch(windowed_batch)
 *     except BaseException as exn:             # <<<<<<<<<<<<<<
 *       self._reraise_augmented(exn)
 * 
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_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_6) < 0) __PYX_ERR(0, 1461, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_v_exn = __pyx_t_5;
      /*try:*/ {

        /* "apache_beam/runners/common.py":1462
 *       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_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reraise_augmented); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1462, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_10 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_10)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
          }
        }
        __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_v_exn) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_exn);
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1462, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }

      /* "apache_beam/runners/common.py":1461
 *     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 = NULL;
          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_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
          if ((PY_MAJOR_VERSION < 3) || 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 = NULL;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __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_6); __pyx_t_6 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "apache_beam/runners/common.py":1459
 *   def process_batch(self, windowed_batch):
 *     # type: (WindowedBatch) -> None
 *     try:             # <<<<<<<<<<<<<<
 *       self.do_fn_invoker.invoke_process_batch(windowed_batch)
 *     except BaseException as exn:
 */
    __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":1457
 *         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_6);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1464
 *       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, PyObject *__pyx_v_windowed_value); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_9process_with_sized_restriction = {"process_with_sized_restriction", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_9process_with_sized_restriction, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_9process_with_sized_restriction(PyObject *__pyx_v_self, PyObject *__pyx_v_windowed_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("process_with_sized_restriction (wrapper)", 0);
  __pyx_r = __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));

  /* function exit code */
  __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_TraceDeclarations
  __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;
  struct __pyx_opt_args_11apache_beam_7runners_6common_11DoFnInvoker_invoke_process __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__80)
  __Pyx_RefNannySetupContext("process_with_sized_restriction", 0);
  __Pyx_TraceCall("process_with_sized_restriction", __pyx_f[0], 1464, 0, __PYX_ERR(0, 1464, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1466
 *   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_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1466, __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, 1466, __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_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1466, __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, 1466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    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, 1466, __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, 1466, __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, 1466, __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_t_6 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_6);
    #else
    __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1466, __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, 1466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext;
    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, 1466, __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, 1466, __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, 1466, __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_t_8 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_7 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_8);
    #else
    __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1466, __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, 1466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_9)->tp_iternext;
    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, 1466, __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, 1466, __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":1467
 *     # 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":1468
 *     (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_PyObject_GetAttrStr(__pyx_v_windowed_value, __pyx_n_s_with_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_element) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_element);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue))))) __PYX_ERR(0, 1468, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1467
 *     # 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_10.__pyx_n = 2;
  __pyx_t_10.restriction = __pyx_v_restriction;
  __pyx_t_10.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_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1467, __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":1464
 *       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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1472
 *         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, PyObject *__pyx_v_fraction); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_11try_split = {"try_split", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_11try_split, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_11try_split(PyObject *__pyx_v_self, PyObject *__pyx_v_fraction) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("try_split (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_10try_split(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *)__pyx_v_self), ((PyObject *)__pyx_v_fraction));

  /* function exit code */
  __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_TraceDeclarations
  __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_TraceFrameInit(__pyx_codeobj__81)
  __Pyx_RefNannySetupContext("try_split", 0);
  __Pyx_TraceCall("try_split", __pyx_f[0], 1472, 0, __PYX_ERR(0, 1472, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1474
 *   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_ptype_11apache_beam_7runners_6common_PerWindowInvoker); 
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!(__pyx_t_2 != 0))) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 1474, __pyx_L1_error)
    }
  }
  #endif

  /* "apache_beam/runners/common.py":1475
 *     # 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 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->do_fn_invoker), __pyx_n_s_try_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_fraction) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_fraction);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1475, __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/common.py":1472
 *         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_XDECREF(__pyx_t_4);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1477
 *     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, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_13current_element_progress = {"current_element_progress", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_13current_element_progress, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_13current_element_progress(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("current_element_progress (wrapper)", 0);
  __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_TraceDeclarations
  __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_TraceFrameInit(__pyx_codeobj__82)
  __Pyx_RefNannySetupContext("current_element_progress", 0);
  __Pyx_TraceCall("current_element_progress", __pyx_f[0], 1477, 0, __PYX_ERR(0, 1477, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1479
 *   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_ptype_11apache_beam_7runners_6common_PerWindowInvoker); 
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!(__pyx_t_2 != 0))) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 1479, __pyx_L1_error)
    }
  }
  #endif

  /* "apache_beam/runners/common.py":1480
 *     # 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 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->do_fn_invoker), __pyx_n_s_current_element_progress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1480, __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/common.py":1477
 *     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_XDECREF(__pyx_t_4);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1482
 *     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, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_15process_user_timer = {"process_user_timer", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_15process_user_timer, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_15process_user_timer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  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;
  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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_timer_spec,&__pyx_n_s_key,&__pyx_n_s_window,&__pyx_n_s_timestamp,&__pyx_n_s_pane_info,&__pyx_n_s_dynamic_timer_tag,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timer_spec)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("process_user_timer", 1, 6, 6, 1); __PYX_ERR(0, 1482, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_window)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("process_user_timer", 1, 6, 6, 2); __PYX_ERR(0, 1482, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timestamp)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("process_user_timer", 1, 6, 6, 3); __PYX_ERR(0, 1482, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pane_info)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("process_user_timer", 1, 6, 6, 4); __PYX_ERR(0, 1482, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dynamic_timer_tag)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("process_user_timer", 1, 6, 6, 5); __PYX_ERR(0, 1482, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "process_user_timer") < 0)) __PYX_ERR(0, 1482, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
    }
    __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_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("process_user_timer", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1482, __pyx_L3_error)
  __pyx_L3_error:;
  __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 */
  __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_TraceDeclarations
  __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;
  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_TraceFrameInit(__pyx_codeobj__83)
  __Pyx_RefNannySetupContext("process_user_timer", 0);
  __Pyx_TraceCall("process_user_timer", __pyx_f[0], 1482, 0, __PYX_ERR(0, 1482, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1484
 *   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":1485
 *       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 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->do_fn_invoker), __pyx_n_s_invoke_user_timer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1485, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);

      /* "apache_beam/runners/common.py":1486
 *     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 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_7 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[7] = {__pyx_t_6, __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_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 6+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1485, __pyx_L3_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[7] = {__pyx_t_6, __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_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 6+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1485, __pyx_L3_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      {
        __pyx_t_8 = PyTuple_New(6+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1485, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (__pyx_t_6) {
          __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
        }
        __Pyx_INCREF(__pyx_v_timer_spec);
        __Pyx_GIVEREF(__pyx_v_timer_spec);
        PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_timer_spec);
        __Pyx_INCREF(__pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_key);
        __Pyx_INCREF(__pyx_v_window);
        __Pyx_GIVEREF(__pyx_v_window);
        PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_v_window);
        __Pyx_INCREF(__pyx_v_timestamp);
        __Pyx_GIVEREF(__pyx_v_timestamp);
        PyTuple_SET_ITEM(__pyx_t_8, 3+__pyx_t_7, __pyx_v_timestamp);
        __Pyx_INCREF(__pyx_v_pane_info);
        __Pyx_GIVEREF(__pyx_v_pane_info);
        PyTuple_SET_ITEM(__pyx_t_8, 4+__pyx_t_7, __pyx_v_pane_info);
        __Pyx_INCREF(__pyx_v_dynamic_timer_tag);
        __Pyx_GIVEREF(__pyx_v_dynamic_timer_tag);
        PyTuple_SET_ITEM(__pyx_t_8, 5+__pyx_t_7, __pyx_v_dynamic_timer_tag);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1485, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "apache_beam/runners/common.py":1484
 *   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;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "apache_beam/runners/common.py":1487
 *       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(__pyx_builtin_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, 1487, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_v_exn = __pyx_t_5;
      /*try:*/ {

        /* "apache_beam/runners/common.py":1488
 *           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_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reraise_augmented); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1488, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_10 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_10)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
          }
        }
        __pyx_t_6 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_v_exn) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_exn);
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1488, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }

      /* "apache_beam/runners/common.py":1487
 *       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 = NULL;
          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_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
          if ((PY_MAJOR_VERSION < 3) || 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 = NULL;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __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;
    __pyx_L5_except_error:;

    /* "apache_beam/runners/common.py":1484
 *   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_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":1482
 *     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_6);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1490
 *       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, PyObject *__pyx_v_bundle_method); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_17_invoke_bundle_method = {"_invoke_bundle_method", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_17_invoke_bundle_method, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_17_invoke_bundle_method(PyObject *__pyx_v_self, PyObject *__pyx_v_bundle_method) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_invoke_bundle_method (wrapper)", 0);
  __pyx_r = __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));

  /* function exit code */
  __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_TraceDeclarations
  __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;
  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_TraceFrameInit(__pyx_codeobj__84)
  __Pyx_RefNannySetupContext("_invoke_bundle_method", 0);
  __Pyx_TraceCall("_invoke_bundle_method", __pyx_f[0], 1490, 0, __PYX_ERR(0, 1490, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1491
 * 
 *   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":1492
 *   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, 1492, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "apache_beam/runners/common.py":1493
 *     try:
 *       self.context.set_element(None)
 *       bundle_method()             # <<<<<<<<<<<<<<
 *     except BaseException as exn:
 *       self._reraise_augmented(exn)
 */
      __Pyx_INCREF(__pyx_v_bundle_method);
      __pyx_t_5 = __pyx_v_bundle_method; __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1493, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "apache_beam/runners/common.py":1491
 * 
 *   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":1494
 *       self.context.set_element(None)
 *       bundle_method()
 *     except BaseException as exn:             # <<<<<<<<<<<<<<
 *       self._reraise_augmented(exn)
 * 
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException);
    if (__pyx_t_7) {
      __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner._invoke_bundle_method", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 1494, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_v_exn = __pyx_t_5;
      /*try:*/ {

        /* "apache_beam/runners/common.py":1495
 *       bundle_method()
 *     except BaseException as exn:
 *       self._reraise_augmented(exn)             # <<<<<<<<<<<<<<
 * 
 *   def _invoke_lifecycle_method(self, lifecycle_method):
 */
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reraise_augmented); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1495, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_10 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_10)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
          }
        }
        __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_v_exn) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_exn);
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1495, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }

      /* "apache_beam/runners/common.py":1494
 *       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 = NULL;
          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_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
          if ((PY_MAJOR_VERSION < 3) || 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 = NULL;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __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_6); __pyx_t_6 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "apache_beam/runners/common.py":1491
 * 
 *   def _invoke_bundle_method(self, bundle_method):
 *     try:             # <<<<<<<<<<<<<<
 *       self.context.set_element(None)
 *       bundle_method()
 */
    __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":1490
 *       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_8);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1497
 *       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, PyObject *__pyx_v_lifecycle_method); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_19_invoke_lifecycle_method = {"_invoke_lifecycle_method", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_19_invoke_lifecycle_method, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_19_invoke_lifecycle_method(PyObject *__pyx_v_self, PyObject *__pyx_v_lifecycle_method) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_invoke_lifecycle_method (wrapper)", 0);
  __pyx_r = __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));

  /* function exit code */
  __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_TraceDeclarations
  __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;
  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_TraceFrameInit(__pyx_codeobj__85)
  __Pyx_RefNannySetupContext("_invoke_lifecycle_method", 0);
  __Pyx_TraceCall("_invoke_lifecycle_method", __pyx_f[0], 1497, 0, __PYX_ERR(0, 1497, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1498
 * 
 *   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":1499
 *   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, 1499, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "apache_beam/runners/common.py":1500
 *     try:
 *       self.context.set_element(None)
 *       lifecycle_method()             # <<<<<<<<<<<<<<
 *     except BaseException as exn:
 *       self._reraise_augmented(exn)
 */
      __Pyx_INCREF(__pyx_v_lifecycle_method);
      __pyx_t_5 = __pyx_v_lifecycle_method; __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1500, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "apache_beam/runners/common.py":1498
 * 
 *   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":1501
 *       self.context.set_element(None)
 *       lifecycle_method()
 *     except BaseException as exn:             # <<<<<<<<<<<<<<
 *       self._reraise_augmented(exn)
 * 
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException);
    if (__pyx_t_7) {
      __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner._invoke_lifecycle_method", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 1501, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_v_exn = __pyx_t_5;
      /*try:*/ {

        /* "apache_beam/runners/common.py":1502
 *       lifecycle_method()
 *     except BaseException as exn:
 *       self._reraise_augmented(exn)             # <<<<<<<<<<<<<<
 * 
 *   def setup(self):
 */
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reraise_augmented); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1502, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_10 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_10)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
          }
        }
        __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_v_exn) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_exn);
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1502, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }

      /* "apache_beam/runners/common.py":1501
 *       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 = NULL;
          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_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
          if ((PY_MAJOR_VERSION < 3) || 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 = NULL;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __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_6); __pyx_t_6 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "apache_beam/runners/common.py":1498
 * 
 *   def _invoke_lifecycle_method(self, lifecycle_method):
 *     try:             # <<<<<<<<<<<<<<
 *       self.context.set_element(None)
 *       lifecycle_method()
 */
    __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":1497
 *       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_8);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1504
 *       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, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_21setup = {"setup", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_21setup, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_21setup(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setup (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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_TraceFrameInit(__pyx_codeobj__86)
  __Pyx_RefNannySetupContext("setup", 0);
  __Pyx_TraceCall("setup", __pyx_f[0], 1504, 0, __PYX_ERR(0, 1504, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1506
 *   def setup(self):
 *     # type: () -> None
 *     self._invoke_lifecycle_method(self.do_fn_invoker.invoke_setup)             # <<<<<<<<<<<<<<
 * 
 *   def start(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_invoke_lifecycle_method); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->do_fn_invoker), __pyx_n_s_invoke_setup); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __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, 1506, __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/common.py":1504
 *       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_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner.setup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1508
 *     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, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_23start = {"start", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_23start, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_23start(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("start (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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_TraceFrameInit(__pyx_codeobj__87)
  __Pyx_RefNannySetupContext("start", 0);
  __Pyx_TraceCall("start", __pyx_f[0], 1508, 0, __PYX_ERR(0, 1508, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1510
 *   def start(self):
 *     # type: () -> None
 *     self._invoke_bundle_method(self.do_fn_invoker.invoke_start_bundle)             # <<<<<<<<<<<<<<
 * 
 *   def finish(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_invoke_bundle_method); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->do_fn_invoker), __pyx_n_s_invoke_start_bundle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __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, 1510, __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/common.py":1508
 *     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_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1512
 *     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, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_25finish = {"finish", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_25finish, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_25finish(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("finish (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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_TraceFrameInit(__pyx_codeobj__88)
  __Pyx_RefNannySetupContext("finish", 0);
  __Pyx_TraceCall("finish", __pyx_f[0], 1512, 0, __PYX_ERR(0, 1512, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1514
 *   def finish(self):
 *     # type: () -> None
 *     self._invoke_bundle_method(self.do_fn_invoker.invoke_finish_bundle)             # <<<<<<<<<<<<<<
 * 
 *   def teardown(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_invoke_bundle_method); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->do_fn_invoker), __pyx_n_s_invoke_finish_bundle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __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, 1514, __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/common.py":1512
 *     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_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner.finish", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1516
 *     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, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_27teardown = {"teardown", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_27teardown, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_27teardown(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("teardown (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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_TraceFrameInit(__pyx_codeobj__89)
  __Pyx_RefNannySetupContext("teardown", 0);
  __Pyx_TraceCall("teardown", __pyx_f[0], 1516, 0, __PYX_ERR(0, 1516, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1518
 *   def teardown(self):
 *     # type: () -> None
 *     self._invoke_lifecycle_method(self.do_fn_invoker.invoke_teardown)             # <<<<<<<<<<<<<<
 * 
 *   def finalize(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_invoke_lifecycle_method); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->do_fn_invoker), __pyx_n_s_invoke_teardown); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __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, 1518, __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/common.py":1516
 *     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_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner.teardown", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1520
 *     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, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_29finalize = {"finalize", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_29finalize, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_29finalize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("finalize (wrapper)", 0);
  __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_TraceDeclarations
  __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_TraceFrameInit(__pyx_codeobj__90)
  __Pyx_RefNannySetupContext("finalize", 0);
  __Pyx_TraceCall("finalize", __pyx_f[0], 1520, 0, __PYX_ERR(0, 1520, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1522
 *   def finalize(self):
 *     # type: () -> None
 *     self.bundle_finalizer_param.finalize_bundle()             # <<<<<<<<<<<<<<
 * 
 *   def _reraise_augmented(self, exn, windowed_value=None):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->bundle_finalizer_param, __pyx_n_s_finalize_bundle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1522, __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/common.py":1520
 *     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_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner.finalize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1524
 *     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, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_31_reraise_augmented = {"_reraise_augmented", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_31_reraise_augmented, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_31_reraise_augmented(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_exn = 0;
  PyObject *__pyx_v_windowed_value = 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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exn,&__pyx_n_s_windowed_value,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exn)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_windowed_value);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_reraise_augmented") < 0)) __PYX_ERR(0, 1524, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_exn = values[0];
    __pyx_v_windowed_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_reraise_augmented", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1524, __pyx_L3_error)
  __pyx_L3_error:;
  __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 */
  __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_TraceDeclarations
  __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;
  int __pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  PyObject *(*__pyx_t_16)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__91)
  __Pyx_RefNannySetupContext("_reraise_augmented", 0);
  __Pyx_TraceCall("_reraise_augmented", __pyx_f[0], 1524, 0, __PYX_ERR(0, 1524, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1525
 * 
 *   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_n_u_tagged_with_step, Py_False); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1525, __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, 1525, __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, 1525, __pyx_L1_error)
  __pyx_t_4 = ((!__pyx_t_3) != 0);
  __pyx_t_1 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "apache_beam/runners/common.py":1526
 *   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, 1526, __pyx_L1_error)

    /* "apache_beam/runners/common.py":1525
 * 
 *   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":1527
 *     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_kp_u_while_running_s, __pyx_v_self->step_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1527, __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":1529
 *     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":1532
 *       # 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_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1532, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1532, __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, 1532, __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, 1532, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_exn, __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1532, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 = __Pyx_PyObject_GetSlice(__pyx_t_2, 1, 0, NULL, NULL, &__pyx_slice__92, 1, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1532, __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, 1532, __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, 1532, __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, 1532, __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":1533
 *       # 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_n_s_tagged_with_step, Py_True) < 0) __PYX_ERR(0, 1533, __pyx_L6_error)

      /* "apache_beam/runners/common.py":1529
 *     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":1534
 *       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, 1534, __pyx_L8_except_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GOTREF(__pyx_t_8);

      /* "apache_beam/runners/common.py":1538
 *       # 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_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_traceback); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1538, __pyx_L8_except_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_format_exception_only); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1538, __pyx_L8_except_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_12 = NULL;
      __pyx_t_14 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_13))) {
        __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_13);
        if (likely(__pyx_t_12)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
          __Pyx_INCREF(__pyx_t_12);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_13, function);
          __pyx_t_14 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_13)) {
        PyObject *__pyx_temp[3] = {__pyx_t_12, ((PyObject *)Py_TYPE(__pyx_v_exn)), __pyx_v_exn};
        __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1538, __pyx_L8_except_error)
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_GOTREF(__pyx_t_11);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) {
        PyObject *__pyx_temp[3] = {__pyx_t_12, ((PyObject *)Py_TYPE(__pyx_v_exn)), __pyx_v_exn};
        __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1538, __pyx_L8_except_error)
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_GOTREF(__pyx_t_11);
      } else
      #endif
      {
        __pyx_t_15 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1538, __pyx_L8_except_error)
        __Pyx_GOTREF(__pyx_t_15);
        if (__pyx_t_12) {
          __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_12); __pyx_t_12 = NULL;
        }
        __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_exn)));
        __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_exn)));
        PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_14, ((PyObject *)Py_TYPE(__pyx_v_exn)));
        __Pyx_INCREF(__pyx_v_exn);
        __Pyx_GIVEREF(__pyx_v_exn);
        PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_14, __pyx_v_exn);
        __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_15, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1538, __pyx_L8_except_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      }
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_13 = __Pyx_GetItemInt(__pyx_t_11, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1538, __pyx_L8_except_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_strip); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1538, __pyx_L8_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_13 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_13)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_13);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
        }
      }
      __pyx_t_10 = (__pyx_t_13) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_13) : __Pyx_PyObject_CallNoArg(__pyx_t_11);
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1538, __pyx_L8_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

      /* "apache_beam/runners/common.py":1539
 *       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_11 = PyNumber_Add(__pyx_t_10, __pyx_v_step_annotation); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1538, __pyx_L8_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "apache_beam/runners/common.py":1537
 *       # 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_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1537, __pyx_L8_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF_SET(__pyx_v_new_exn, __pyx_t_10);
      __pyx_t_10 = 0;

      /* "apache_beam/runners/common.py":1540
 *           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_n_s_tagged_with_step, Py_True) < 0) __PYX_ERR(0, 1540, __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;
    }
    __pyx_L8_except_error:;

    /* "apache_beam/runners/common.py":1529
 *     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_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":1541
 *           step_annotation)
 *       new_exn._tagged_with_step = True
 *     exc_info = sys.exc_info()             # <<<<<<<<<<<<<<
 *     _, _, tb = exc_info
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_sys); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_8 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_exc_info = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "apache_beam/runners/common.py":1542
 *       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, 1542, __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_t_2 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_9 = PyTuple_GET_ITEM(sequence, 2); 
    } else {
      __pyx_t_8 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_9 = PyList_GET_ITEM(sequence, 2); 
    }
    __Pyx_INCREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_9);
    #else
    __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1542, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1542, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_9 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1542, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    #endif
  } else {
    Py_ssize_t index = -1;
    __pyx_t_10 = PyObject_GetIter(__pyx_v_exc_info); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1542, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_16 = Py_TYPE(__pyx_t_10)->tp_iternext;
    index = 0; __pyx_t_8 = __pyx_t_16(__pyx_t_10); if (unlikely(!__pyx_t_8)) goto __pyx_L14_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_8);
    index = 1; __pyx_t_2 = __pyx_t_16(__pyx_t_10); if (unlikely(!__pyx_t_2)) goto __pyx_L14_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 2; __pyx_t_9 = __pyx_t_16(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L14_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_9);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_10), 3) < 0) __PYX_ERR(0, 1542, __pyx_L1_error)
    __pyx_t_16 = NULL;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    goto __pyx_L15_unpacking_done;
    __pyx_L14_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_16 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 1542, __pyx_L1_error)
    __pyx_L15_unpacking_done:;
  }
  __pyx_v__ = __pyx_t_8;
  __pyx_t_8 = 0;
  __Pyx_DECREF_SET(__pyx_v__, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_v_tb = __pyx_t_9;
  __pyx_t_9 = 0;

  /* "apache_beam/runners/common.py":1544
 *     _, _, tb = exc_info
 * 
 *     new_exn = new_exn.with_traceback(tb)             # <<<<<<<<<<<<<<
 *     self._maybe_sample_exception(exc_info, windowed_value)
 *     _LOGGER.exception(new_exn)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_exn, __pyx_n_s_with_traceback); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_9 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_8, __pyx_v_tb) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_tb);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_new_exn, __pyx_t_9);
  __pyx_t_9 = 0;

  /* "apache_beam/runners/common.py":1545
 * 
 *     new_exn = new_exn.with_traceback(tb)
 *     self._maybe_sample_exception(exc_info, windowed_value)             # <<<<<<<<<<<<<<
 *     _LOGGER.exception(new_exn)
 *     raise new_exn
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_maybe_sample_exception); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = NULL;
  __pyx_t_14 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_14 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_exc_info, __pyx_v_windowed_value};
    __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1545, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_exc_info, __pyx_v_windowed_value};
    __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1545, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else
  #endif
  {
    __pyx_t_10 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__pyx_t_8) {
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
    }
    __Pyx_INCREF(__pyx_v_exc_info);
    __Pyx_GIVEREF(__pyx_v_exc_info);
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_14, __pyx_v_exc_info);
    __Pyx_INCREF(__pyx_v_windowed_value);
    __Pyx_GIVEREF(__pyx_v_windowed_value);
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_14, __pyx_v_windowed_value);
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __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;

  /* "apache_beam/runners/common.py":1546
 *     new_exn = new_exn.with_traceback(tb)
 *     self._maybe_sample_exception(exc_info, windowed_value)
 *     _LOGGER.exception(new_exn)             # <<<<<<<<<<<<<<
 *     raise new_exn
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_LOGGER); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_exception); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_10);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_10, function);
    }
  }
  __pyx_t_9 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_2, __pyx_v_new_exn) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_new_exn);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "apache_beam/runners/common.py":1547
 *     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, 1547, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1524
 *     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_15);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.pxd":123
 *   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) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[2], 123, 0, __PYX_ERR(2, 123, __pyx_L1_error));
  __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_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner.bundle_finalizer_param.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[2], 123, 0, __PYX_ERR(2, 123, __pyx_L1_error));
  __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;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner.bundle_finalizer_param.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[2], 123, 0, __PYX_ERR(2, 123, __pyx_L1_error));
  __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;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner.bundle_finalizer_param.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 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, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_33__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_33__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_33__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__93)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(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:
 */
  __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);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->bundle_finalizer_param);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->context));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->context));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self->context));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->do_fn_invoker));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->do_fn_invoker));
  PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_self->do_fn_invoker));
  __Pyx_INCREF(__pyx_v_self->execution_context);
  __Pyx_GIVEREF(__pyx_v_self->execution_context);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->execution_context);
  __Pyx_INCREF(__pyx_v_self->side_inputs);
  __Pyx_GIVEREF(__pyx_v_self->side_inputs);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_v_self->side_inputs);
  __Pyx_INCREF(__pyx_v_self->step_name);
  __Pyx_GIVEREF(__pyx_v_self->step_name);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_v_self->step_name);
  __Pyx_INCREF(__pyx_v_self->transform_id);
  __Pyx_GIVEREF(__pyx_v_self->transform_id);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_v_self->transform_id);
  __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:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_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:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         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);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __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:
 *         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:             # <<<<<<<<<<<<<<
 *         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), 0x503639a, None), state
 */
  /*else*/ {
    __pyx_t_2 = (__pyx_v_self->bundle_finalizer_param != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (((PyObject *)__pyx_v_self->context) != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_2 = (((PyObject *)__pyx_v_self->do_fn_invoker) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->execution_context != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_2 = (__pyx_v_self->side_inputs != ((PyObject*)Py_None));
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->step_name != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_2 = (__pyx_v_self->transform_id != ((PyObject*)Py_None));
    __pyx_t_5 = (__pyx_t_2 != 0);
    __pyx_t_3 = __pyx_t_5;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __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), 0x503639a, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(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), 0x503639a, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_DoFnRunner, (type(self), 0x503639a, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_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))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_84108186);
    __Pyx_GIVEREF(__pyx_int_84108186);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_84108186);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 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), 0x503639a, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_DoFnRunner, (type(self), 0x503639a, None), state
 *     else:
 *         return __pyx_unpickle_DoFnRunner, (type(self), 0x503639a, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_DoFnRunner__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_DoFnRunner); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __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))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_84108186);
    __Pyx_GIVEREF(__pyx_int_84108186);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_84108186);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __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_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 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_6);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DoFnRunner, (type(self), 0x503639a, 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, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_35__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_35__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_35__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __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));

  /* function exit code */
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__94)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 16, 0, __PYX_ERR(1, 16, __pyx_L1_error));

  /* "(tree fragment)":17
 *         return __pyx_unpickle_DoFnRunner, (type(self), 0x503639a, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_DoFnRunner__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6common___pyx_unpickle_DoFnRunner__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DoFnRunner, (type(self), 0x503639a, 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_AddTraceback("apache_beam.runners.common.DoFnRunner.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1551
 * 
 * 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, PyObject *__pyx_args, PyObject *__pyx_kwds); /*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":1552
 * 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_TraceDeclarations
  __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;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__95)
  __Pyx_RefNannySetupContext("handle_process_outputs", 0);
  __Pyx_TraceCall("handle_process_outputs", __pyx_f[0], 1551, 0, __PYX_ERR(0, 1551, __pyx_L1_error));
  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":1551
 * 
 * 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 (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle_process_outputs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1551, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_7runners_6common_13OutputHandler_1handle_process_outputs)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[4] = {__pyx_t_4, ((PyObject *)__pyx_v_windowed_input_element), __pyx_v_results, __pyx_v_watermark_estimator};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1551, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[4] = {__pyx_t_4, ((PyObject *)__pyx_v_windowed_input_element), __pyx_v_results, __pyx_v_watermark_estimator};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1551, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1551, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
          }
          __Pyx_INCREF(((PyObject *)__pyx_v_windowed_input_element));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_windowed_input_element));
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, ((PyObject *)__pyx_v_windowed_input_element));
          __Pyx_INCREF(__pyx_v_results);
          __Pyx_GIVEREF(__pyx_v_results);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_results);
          __Pyx_INCREF(__pyx_v_watermark_estimator);
          __Pyx_GIVEREF(__pyx_v_watermark_estimator);
          PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_watermark_estimator);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1551, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __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_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_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":1554
 *       self, windowed_input_element, results, watermark_estimator=None):
 *     # type: (WindowedValue, Iterable[Any], Optional[WatermarkEstimator]) -> None
 *     raise NotImplementedError             # <<<<<<<<<<<<<<
 * 
 *   def handle_process_batch_outputs(
 */
  __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
  __PYX_ERR(0, 1554, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1551
 * 
 * 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_XDECREF(__pyx_t_6);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_13OutputHandler_1handle_process_outputs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13OutputHandler_1handle_process_outputs = {"handle_process_outputs", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13OutputHandler_1handle_process_outputs, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_13OutputHandler_1handle_process_outputs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  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;
  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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_windowed_input_element,&__pyx_n_s_results,&__pyx_n_s_watermark_estimator,0};
    PyObject* values[3] = {0,0,0};

    /* "apache_beam/runners/common.py":1552
 * class OutputHandler(object):
 *   def handle_process_outputs(
 *       self, windowed_input_element, results, watermark_estimator=None):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue, Iterable[Any], Optional[WatermarkEstimator]) -> None
 *     raise NotImplementedError
 */
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_windowed_input_element)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_results)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("handle_process_outputs", 0, 2, 3, 1); __PYX_ERR(0, 1551, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_watermark_estimator);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "handle_process_outputs") < 0)) __PYX_ERR(0, 1551, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __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_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("handle_process_outputs", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1551, __pyx_L3_error)
  __pyx_L3_error:;
  __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_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, 1, "windowed_input_element", 0))) __PYX_ERR(0, 1552, __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":1551
 * 
 * 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;
  __pyx_L0:;
  __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_TraceDeclarations
  __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_TraceFrameInit(__pyx_codeobj__95)
  __Pyx_RefNannySetupContext("handle_process_outputs", 0);
  __Pyx_TraceCall("handle_process_outputs (wrapper)", __pyx_f[0], 1551, 0, __PYX_ERR(0, 1551, __pyx_L1_error));
  __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, 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.runners.common.OutputHandler.handle_process_outputs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1556
 *     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, PyObject *__pyx_args, PyObject *__pyx_kwds); /*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":1557
 * 
 *   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_TraceDeclarations
  __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;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__96)
  __Pyx_RefNannySetupContext("handle_process_batch_outputs", 0);
  __Pyx_TraceCall("handle_process_batch_outputs", __pyx_f[0], 1556, 0, __PYX_ERR(0, 1556, __pyx_L1_error));
  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":1556
 *     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 (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle_process_batch_outputs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1556, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_7runners_6common_13OutputHandler_3handle_process_batch_outputs)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[4] = {__pyx_t_4, ((PyObject *)__pyx_v_windowed_input_element), __pyx_v_results, __pyx_v_watermark_estimator};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1556, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[4] = {__pyx_t_4, ((PyObject *)__pyx_v_windowed_input_element), __pyx_v_results, __pyx_v_watermark_estimator};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1556, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1556, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
          }
          __Pyx_INCREF(((PyObject *)__pyx_v_windowed_input_element));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_windowed_input_element));
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, ((PyObject *)__pyx_v_windowed_input_element));
          __Pyx_INCREF(__pyx_v_results);
          __Pyx_GIVEREF(__pyx_v_results);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_results);
          __Pyx_INCREF(__pyx_v_watermark_estimator);
          __Pyx_GIVEREF(__pyx_v_watermark_estimator);
          PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_watermark_estimator);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1556, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __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_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_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":1559
 *       self, windowed_input_element, results, watermark_estimator=None):
 *     # type: (WindowedBatch, Iterable[Any], Optional[WatermarkEstimator]) -> None
 *     raise NotImplementedError             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
  __PYX_ERR(0, 1559, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1556
 *     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_XDECREF(__pyx_t_6);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_13OutputHandler_3handle_process_batch_outputs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13OutputHandler_3handle_process_batch_outputs = {"handle_process_batch_outputs", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13OutputHandler_3handle_process_batch_outputs, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_13OutputHandler_3handle_process_batch_outputs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  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;
  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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_windowed_input_element,&__pyx_n_s_results,&__pyx_n_s_watermark_estimator,0};
    PyObject* values[3] = {0,0,0};

    /* "apache_beam/runners/common.py":1557
 * 
 *   def handle_process_batch_outputs(
 *       self, windowed_input_element, results, watermark_estimator=None):             # <<<<<<<<<<<<<<
 *     # type: (WindowedBatch, Iterable[Any], Optional[WatermarkEstimator]) -> None
 *     raise NotImplementedError
 */
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_windowed_input_element)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_results)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("handle_process_batch_outputs", 0, 2, 3, 1); __PYX_ERR(0, 1556, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_watermark_estimator);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "handle_process_batch_outputs") < 0)) __PYX_ERR(0, 1556, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __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_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("handle_process_batch_outputs", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1556, __pyx_L3_error)
  __pyx_L3_error:;
  __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_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch, 1, "windowed_input_element", 0))) __PYX_ERR(0, 1557, __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":1556
 *     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;
  __pyx_L0:;
  __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_TraceDeclarations
  __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_TraceFrameInit(__pyx_codeobj__96)
  __Pyx_RefNannySetupContext("handle_process_batch_outputs", 0);
  __Pyx_TraceCall("handle_process_batch_outputs (wrapper)", __pyx_f[0], 1556, 0, __PYX_ERR(0, 1556, __pyx_L1_error));
  __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, 1556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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_TraceReturn(__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_13OutputHandler_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13OutputHandler_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13OutputHandler_5__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_13OutputHandler_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __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_TraceDeclarations
  __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_TraceFrameInit(__pyx_codeobj__97)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = ()             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __Pyx_INCREF(__pyx_empty_tuple);
  __pyx_v_state = __pyx_empty_tuple;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_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:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         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);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __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:
 *         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:             # <<<<<<<<<<<<<<
 *         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), 0xd41d8cd, 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), 0xd41d8cd, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = False
 *     if use_setstate:
 *         return __pyx_unpickle_OutputHandler, (type(self), 0xd41d8cd, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_OutputHandler, (type(self), 0xd41d8cd, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_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))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222419149);
    __Pyx_GIVEREF(__pyx_int_222419149);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __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);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __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), 0xd41d8cd, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_OutputHandler, (type(self), 0xd41d8cd, None), state
 *     else:
 *         return __pyx_unpickle_OutputHandler, (type(self), 0xd41d8cd, 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_n_s_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))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222419149);
    __Pyx_GIVEREF(__pyx_int_222419149);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __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);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_OutputHandler, (type(self), 0xd41d8cd, 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, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13OutputHandler_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13OutputHandler_7__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_13OutputHandler_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __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));

  /* function exit code */
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__98)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 16, 0, __PYX_ERR(1, 16, __pyx_L1_error));

  /* "(tree fragment)":17
 *         return __pyx_unpickle_OutputHandler, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_OutputHandler__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6common___pyx_unpickle_OutputHandler__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_OutputHandler, (type(self), 0xd41d8cd, 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_AddTraceback("apache_beam.runners.common.OutputHandler.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1565
 *   """Processes output produced by DoFn method invocations."""
 * 
 *   def __init__(self,             # <<<<<<<<<<<<<<
 *                window_fn,
 *                main_receivers,  # type: Receiver
 */

/* 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*/
static char __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_window_fn,&__pyx_n_s_main_receivers,&__pyx_n_s_tagged_receivers,&__pyx_n_s_per_element_output_counter,&__pyx_n_s_output_batch_converter,&__pyx_n_s_process_yields_batches,&__pyx_n_s_process_batch_yields_elements,0};
    PyObject* values[7] = {0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_window_fn)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_main_receivers)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, 1); __PYX_ERR(0, 1565, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tagged_receivers)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, 2); __PYX_ERR(0, 1565, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_per_element_output_counter)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, 3); __PYX_ERR(0, 1565, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_output_batch_converter)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, 4); __PYX_ERR(0, 1565, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_process_yields_batches)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, 5); __PYX_ERR(0, 1565, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_process_batch_yields_elements)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, 6); __PYX_ERR(0, 1565, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1565, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
      values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
    }
    __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_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1565, __pyx_L3_error)
  __pyx_L3_error:;
  __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 */
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __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);
  __Pyx_TraceCall("__init__", __pyx_f[0], 1565, 0, __PYX_ERR(0, 1565, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1583
 *                                   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":1584
 *     """
 *     self.window_fn = window_fn
 *     self.main_receivers = main_receivers             # <<<<<<<<<<<<<<
 *     self.tagged_receivers = tagged_receivers
 *     if (per_element_output_counter is not None and
 */
  if (!(likely(((__pyx_v_main_receivers) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_main_receivers, __pyx_ptype_11apache_beam_7runners_6common_Receiver))))) __PYX_ERR(0, 1584, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_main_receivers;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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":1585
 *     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":1586
 *     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);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }

  /* "apache_beam/runners/common.py":1587
 *     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_n_s_is_cythonized); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1587, __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, 1587, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;

  /* "apache_beam/runners/common.py":1586
 *     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":1588
 *     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
 */
    if (!(likely(((__pyx_v_per_element_output_counter) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_per_element_output_counter, __pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter))))) __PYX_ERR(0, 1588, __pyx_L1_error)
    __pyx_t_1 = __pyx_v_per_element_output_counter;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__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":1586
 *     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":1590
 *       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(__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":1591
 *     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":1592
 *       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, 1592, __pyx_L1_error)
  __pyx_v_self->_process_yields_batches = __pyx_t_2;

  /* "apache_beam/runners/common.py":1593
 *     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, 1593, __pyx_L1_error)
  __pyx_v_self->_process_batch_yields_elements = __pyx_t_2;

  /* "apache_beam/runners/common.py":1565
 *   """Processes output produced by DoFn method invocations."""
 * 
 *   def __init__(self,             # <<<<<<<<<<<<<<
 *                window_fn,
 *                main_receivers,  # type: Receiver
 */

  /* 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_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1595
 *     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, PyObject *__pyx_args, PyObject *__pyx_kwds); /*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":1596
 * 
 *   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_TraceDeclarations
  __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;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  int __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  int64_t __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__99)
  __Pyx_RefNannySetupContext("handle_process_outputs", 0);
  __Pyx_TraceCall("handle_process_outputs", __pyx_f[0], 1595, 0, __PYX_ERR(0, 1595, __pyx_L1_error));
  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":1595
 *     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 (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle_process_outputs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1595, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_3handle_process_outputs)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[4] = {__pyx_t_4, ((PyObject *)__pyx_v_windowed_input_element), __pyx_v_results, __pyx_v_watermark_estimator};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1595, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[4] = {__pyx_t_4, ((PyObject *)__pyx_v_windowed_input_element), __pyx_v_results, __pyx_v_watermark_estimator};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1595, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1595, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
          }
          __Pyx_INCREF(((PyObject *)__pyx_v_windowed_input_element));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_windowed_input_element));
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, ((PyObject *)__pyx_v_windowed_input_element));
          __Pyx_INCREF(__pyx_v_results);
          __Pyx_GIVEREF(__pyx_v_results);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_results);
          __Pyx_INCREF(__pyx_v_watermark_estimator);
          __Pyx_GIVEREF(__pyx_v_watermark_estimator);
          PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_watermark_estimator);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1595, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __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_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_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":1604
 *     then dispatched to the appropriate indexed output.
 *     """
 *     if results is None:             # <<<<<<<<<<<<<<
 *       results = []
 * 
 */
  __pyx_t_7 = (__pyx_v_results == Py_None);
  __pyx_t_8 = (__pyx_t_7 != 0);
  if (__pyx_t_8) {

    /* "apache_beam/runners/common.py":1605
 *     """
 *     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, 1605, __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":1604
 *     then dispatched to the appropriate indexed output.
 *     """
 *     if results is None:             # <<<<<<<<<<<<<<
 *       results = []
 * 
 */
  }

  /* "apache_beam/runners/common.py":1610
 *     #  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":1611
 *     #  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_9 = 0;
    __pyx_t_10 = NULL;
  } else {
    __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_results); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1611, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_10 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1611, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_10)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 1611, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1611, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 1611, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1611, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_10(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1611, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_result, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "apache_beam/runners/common.py":1612
 *     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, 1612, __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_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 1612, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1612, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1612, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1612, __pyx_L1_error)
    }
    __Pyx_XDECREF_SET(__pyx_v_tag, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "apache_beam/runners/common.py":1614
 *       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_8 = ((!(__pyx_v_self->_process_yields_batches != 0)) != 0);
    if (__pyx_t_8) {

      /* "apache_beam/runners/common.py":1616
 *       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, 1616, __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":1619
 *             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":1621
 *         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, 1621, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "apache_beam/runners/common.py":1614
 *       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":1623
 *         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, 1623, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "apache_beam/runners/common.py":1625
 *         self._verify_batch_output(result)
 * 
 *         if isinstance(result, WindowedBatch):             # <<<<<<<<<<<<<<
 *           assert isinstance(result, HomogeneousWindowedBatch)
 *           windowed_batch = result
 */
      __pyx_t_8 = __Pyx_TypeCheck(__pyx_v_result, __pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch); 
      __pyx_t_7 = (__pyx_t_8 != 0);
      if (__pyx_t_7) {

        /* "apache_beam/runners/common.py":1626
 * 
 *         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_n_s_HomogeneousWindowedBatch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1626, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_7 = PyObject_IsInstance(__pyx_v_result, __pyx_t_2); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1626, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!(__pyx_t_7 != 0))) {
            PyErr_SetNone(PyExc_AssertionError);
            __PYX_ERR(0, 1626, __pyx_L1_error)
          }
        }
        #endif

        /* "apache_beam/runners/common.py":1627
 *         if isinstance(result, WindowedBatch):
 *           assert isinstance(result, HomogeneousWindowedBatch)
 *           windowed_batch = result             # <<<<<<<<<<<<<<
 * 
 *           if (windowed_input_element is not None and
 */
        if (!(likely(((__pyx_v_result) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_result, __pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch))))) __PYX_ERR(0, 1627, __pyx_L1_error)
        __pyx_t_2 = __pyx_v_result;
        __Pyx_INCREF(__pyx_t_2);
        __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":1629
 *           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_8 = (((PyObject *)__pyx_v_windowed_input_element) != Py_None);
        __pyx_t_11 = (__pyx_t_8 != 0);
        if (__pyx_t_11) {
        } else {
          __pyx_t_7 = __pyx_t_11;
          goto __pyx_L9_bool_binop_done;
        }

        /* "apache_beam/runners/common.py":1630
 * 
 *           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_12 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1630, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_11 = ((__pyx_t_12 != 1) != 0);
        __pyx_t_7 = __pyx_t_11;
        __pyx_L9_bool_binop_done:;

        /* "apache_beam/runners/common.py":1629
 *           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_7) {

          /* "apache_beam/runners/common.py":1631
 *           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_n_s_windows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1631, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_6 = __pyx_v_windowed_input_element->windows;
          __Pyx_INCREF(__pyx_t_6);
          __pyx_t_12 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1631, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1631, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1631, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_windowed_batch), __pyx_n_s_windows, __pyx_t_3) < 0) __PYX_ERR(0, 1631, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "apache_beam/runners/common.py":1629
 *           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":1625
 *         self._verify_batch_output(result)
 * 
 *         if isinstance(result, WindowedBatch):             # <<<<<<<<<<<<<<
 *           assert isinstance(result, HomogeneousWindowedBatch)
 *           windowed_batch = result
 */
        goto __pyx_L7;
      }

      /* "apache_beam/runners/common.py":1634
 *         else:
 *           windowed_batch = (
 *               HomogeneousWindowedBatch.from_batch_and_windowed_value(             # <<<<<<<<<<<<<<
 *                   batch=result, windowed_value=windowed_input_element))
 * 
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_HomogeneousWindowedBatch); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1634, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_from_batch_and_windowed_value); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1634, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "apache_beam/runners/common.py":1635
 *           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_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1635, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_batch, __pyx_v_result) < 0) __PYX_ERR(0, 1635, __pyx_L1_error)
        if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_windowed_value, ((PyObject *)__pyx_v_windowed_input_element)) < 0) __PYX_ERR(0, 1635, __pyx_L1_error)

        /* "apache_beam/runners/common.py":1634
 *         else:
 *           windowed_batch = (
 *               HomogeneousWindowedBatch.from_batch_and_windowed_value(             # <<<<<<<<<<<<<<
 *                   batch=result, windowed_value=windowed_input_element))
 * 
 */
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1634, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch))))) __PYX_ERR(0, 1634, __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;
      }
      __pyx_L7:;

      /* "apache_beam/runners/common.py":1637
 *                   batch=result, windowed_value=windowed_input_element))
 * 
 *         output_element_count += self.output_batch_converter.get_length(             # <<<<<<<<<<<<<<
 *             windowed_batch.values)
 * 
 */
      __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_v_output_element_count); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1637, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->output_batch_converter, __pyx_n_s_get_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1637, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);

      /* "apache_beam/runners/common.py":1638
 * 
 *         output_element_count += self.output_batch_converter.get_length(
 *             windowed_batch.values)             # <<<<<<<<<<<<<<
 * 
 *         self._write_batch_to_tag(tag, windowed_batch, watermark_estimator)
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_windowed_batch), __pyx_n_s_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1638, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_13 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_13)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_13);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      __pyx_t_3 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_13, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1637, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "apache_beam/runners/common.py":1637
 *                   batch=result, windowed_value=windowed_input_element))
 * 
 *         output_element_count += self.output_batch_converter.get_length(             # <<<<<<<<<<<<<<
 *             windowed_batch.values)
 * 
 */
      __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1637, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_14 = __Pyx_PyInt_As_int64_t(__pyx_t_6); if (unlikely((__pyx_t_14 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1637, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_v_output_element_count = __pyx_t_14;

      /* "apache_beam/runners/common.py":1640
 *             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_6 = __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_6)) __PYX_ERR(0, 1640, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __pyx_L6:;

    /* "apache_beam/runners/common.py":1611
 *     #  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":1645
 *     # 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_7 = (((PyObject *)__pyx_v_self->per_element_output_counter) != Py_None);
  __pyx_t_11 = (__pyx_t_7 != 0);
  if (__pyx_t_11) {

    /* "apache_beam/runners/common.py":1646
 *     # 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_11 = ((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_11 == ((int)-1))) __PYX_ERR(0, 1646, __pyx_L1_error)

    /* "apache_beam/runners/common.py":1645
 *     # 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":1595
 *     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_6);
  __Pyx_XDECREF(__pyx_t_13);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_3handle_process_outputs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __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*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_3handle_process_outputs, METH_VARARGS|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, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  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;
  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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_windowed_input_element,&__pyx_n_s_results,&__pyx_n_s_watermark_estimator,0};
    PyObject* values[3] = {0,0,0};

    /* "apache_beam/runners/common.py":1596
 * 
 *   def handle_process_outputs(
 *       self, windowed_input_element, results, watermark_estimator=None):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue, Iterable[Any], Optional[WatermarkEstimator]) -> None
 * 
 */
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_windowed_input_element)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_results)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("handle_process_outputs", 0, 2, 3, 1); __PYX_ERR(0, 1595, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_watermark_estimator);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "handle_process_outputs") < 0)) __PYX_ERR(0, 1595, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __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_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("handle_process_outputs", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1595, __pyx_L3_error)
  __pyx_L3_error:;
  __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_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, 1, "windowed_input_element", 0))) __PYX_ERR(0, 1596, __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":1595
 *     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;
  __pyx_L0:;
  __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_TraceDeclarations
  __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_TraceFrameInit(__pyx_codeobj__99)
  __Pyx_RefNannySetupContext("handle_process_outputs", 0);
  __Pyx_TraceCall("handle_process_outputs (wrapper)", __pyx_f[0], 1595, 0, __PYX_ERR(0, 1595, __pyx_L1_error));
  __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, 1595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1648
 *       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, PyObject *__pyx_args, PyObject *__pyx_kwds); /*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":1649
 * 
 *   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_TraceDeclarations
  __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;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  int __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  int64_t __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__100)
  __Pyx_RefNannySetupContext("handle_process_batch_outputs", 0);
  __Pyx_TraceCall("handle_process_batch_outputs", __pyx_f[0], 1648, 0, __PYX_ERR(0, 1648, __pyx_L1_error));
  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":1648
 *       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 (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle_process_batch_outputs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1648, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_5handle_process_batch_outputs)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[4] = {__pyx_t_4, ((PyObject *)__pyx_v_windowed_input_batch), __pyx_v_results, __pyx_v_watermark_estimator};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1648, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[4] = {__pyx_t_4, ((PyObject *)__pyx_v_windowed_input_batch), __pyx_v_results, __pyx_v_watermark_estimator};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1648, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1648, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
          }
          __Pyx_INCREF(((PyObject *)__pyx_v_windowed_input_batch));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_windowed_input_batch));
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, ((PyObject *)__pyx_v_windowed_input_batch));
          __Pyx_INCREF(__pyx_v_results);
          __Pyx_GIVEREF(__pyx_v_results);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_results);
          __Pyx_INCREF(__pyx_v_watermark_estimator);
          __Pyx_GIVEREF(__pyx_v_watermark_estimator);
          PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_watermark_estimator);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1648, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __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_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_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":1658
 *     then dispatched to the appropriate indexed output.
 *     """
 *     if results is None:             # <<<<<<<<<<<<<<
 *       results = []
 * 
 */
  __pyx_t_7 = (__pyx_v_results == Py_None);
  __pyx_t_8 = (__pyx_t_7 != 0);
  if (__pyx_t_8) {

    /* "apache_beam/runners/common.py":1659
 *     """
 *     if results is None:
 *       results = []             # <<<<<<<<<<<<<<
 * 
 *     output_element_count = 0
 */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1659, __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":1658
 *     then dispatched to the appropriate indexed output.
 *     """
 *     if results is None:             # <<<<<<<<<<<<<<
 *       results = []
 * 
 */
  }

  /* "apache_beam/runners/common.py":1661
 *       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":1662
 * 
 *     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_9 = 0;
    __pyx_t_10 = NULL;
  } else {
    __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_results); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1662, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_10 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1662, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_10)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 1662, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1662, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 1662, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1662, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_10(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1662, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_result, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "apache_beam/runners/common.py":1663
 *     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, 1663, __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_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 1663, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1663, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1663, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1663, __pyx_L1_error)
    }
    __Pyx_XDECREF_SET(__pyx_v_tag, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "apache_beam/runners/common.py":1665
 *       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_8 = ((!(__pyx_v_self->_process_batch_yields_elements != 0)) != 0);
    if (__pyx_t_8) {

      /* "apache_beam/runners/common.py":1667
 *       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_8 = (__pyx_v_self->output_batch_converter != Py_None);
        if (unlikely(!(__pyx_t_8 != 0))) {
          PyErr_SetNone(PyExc_AssertionError);
          __PYX_ERR(0, 1667, __pyx_L1_error)
        }
      }
      #endif

      /* "apache_beam/runners/common.py":1669
 *         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, 1669, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "apache_beam/runners/common.py":1671
 *         self._verify_batch_output(result)
 * 
 *         if isinstance(result, WindowedBatch):             # <<<<<<<<<<<<<<
 *           assert isinstance(result, HomogeneousWindowedBatch)
 *           windowed_batch = result
 */
      __pyx_t_8 = __Pyx_TypeCheck(__pyx_v_result, __pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch); 
      __pyx_t_7 = (__pyx_t_8 != 0);
      if (__pyx_t_7) {

        /* "apache_beam/runners/common.py":1672
 * 
 *         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_n_s_HomogeneousWindowedBatch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1672, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_7 = PyObject_IsInstance(__pyx_v_result, __pyx_t_2); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1672, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!(__pyx_t_7 != 0))) {
            PyErr_SetNone(PyExc_AssertionError);
            __PYX_ERR(0, 1672, __pyx_L1_error)
          }
        }
        #endif

        /* "apache_beam/runners/common.py":1673
 *         if isinstance(result, WindowedBatch):
 *           assert isinstance(result, HomogeneousWindowedBatch)
 *           windowed_batch = result             # <<<<<<<<<<<<<<
 * 
 *           if (windowed_input_batch is not None and
 */
        if (!(likely(((__pyx_v_result) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_result, __pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch))))) __PYX_ERR(0, 1673, __pyx_L1_error)
        __pyx_t_2 = __pyx_v_result;
        __Pyx_INCREF(__pyx_t_2);
        __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":1675
 *           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_8 = (((PyObject *)__pyx_v_windowed_input_batch) != Py_None);
        __pyx_t_11 = (__pyx_t_8 != 0);
        if (__pyx_t_11) {
        } else {
          __pyx_t_7 = __pyx_t_11;
          goto __pyx_L9_bool_binop_done;
        }

        /* "apache_beam/runners/common.py":1676
 * 
 *           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_n_s_windows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1676, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_12 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1676, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_11 = ((__pyx_t_12 != 1) != 0);
        __pyx_t_7 = __pyx_t_11;
        __pyx_L9_bool_binop_done:;

        /* "apache_beam/runners/common.py":1675
 *           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_7) {

          /* "apache_beam/runners/common.py":1677
 *           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_n_s_windows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1677, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_windowed_input_batch), __pyx_n_s_windows); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1677, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_12 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1677, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1677, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1677, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_windowed_batch), __pyx_n_s_windows, __pyx_t_3) < 0) __PYX_ERR(0, 1677, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "apache_beam/runners/common.py":1675
 *           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":1671
 *         self._verify_batch_output(result)
 * 
 *         if isinstance(result, WindowedBatch):             # <<<<<<<<<<<<<<
 *           assert isinstance(result, HomogeneousWindowedBatch)
 *           windowed_batch = result
 */
        goto __pyx_L7;
      }

      /* "apache_beam/runners/common.py":1679
 *             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_3 = ((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_3)) __PYX_ERR(0, 1679, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_XDECREF_SET(__pyx_v_windowed_batch, ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *)__pyx_t_3));
        __pyx_t_3 = 0;
      }
      __pyx_L7:;

      /* "apache_beam/runners/common.py":1681
 *           windowed_batch = windowed_input_batch.with_values(result)
 * 
 *         output_element_count += self.output_batch_converter.get_length(             # <<<<<<<<<<<<<<
 *             windowed_batch.values)
 * 
 */
      __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_output_element_count); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1681, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->output_batch_converter, __pyx_n_s_get_length); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1681, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);

      /* "apache_beam/runners/common.py":1682
 * 
 *         output_element_count += self.output_batch_converter.get_length(
 *             windowed_batch.values)             # <<<<<<<<<<<<<<
 * 
 *         self._write_batch_to_tag(tag, windowed_batch, watermark_estimator)
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_windowed_batch), __pyx_n_s_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1682, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_13 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_13)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_13);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      __pyx_t_6 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_13, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1681, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "apache_beam/runners/common.py":1681
 *           windowed_batch = windowed_input_batch.with_values(result)
 * 
 *         output_element_count += self.output_batch_converter.get_length(             # <<<<<<<<<<<<<<
 *             windowed_batch.values)
 * 
 */
      __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1681, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_14 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_14 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1681, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_output_element_count = __pyx_t_14;

      /* "apache_beam/runners/common.py":1684
 *             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_2 = __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_2)) __PYX_ERR(0, 1684, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "apache_beam/runners/common.py":1665
 *       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":1686
 *         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_2, __pyx_n_s_HomogeneousWindowedBatch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1686, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_7 = PyObject_IsInstance(((PyObject *)__pyx_v_windowed_input_batch), __pyx_t_2); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1686, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!(__pyx_t_7 != 0))) {
          PyErr_SetNone(PyExc_AssertionError);
          __PYX_ERR(0, 1686, __pyx_L1_error)
        }
      }
      #endif

      /* "apache_beam/runners/common.py":1689
 * 
 *         windowed_value = self._maybe_propagate_windowing_info(
 *             windowed_input_batch.as_empty_windowed_value(), result)             # <<<<<<<<<<<<<<
 * 
 *         output_element_count += 1
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_windowed_input_batch), __pyx_n_s_as_empty_windowed_value); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1689, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1689, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue))))) __PYX_ERR(0, 1689, __pyx_L1_error)

      /* "apache_beam/runners/common.py":1688
 *         assert isinstance(windowed_input_batch, HomogeneousWindowedBatch)
 * 
 *         windowed_value = self._maybe_propagate_windowing_info(             # <<<<<<<<<<<<<<
 *             windowed_input_batch.as_empty_windowed_value(), result)
 * 
 */
      __pyx_t_6 = ((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_2), __pyx_v_result)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1688, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF_SET(__pyx_v_windowed_value, ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_t_6));
      __pyx_t_6 = 0;

      /* "apache_beam/runners/common.py":1691
 *             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":1693
 *         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_6 = __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_6)) __PYX_ERR(0, 1693, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __pyx_L6:;

    /* "apache_beam/runners/common.py":1662
 * 
 *     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":1698
 *     # 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_7 = (((PyObject *)__pyx_v_self->per_element_output_counter) != Py_None);
  __pyx_t_11 = (__pyx_t_7 != 0);
  if (__pyx_t_11) {

    /* "apache_beam/runners/common.py":1699
 *     # 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_11 = ((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_11 == ((int)-1))) __PYX_ERR(0, 1699, __pyx_L1_error)

    /* "apache_beam/runners/common.py":1698
 *     # 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":1648
 *       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_6);
  __Pyx_XDECREF(__pyx_t_13);
  __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_TraceReturn(__pyx_r, 0);
  __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, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __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*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_5handle_process_batch_outputs, METH_VARARGS|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, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  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;
  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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_windowed_input_batch,&__pyx_n_s_results,&__pyx_n_s_watermark_estimator,0};
    PyObject* values[3] = {0,0,0};

    /* "apache_beam/runners/common.py":1649
 * 
 *   def handle_process_batch_outputs(
 *       self, windowed_input_batch, results, watermark_estimator=None):             # <<<<<<<<<<<<<<
 *     # type: (WindowedBatch, Iterable[Any], Optional[WatermarkEstimator]) -> None
 * 
 */
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_windowed_input_batch)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_results)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("handle_process_batch_outputs", 0, 2, 3, 1); __PYX_ERR(0, 1648, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_watermark_estimator);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "handle_process_batch_outputs") < 0)) __PYX_ERR(0, 1648, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __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_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("handle_process_batch_outputs", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1648, __pyx_L3_error)
  __pyx_L3_error:;
  __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_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch, 1, "windowed_input_batch", 0))) __PYX_ERR(0, 1649, __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":1648
 *       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;
  __pyx_L0:;
  __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_TraceDeclarations
  __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_TraceFrameInit(__pyx_codeobj__100)
  __Pyx_RefNannySetupContext("handle_process_batch_outputs", 0);
  __Pyx_TraceCall("handle_process_batch_outputs (wrapper)", __pyx_f[0], 1648, 0, __PYX_ERR(0, 1648, __pyx_L1_error));
  __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, 1648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1701
 *       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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  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 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_maybe_propagate_windowing_info", 0);
  __Pyx_TraceCall("_maybe_propagate_windowing_info", __pyx_f[0], 1701, 0, __PYX_ERR(0, 1701, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1703
 *   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_ptype_11apache_beam_5utils_14windowed_value_WindowedValue); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "apache_beam/runners/common.py":1704
 *     # 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):
 */
    if (!(likely(((__pyx_v_result) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_result, __pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue))))) __PYX_ERR(0, 1704, __pyx_L1_error)
    __pyx_t_3 = __pyx_v_result;
    __Pyx_INCREF(__pyx_t_3);
    __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":1705
 *     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_1 = (((PyObject *)__pyx_v_windowed_input_element) != Py_None);
    __pyx_t_4 = (__pyx_t_1 != 0);
    if (__pyx_t_4) {
    } else {
      __pyx_t_2 = __pyx_t_4;
      goto __pyx_L5_bool_binop_done;
    }

    /* "apache_beam/runners/common.py":1706
 *       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_3 = __pyx_v_windowed_input_element->windows;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_5 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1706, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = ((__pyx_t_5 != 1) != 0);
    __pyx_t_2 = __pyx_t_4;
    __pyx_L5_bool_binop_done:;

    /* "apache_beam/runners/common.py":1705
 *     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_2) {

      /* "apache_beam/runners/common.py":1707
 *       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_3 = __pyx_v_windowed_input_element->windows;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_5 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1707, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1707, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = PyNumber_InPlaceMultiply(__pyx_v_windowed_value->windows, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1707, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GIVEREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_v_windowed_value->windows);
      __Pyx_DECREF(__pyx_v_windowed_value->windows);
      __pyx_v_windowed_value->windows = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "apache_beam/runners/common.py":1705
 *     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":1708
 *           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":1703
 *   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":1710
 *       return windowed_value
 * 
 *     elif isinstance(result, TimestampedValue):             # <<<<<<<<<<<<<<
 *       assign_context = WindowFn.AssignContext(result.timestamp, result.value)
 *       windowed_value = WindowedValue(
 */
  __pyx_t_6 = ((PyObject *)__pyx_v_11apache_beam_7runners_6common_TimestampedValue);
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_result, __pyx_t_6); 
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_4 = (__pyx_t_2 != 0);
  if (__pyx_t_4) {

    /* "apache_beam/runners/common.py":1711
 * 
 *     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_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_WindowFn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1711, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_AssignContext); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1711, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_timestamp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1711, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_value); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1711, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_10 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_3, __pyx_t_8};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1711, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_3, __pyx_t_8};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1711, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    {
      __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1711, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      if (__pyx_t_9) {
        __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_8);
      __pyx_t_3 = 0;
      __pyx_t_8 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_11, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1711, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_v_assign_context = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "apache_beam/runners/common.py":1713
 *       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_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_value); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1713, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_timestamp); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1713, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->window_fn, __pyx_n_s_assign); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1713, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_11 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_3, __pyx_v_assign_context) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_assign_context);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1713, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "apache_beam/runners/common.py":1712
 *     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_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1712, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_11);
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_11 = 0;
    __pyx_t_11 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue), __pyx_t_8, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1712, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_v_windowed_value = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_t_11);
    __pyx_t_11 = 0;

    /* "apache_beam/runners/common.py":1714
 *       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_11 = __pyx_v_windowed_input_element->windows;
    __Pyx_INCREF(__pyx_t_11);
    __pyx_t_5 = PyObject_Length(__pyx_t_11); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1714, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_4 = ((__pyx_t_5 != 1) != 0);
    if (__pyx_t_4) {

      /* "apache_beam/runners/common.py":1715
 *           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_11 = __pyx_v_windowed_input_element->windows;
      __Pyx_INCREF(__pyx_t_11);
      __pyx_t_5 = PyObject_Length(__pyx_t_11); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1715, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1715, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_8 = PyNumber_InPlaceMultiply(__pyx_v_windowed_value->windows, __pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1715, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_GIVEREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_v_windowed_value->windows);
      __Pyx_DECREF(__pyx_v_windowed_value->windows);
      __pyx_v_windowed_value->windows = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "apache_beam/runners/common.py":1714
 *       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":1716
 *       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":1710
 *       return windowed_value
 * 
 *     elif isinstance(result, TimestampedValue):             # <<<<<<<<<<<<<<
 *       assign_context = WindowFn.AssignContext(result.timestamp, result.value)
 *       windowed_value = WindowedValue(
 */
  }

  /* "apache_beam/runners/common.py":1719
 * 
 *     else:
 *       return windowed_input_element.with_value(result)             # <<<<<<<<<<<<<<
 * 
 *   def _handle_tagged_output(self, result):
 */
  /*else*/ {
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __pyx_t_8 = ((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_8)) __PYX_ERR(0, 1719, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_r = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_t_8);
    __pyx_t_8 = 0;
    goto __pyx_L0;
  }

  /* "apache_beam/runners/common.py":1701
 *       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_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_11);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1721
 *       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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_UCS4 __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_handle_tagged_output", 0);
  __Pyx_TraceCall("_handle_tagged_output", __pyx_f[0], 1721, 0, __PYX_ERR(0, 1721, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1722
 * 
 *   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;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "apache_beam/runners/common.py":1723
 *   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_n_s_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1723, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_tag = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "apache_beam/runners/common.py":1724
 *     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_3 = PyUnicode_Check(__pyx_v_tag); 
    __pyx_t_2 = ((!(__pyx_t_3 != 0)) != 0);
    if (unlikely(__pyx_t_2)) {

      /* "apache_beam/runners/common.py":1725
 *       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_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1725, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = 0;
      __pyx_t_5 = 127;
      __Pyx_INCREF(__pyx_kp_u_In);
      __pyx_t_4 += 3;
      __Pyx_GIVEREF(__pyx_kp_u_In);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_In);
      __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(((PyObject *)__pyx_v_self)), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1725, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_5;
      __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_INCREF(__pyx_kp_u_tag_2);
      __pyx_t_4 += 6;
      __Pyx_GIVEREF(__pyx_kp_u_tag_2);
      PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_tag_2);
      __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_tag), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1725, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_5;
      __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_INCREF(__pyx_kp_u_is_not_a_string);
      __pyx_t_4 += 16;
      __Pyx_GIVEREF(__pyx_kp_u_is_not_a_string);
      PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u_is_not_a_string);
      __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1725, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1725, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 1725, __pyx_L1_error)

      /* "apache_beam/runners/common.py":1724
 *     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":1726
 *       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_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1726, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1726, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_tag);
    __Pyx_GIVEREF(__pyx_v_tag);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_tag);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_r = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "apache_beam/runners/common.py":1722
 * 
 *   def _handle_tagged_output(self, result):
 *     if isinstance(result, TaggedOutput):             # <<<<<<<<<<<<<<
 *       tag = result.tag
 *       if not isinstance(tag, str):
 */
  }

  /* "apache_beam/runners/common.py":1727
 *         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_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_6, 0, Py_None);
  __Pyx_INCREF(__pyx_v_result);
  __Pyx_GIVEREF(__pyx_v_result);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_result);
  __pyx_r = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "apache_beam/runners/common.py":1721
 *       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_6);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1729
 *     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_TraceDeclarations
  __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_write_value_to_tag", 0);
  __Pyx_TraceCall("_write_value_to_tag", __pyx_f[0], 1729, 0, __PYX_ERR(0, 1729, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1730
 * 
 *   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);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "apache_beam/runners/common.py":1731
 *   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_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_watermark_estimator, __pyx_n_s_observe_timestamp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1731, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_windowed_value), __pyx_n_s_timestamp); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1731, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1731, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "apache_beam/runners/common.py":1730
 * 
 *   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":1733
 *       watermark_estimator.observe_timestamp(windowed_value.timestamp)
 * 
 *     if tag is None:             # <<<<<<<<<<<<<<
 *       self.main_receivers.receive(windowed_value)
 *     else:
 */
  __pyx_t_2 = (__pyx_v_tag == Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "apache_beam/runners/common.py":1734
 * 
 *     if tag is None:
 *       self.main_receivers.receive(windowed_value)             # <<<<<<<<<<<<<<
 *     else:
 *       self.tagged_receivers[tag].receive(windowed_value)
 */
    __pyx_t_3 = ((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_3)) __PYX_ERR(0, 1734, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "apache_beam/runners/common.py":1733
 *       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":1736
 *       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_4 = __Pyx_PyObject_GetItem(__pyx_v_self->tagged_receivers, __pyx_v_tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1736, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_receive); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1736, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, ((PyObject *)__pyx_v_windowed_value)) : __Pyx_PyObject_CallOneArg(__pyx_t_5, ((PyObject *)__pyx_v_windowed_value));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1736, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_L4:;

  /* "apache_beam/runners/common.py":1729
 *     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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1738
 *       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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  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)(PyObject *);
  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("_write_batch_to_tag", 0);
  __Pyx_TraceCall("_write_batch_to_tag", __pyx_f[0], 1738, 0, __PYX_ERR(0, 1738, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1739
 * 
 *   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);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "apache_beam/runners/common.py":1740
 *   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_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_windowed_batch), __pyx_n_s_timestamps); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1740, __pyx_L1_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_5 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1740, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1740, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    for (;;) {
      if (likely(!__pyx_t_6)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1740, __pyx_L1_error)
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1740, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        } else {
          if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1740, __pyx_L1_error)
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1740, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_6(__pyx_t_4);
        if (unlikely(!__pyx_t_3)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1740, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_v_timestamp, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "apache_beam/runners/common.py":1741
 *     if watermark_estimator is not None:
 *       for timestamp in windowed_batch.timestamps:
 *         watermark_estimator.observe_timestamp(timestamp)             # <<<<<<<<<<<<<<
 * 
 *     if tag is None:
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_watermark_estimator, __pyx_n_s_observe_timestamp); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1741, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_timestamp) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_timestamp);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1741, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "apache_beam/runners/common.py":1740
 *   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_4); __pyx_t_4 = 0;

    /* "apache_beam/runners/common.py":1739
 * 
 *   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":1743
 *         watermark_estimator.observe_timestamp(timestamp)
 * 
 *     if tag is None:             # <<<<<<<<<<<<<<
 *       self.main_receivers.receive_batch(windowed_batch)
 *     else:
 */
  __pyx_t_2 = (__pyx_v_tag == Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "apache_beam/runners/common.py":1744
 * 
 *     if tag is None:
 *       self.main_receivers.receive_batch(windowed_batch)             # <<<<<<<<<<<<<<
 *     else:
 *       self.tagged_receivers[tag].receive_batch(windowed_batch)
 */
    __pyx_t_4 = ((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_4)) __PYX_ERR(0, 1744, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "apache_beam/runners/common.py":1743
 *         watermark_estimator.observe_timestamp(timestamp)
 * 
 *     if tag is None:             # <<<<<<<<<<<<<<
 *       self.main_receivers.receive_batch(windowed_batch)
 *     else:
 */
    goto __pyx_L6;
  }

  /* "apache_beam/runners/common.py":1746
 *       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_3 = __Pyx_PyObject_GetItem(__pyx_v_self->tagged_receivers, __pyx_v_tag); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1746, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_receive_batch); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1746, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_3, ((PyObject *)__pyx_v_windowed_batch)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_v_windowed_batch));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1746, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_L6:;

  /* "apache_beam/runners/common.py":1738
 *       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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1748
 *       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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  Py_UCS4 __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("_verify_batch_output", 0);
  __Pyx_TraceCall("_verify_batch_output", __pyx_f[0], 1748, 0, __PYX_ERR(0, 1748, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1749
 * 
 *   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_ptype_11apache_beam_5utils_14windowed_value_WindowedValue); 
  __pyx_t_3 = (__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_TypeCheck(__pyx_v_result, __pyx_v_11apache_beam_7runners_6common_TimestampedValue); 
  __pyx_t_2 = (__pyx_t_3 != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (unlikely(__pyx_t_2)) {

    /* "apache_beam/runners/common.py":1751
 *     if isinstance(result, (WindowedValue, TimestampedValue)):
 *       raise TypeError(
 *           f"Received {type(result).__name__} from DoFn that was "             # <<<<<<<<<<<<<<
 *           "expected to produce a batch.")
 * 
 */
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1751, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 0;
    __pyx_t_6 = 127;
    __Pyx_INCREF(__pyx_kp_u_Received);
    __pyx_t_5 += 9;
    __Pyx_GIVEREF(__pyx_kp_u_Received);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_Received);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_result)), __pyx_n_s_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1751, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1751, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) : __pyx_t_6;
    __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_8);
    __pyx_t_8 = 0;
    __Pyx_INCREF(__pyx_kp_u_from_DoFn_that_was_expected_to);
    __pyx_t_5 += 48;
    __Pyx_GIVEREF(__pyx_kp_u_from_DoFn_that_was_expected_to);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_from_DoFn_that_was_expected_to);
    __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1751, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "apache_beam/runners/common.py":1750
 *   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 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1750, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 1750, __pyx_L1_error)

    /* "apache_beam/runners/common.py":1749
 * 
 *   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":1748
 *       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_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1754
 *           "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, PyObject *__pyx_v_results); /*proto*/
static char __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)__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_7start_bundle_outputs, METH_O, __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, PyObject *__pyx_v_results) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("start_bundle_outputs (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6common_14_OutputHandler_6start_bundle_outputs(((struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *)__pyx_v_self), ((PyObject *)__pyx_v_results));

  /* function exit code */
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  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_TraceFrameInit(__pyx_codeobj__101)
  __Pyx_RefNannySetupContext("start_bundle_outputs", 0);
  __Pyx_TraceCall("start_bundle_outputs", __pyx_f[0], 1754, 0, __PYX_ERR(0, 1754, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1756
 *   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);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "apache_beam/runners/common.py":1757
 *     """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":1756
 *   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":1759
 *       return
 *     raise RuntimeError(
 *         'Start Bundle should not output any elements but got %s' % results)             # <<<<<<<<<<<<<<
 * 
 *   def finish_bundle_outputs(self, results):
 */
  __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Start_Bundle_should_not_output_a, __pyx_v_results); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "apache_beam/runners/common.py":1758
 *     if results is None:
 *       return
 *     raise RuntimeError(             # <<<<<<<<<<<<<<
 *         'Start Bundle should not output any elements but got %s' % results)
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __PYX_ERR(0, 1758, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1754
 *           "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_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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1761
 *         '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, PyObject *__pyx_v_results); /*proto*/
static char __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)__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_9finish_bundle_outputs, METH_O, __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, PyObject *__pyx_v_results) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("finish_bundle_outputs (wrapper)", 0);
  __pyx_r = __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));

  /* function exit code */
  __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_TraceDeclarations
  __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)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  Py_UCS4 __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_TraceFrameInit(__pyx_codeobj__102)
  __Pyx_RefNannySetupContext("finish_bundle_outputs", 0);
  __Pyx_TraceCall("finish_bundle_outputs", __pyx_f[0], 1761, 0, __PYX_ERR(0, 1761, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1767
 *     then dispatched to the appropriate indexed output.
 *     """
 *     if results is None:             # <<<<<<<<<<<<<<
 *       return
 * 
 */
  __pyx_t_1 = (__pyx_v_results == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "apache_beam/runners/common.py":1768
 *     """
 *     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":1767
 *     then dispatched to the appropriate indexed output.
 *     """
 *     if results is None:             # <<<<<<<<<<<<<<
 *       return
 * 
 */
  }

  /* "apache_beam/runners/common.py":1770
 *       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_3 = __pyx_v_results; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_results); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1770, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1770, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1770, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1770, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1770, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1770, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      }
    } else {
      __pyx_t_6 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_6)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1770, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF_SET(__pyx_v_result, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "apache_beam/runners/common.py":1771
 * 
 *     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":1772
 *     for result in results:
 *       tag = None
 *       if isinstance(result, TaggedOutput):             # <<<<<<<<<<<<<<
 *         tag = result.tag
 *         if not isinstance(tag, str):
 */
    __pyx_t_6 = ((PyObject *)__pyx_v_11apache_beam_7runners_6common_TaggedOutput);
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_result, __pyx_t_6); 
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (__pyx_t_1) {

      /* "apache_beam/runners/common.py":1773
 *       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_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_tag); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1773, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF_SET(__pyx_v_tag, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "apache_beam/runners/common.py":1774
 *       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_2 = ((!(__pyx_t_1 != 0)) != 0);
      if (unlikely(__pyx_t_2)) {

        /* "apache_beam/runners/common.py":1775
 *         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_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1775, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = 0;
        __pyx_t_8 = 127;
        __Pyx_INCREF(__pyx_kp_u_In);
        __pyx_t_7 += 3;
        __Pyx_GIVEREF(__pyx_kp_u_In);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_In);
        __pyx_t_9 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(((PyObject *)__pyx_v_self)), __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1775, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
        __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_9);
        PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_9);
        __pyx_t_9 = 0;
        __Pyx_INCREF(__pyx_kp_u_tag_2);
        __pyx_t_7 += 6;
        __Pyx_GIVEREF(__pyx_kp_u_tag_2);
        PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_tag_2);
        __pyx_t_9 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_tag), __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1775, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
        __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_9);
        PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_9);
        __pyx_t_9 = 0;
        __Pyx_INCREF(__pyx_kp_u_is_not_a_string);
        __pyx_t_7 += 16;
        __Pyx_GIVEREF(__pyx_kp_u_is_not_a_string);
        PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_kp_u_is_not_a_string);
        __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_6, 5, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1775, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1775, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_Raise(__pyx_t_6, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __PYX_ERR(0, 1775, __pyx_L1_error)

        /* "apache_beam/runners/common.py":1774
 *       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":1776
 *         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_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_value); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1776, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "apache_beam/runners/common.py":1772
 *     for result in results:
 *       tag = None
 *       if isinstance(result, TaggedOutput):             # <<<<<<<<<<<<<<
 *         tag = result.tag
 *         if not isinstance(tag, str):
 */
    }

    /* "apache_beam/runners/common.py":1778
 *         result = result.value
 * 
 *       if isinstance(result, WindowedValue):             # <<<<<<<<<<<<<<
 *         windowed_value = result
 *       else:
 */
    __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_result, __pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue); 
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (likely(__pyx_t_1)) {

      /* "apache_beam/runners/common.py":1779
 * 
 *       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":1778
 *         result = result.value
 * 
 *       if isinstance(result, WindowedValue):             # <<<<<<<<<<<<<<
 *         windowed_value = result
 *       else:
 */
      goto __pyx_L8;
    }

    /* "apache_beam/runners/common.py":1781
 *         windowed_value = result
 *       else:
 *         raise RuntimeError('Finish Bundle should only output WindowedValue ' +\             # <<<<<<<<<<<<<<
 *                            'type but got %s' % type(result))
 * 
 */
    /*else*/ {

      /* "apache_beam/runners/common.py":1782
 *       else:
 *         raise RuntimeError('Finish Bundle should only output WindowedValue ' +\
 *                            'type but got %s' % type(result))             # <<<<<<<<<<<<<<
 * 
 *       if tag is None:
 */
      __pyx_t_6 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_type_but_got_s, ((PyObject *)Py_TYPE(__pyx_v_result))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1782, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);

      /* "apache_beam/runners/common.py":1781
 *         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_kp_u_Finish_Bundle_should_only_output, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1781, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1781, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __PYX_ERR(0, 1781, __pyx_L1_error)
    }
    __pyx_L8:;

    /* "apache_beam/runners/common.py":1784
 *                            'type but got %s' % type(result))
 * 
 *       if tag is None:             # <<<<<<<<<<<<<<
 *         self.main_receivers.receive(windowed_value)
 *       else:
 */
    __pyx_t_1 = (__pyx_v_tag == Py_None);
    __pyx_t_2 = (__pyx_t_1 != 0);
    if (__pyx_t_2) {

      /* "apache_beam/runners/common.py":1785
 * 
 *       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_ptype_11apache_beam_5utils_14windowed_value_WindowedValue))))) __PYX_ERR(0, 1785, __pyx_L1_error)
      __pyx_t_6 = ((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_6)) __PYX_ERR(0, 1785, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "apache_beam/runners/common.py":1784
 *                            '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":1787
 *         self.main_receivers.receive(windowed_value)
 *       else:
 *         self.tagged_receivers[tag].receive(windowed_value)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    /*else*/ {
      __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_v_self->tagged_receivers, __pyx_v_tag); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1787, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_receive); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1787, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_10, function);
        }
      }
      __pyx_t_6 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_9, __pyx_v_windowed_value) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_windowed_value);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1787, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __pyx_L9:;

    /* "apache_beam/runners/common.py":1770
 *       return
 * 
 *     for result in results:             # <<<<<<<<<<<<<<
 *       tag = None
 *       if isinstance(result, TaggedOutput):
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "apache_beam/runners/common.py":1761
 *         '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_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __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_TraceReturn(__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_14_OutputHandler_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_14_OutputHandler_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_11__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __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_TraceDeclarations
  __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_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__103)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(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:
 */
  __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);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->main_receivers));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->main_receivers));
  PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_v_self->main_receivers));
  __Pyx_INCREF(__pyx_v_self->output_batch_converter);
  __Pyx_GIVEREF(__pyx_v_self->output_batch_converter);
  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_self->output_batch_converter);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->per_element_output_counter));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->per_element_output_counter));
  PyTuple_SET_ITEM(__pyx_t_3, 4, ((PyObject *)__pyx_v_self->per_element_output_counter));
  __Pyx_INCREF(__pyx_v_self->tagged_receivers);
  __Pyx_GIVEREF(__pyx_v_self->tagged_receivers);
  PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_self->tagged_receivers);
  __Pyx_INCREF(__pyx_v_self->window_fn);
  __Pyx_GIVEREF(__pyx_v_self->window_fn);
  PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_v_self->window_fn);
  __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:
 *         state += (_dict,)
 */
  __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_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:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_4 = (__pyx_v__dict != Py_None);
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         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);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict);
    __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:
 *         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:             # <<<<<<<<<<<<<<
 *         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), 0xca1400f, None), state
 */
  /*else*/ {
    __pyx_t_4 = (((PyObject *)__pyx_v_self->main_receivers) != Py_None);
    __pyx_t_6 = (__pyx_t_4 != 0);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (__pyx_v_self->output_batch_converter != Py_None);
    __pyx_t_4 = (__pyx_t_6 != 0);
    if (!__pyx_t_4) {
    } else {
      __pyx_t_5 = __pyx_t_4;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_4 = (((PyObject *)__pyx_v_self->per_element_output_counter) != Py_None);
    __pyx_t_6 = (__pyx_t_4 != 0);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (__pyx_v_self->tagged_receivers != Py_None);
    __pyx_t_4 = (__pyx_t_6 != 0);
    if (!__pyx_t_4) {
    } else {
      __pyx_t_5 = __pyx_t_4;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_4 = (__pyx_v_self->window_fn != Py_None);
    __pyx_t_6 = (__pyx_t_4 != 0);
    __pyx_t_5 = __pyx_t_6;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_5;
  }
  __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), 0xca1400f, None), state
 *     else:
 */
  __pyx_t_5 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_5) {

    /* "(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), 0xca1400f, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle__OutputHandler, (type(self), 0xca1400f, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_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))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_211894287);
    __Pyx_GIVEREF(__pyx_int_211894287);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_211894287);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);
    __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);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __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), 0xca1400f, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle__OutputHandler, (type(self), 0xca1400f, None), state
 *     else:
 *         return __pyx_unpickle__OutputHandler, (type(self), 0xca1400f, 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_n_s_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))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_211894287);
    __Pyx_GIVEREF(__pyx_int_211894287);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_211894287);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state);
    __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);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
    __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__OutputHandler, (type(self), 0xca1400f, 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, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_14_OutputHandler_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_13__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __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));

  /* function exit code */
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__104)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 16, 0, __PYX_ERR(1, 16, __pyx_L1_error));

  /* "(tree fragment)":17
 *         return __pyx_unpickle__OutputHandler, (type(self), 0xca1400f, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__OutputHandler__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6common___pyx_unpickle__OutputHandler__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__OutputHandler, (type(self), 0xca1400f, 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_AddTraceback("apache_beam.runners.common._OutputHandler.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1794
 *   NO_VALUE = object()
 * 
 *   def __init__(self, value, timestamp=NO_VALUE):             # <<<<<<<<<<<<<<
 *     self.value = value
 *     self._timestamp = timestamp
 */

static PyObject *__pyx_pf_11apache_beam_7runners_6common_26__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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_TraceCall("__defaults__", __pyx_f[0], 1794, 0, __PYX_ERR(0, 1794, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_timestamp);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_timestamp);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_timestamp);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_10_NoContext_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10_NoContext_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10_NoContext_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_10_NoContext_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_timestamp = 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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,&__pyx_n_s_timestamp,0};
    PyObject* values[3] = {0,0,0};
    __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self);
    values[2] = __pyx_dynamic_args->__pyx_arg_timestamp;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); __PYX_ERR(0, 1794, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timestamp);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1794, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_value = values[1];
    __pyx_v_timestamp = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1794, __pyx_L3_error)
  __pyx_L3_error:;
  __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 */
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__105)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 1794, 0, __PYX_ERR(0, 1794, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1795
 * 
 *   def __init__(self, value, timestamp=NO_VALUE):
 *     self.value = value             # <<<<<<<<<<<<<<
 *     self._timestamp = timestamp
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_value, __pyx_v_value) < 0) __PYX_ERR(0, 1795, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1796
 *   def __init__(self, value, timestamp=NO_VALUE):
 *     self.value = value
 *     self._timestamp = timestamp             # <<<<<<<<<<<<<<
 * 
 *   @property
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_timestamp_2, __pyx_v_timestamp) < 0) __PYX_ERR(0, 1796, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1794
 *   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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1799
 * 
 *   @property
 *   def timestamp(self):             # <<<<<<<<<<<<<<
 *     if self._timestamp is self.NO_VALUE:
 *       raise ValueError('No timestamp in this context.')
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_10_NoContext_3timestamp(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10_NoContext_3timestamp = {"timestamp", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_10_NoContext_3timestamp, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_10_NoContext_3timestamp(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("timestamp (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6common_10_NoContext_2timestamp(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__106)
  __Pyx_RefNannySetupContext("timestamp", 0);
  __Pyx_TraceCall("timestamp", __pyx_f[0], 1799, 0, __PYX_ERR(0, 1799, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1800
 *   @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_n_s_timestamp_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1800, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NO_VALUE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1800, __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;
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (unlikely(__pyx_t_4)) {

    /* "apache_beam/runners/common.py":1801
 *   def timestamp(self):
 *     if self._timestamp is self.NO_VALUE:
 *       raise ValueError('No timestamp in this context.')             # <<<<<<<<<<<<<<
 *     else:
 *       return self._timestamp
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__107, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1801, __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, 1801, __pyx_L1_error)

    /* "apache_beam/runners/common.py":1800
 *   @property
 *   def timestamp(self):
 *     if self._timestamp is self.NO_VALUE:             # <<<<<<<<<<<<<<
 *       raise ValueError('No timestamp in this context.')
 *     else:
 */
  }

  /* "apache_beam/runners/common.py":1803
 *       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_n_s_timestamp_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1803, __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":1799
 * 
 *   @property
 *   def timestamp(self):             # <<<<<<<<<<<<<<
 *     if self._timestamp is self.NO_VALUE:
 *       raise ValueError('No timestamp 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.timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1806
 * 
 *   @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, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10_NoContext_5existing_windows = {"existing_windows", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_10_NoContext_5existing_windows, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_10_NoContext_5existing_windows(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("existing_windows (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6common_10_NoContext_4existing_windows(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__108)
  __Pyx_RefNannySetupContext("existing_windows", 0);
  __Pyx_TraceCall("existing_windows", __pyx_f[0], 1806, 0, __PYX_ERR(0, 1806, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1807
 *   @property
 *   def existing_windows(self):
 *     raise ValueError('No existing_windows in this context.')             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__109, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1807, __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, 1807, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1806
 * 
 *   @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_AddTraceback("apache_beam.runners.common._NoContext.existing_windows", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1815
 *   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, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_9DoFnState_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_9DoFnState_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_9DoFnState_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_counter_factory = 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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_counter_factory_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_counter_factory_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 1815, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1815, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_counter_factory = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1815, __pyx_L3_error)
  __pyx_L3_error:;
  __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 */
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__110)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 1815, 0, __PYX_ERR(0, 1815, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1816
 *   """
 *   def __init__(self, counter_factory):
 *     self.step_name = ''             # <<<<<<<<<<<<<<
 *     self._counter_factory = counter_factory
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_step_name, __pyx_kp_u__111) < 0) __PYX_ERR(0, 1816, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1817
 *   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_n_s_counter_factory, __pyx_v_counter_factory) < 0) __PYX_ERR(0, 1817, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1815
 *   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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1819
 *     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, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __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*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_9DoFnState_3counter_for, METH_VARARGS|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, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_aggregator = 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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_aggregator,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_aggregator)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("counter_for", 1, 2, 2, 1); __PYX_ERR(0, 1819, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "counter_for") < 0)) __PYX_ERR(0, 1819, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_aggregator = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("counter_for", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1819, __pyx_L3_error)
  __pyx_L3_error:;
  __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 */
  __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_TraceDeclarations
  __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;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__112)
  __Pyx_RefNannySetupContext("counter_for", 0);
  __Pyx_TraceCall("counter_for", __pyx_f[0], 1819, 0, __PYX_ERR(0, 1819, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1821
 *   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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_counter_factory); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get_aggregator_counter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":1822
 *     """Looks up the counter for this aggregator, creating one if necessary."""
 *     return self._counter_factory.get_aggregator_counter(
 *         self.step_name, aggregator)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_step_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_2, __pyx_v_aggregator};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1821, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_2, __pyx_v_aggregator};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1821, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1821, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_aggregator);
    __Pyx_GIVEREF(__pyx_v_aggregator);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_aggregator);
    __pyx_t_2 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1821, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/runners/common.py":1819
 *     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_XDECREF(__pyx_t_6);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1828
 * 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_label,&__pyx_n_s_element,&__pyx_n_s_state,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_label)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_element);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_state);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1828, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_label = values[0];
    __pyx_v_element = values[1];
    __pyx_v_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1828, __pyx_L3_error)
  __pyx_L3_error:;
  __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 */
  __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_TraceDeclarations
  __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("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 1828, 0, __PYX_ERR(0, 1828, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1829
 *   """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":1830
 *   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":1831
 *     self.label = label
 *     self.state = state
 *     if element is not None:             # <<<<<<<<<<<<<<
 *       self.set_element(element)
 * 
 */
  __pyx_t_1 = (__pyx_v_element != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "apache_beam/runners/common.py":1832
 *     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_ptype_11apache_beam_5utils_14windowed_value_WindowedValue))))) __PYX_ERR(0, 1832, __pyx_L1_error)
    __pyx_t_3 = ((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_3)) __PYX_ERR(0, 1832, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "apache_beam/runners/common.py":1831
 *     self.label = label
 *     self.state = state
 *     if element is not None:             # <<<<<<<<<<<<<<
 *       self.set_element(element)
 * 
 */
  }

  /* "apache_beam/runners/common.py":1828
 * 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_3);
  __Pyx_AddTraceback("apache_beam.runners.common.DoFnContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1834
 *       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, PyObject *__pyx_v_windowed_value); /*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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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_TraceFrameInit(__pyx_codeobj__113)
  __Pyx_RefNannySetupContext("set_element", 0);
  __Pyx_TraceCall("set_element", __pyx_f[0], 1834, 0, __PYX_ERR(0, 1834, __pyx_L1_error));
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1834, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_7runners_6common_11DoFnContext_3set_element)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_windowed_value)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_windowed_value));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1834, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __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_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_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":1836
 *   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(__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":1834
 *       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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnContext_3set_element(PyObject *__pyx_v_self, PyObject *__pyx_v_windowed_value); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_11DoFnContext_3set_element = {"set_element", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_11DoFnContext_3set_element, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnContext_3set_element(PyObject *__pyx_v_self, PyObject *__pyx_v_windowed_value) {
  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 (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_windowed_value), __pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, 1, "windowed_value", 0))) __PYX_ERR(0, 1834, __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), ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_v_windowed_value));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__113)
  __Pyx_RefNannySetupContext("set_element", 0);
  __Pyx_TraceCall("set_element (wrapper)", __pyx_f[0], 1834, 0, __PYX_ERR(0, 1834, __pyx_L1_error));
  __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, 1834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1839
 * 
 *   @property
 *   def element(self):             # <<<<<<<<<<<<<<
 *     if self.windowed_value is None:
 *       raise AttributeError('element not accessible in this context')
 */

/* 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) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __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_TraceDeclarations
  __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__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 1839, 0, __PYX_ERR(0, 1839, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1840
 *   @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);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (unlikely(__pyx_t_2)) {

    /* "apache_beam/runners/common.py":1841
 *   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 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__114, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1841, __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, 1841, __pyx_L1_error)

    /* "apache_beam/runners/common.py":1840
 *   @property
 *   def element(self):
 *     if self.windowed_value is None:             # <<<<<<<<<<<<<<
 *       raise AttributeError('element not accessible in this context')
 *     else:
 */
  }

  /* "apache_beam/runners/common.py":1843
 *       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":1839
 * 
 *   @property
 *   def element(self):             # <<<<<<<<<<<<<<
 *     if self.windowed_value is None:
 *       raise AttributeError('element not accessible in this context')
 */

  /* function exit code */
  __pyx_L1_error:;
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1846
 * 
 *   @property
 *   def timestamp(self):             # <<<<<<<<<<<<<<
 *     if self.windowed_value is None:
 *       raise AttributeError('timestamp not accessible in this context')
 */

/* 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) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __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_TraceDeclarations
  __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__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 1846, 0, __PYX_ERR(0, 1846, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1847
 *   @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);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (unlikely(__pyx_t_2)) {

    /* "apache_beam/runners/common.py":1848
 *   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 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__115, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1848, __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, 1848, __pyx_L1_error)

    /* "apache_beam/runners/common.py":1847
 *   @property
 *   def timestamp(self):
 *     if self.windowed_value is None:             # <<<<<<<<<<<<<<
 *       raise AttributeError('timestamp not accessible in this context')
 *     else:
 */
  }

  /* "apache_beam/runners/common.py":1850
 *       raise AttributeError('timestamp not accessible in this context')
 *     else:
 *       return self.windowed_value.timestamp             # <<<<<<<<<<<<<<
 * 
 *   @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->windowed_value), __pyx_n_s_timestamp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1850, __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":1846
 * 
 *   @property
 *   def timestamp(self):             # <<<<<<<<<<<<<<
 *     if self.windowed_value is None:
 *       raise AttributeError('timestamp not accessible in this context')
 */

  /* function exit code */
  __pyx_L1_error:;
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1853
 * 
 *   @property
 *   def windows(self):             # <<<<<<<<<<<<<<
 *     if self.windowed_value is None:
 *       raise AttributeError('windows not accessible in this context')
 */

/* 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) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __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_TraceDeclarations
  __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__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 1853, 0, __PYX_ERR(0, 1853, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1854
 *   @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);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (unlikely(__pyx_t_2)) {

    /* "apache_beam/runners/common.py":1855
 *   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 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__116, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1855, __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, 1855, __pyx_L1_error)

    /* "apache_beam/runners/common.py":1854
 *   @property
 *   def windows(self):
 *     if self.windowed_value is None:             # <<<<<<<<<<<<<<
 *       raise AttributeError('windows not accessible in this context')
 *     else:
 */
  }

  /* "apache_beam/runners/common.py":1857
 *       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":1853
 * 
 *   @property
 *   def windows(self):             # <<<<<<<<<<<<<<
 *     if self.windowed_value is None:
 *       raise AttributeError('windows not accessible in this context')
 */

  /* function exit code */
  __pyx_L1_error:;
  __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_TraceReturn(__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_11DoFnContext_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_11DoFnContext_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_11DoFnContext_5__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnContext_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__117)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(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:
 */
  __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);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->label);
  __Pyx_INCREF(__pyx_v_self->state);
  __Pyx_GIVEREF(__pyx_v_self->state);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->state);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->windowed_value));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->windowed_value));
  PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_self->windowed_value));
  __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:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_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:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         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);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __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:
 *         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:             # <<<<<<<<<<<<<<
 *         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), 0x1b535c7, None), state
 */
  /*else*/ {
    __pyx_t_2 = (__pyx_v_self->label != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->state != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_2 = (((PyObject *)__pyx_v_self->windowed_value) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    __pyx_t_3 = __pyx_t_5;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __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), 0x1b535c7, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(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), 0x1b535c7, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_DoFnContext, (type(self), 0x1b535c7, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_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))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_28652999);
    __Pyx_GIVEREF(__pyx_int_28652999);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_28652999);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 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), 0x1b535c7, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_DoFnContext, (type(self), 0x1b535c7, None), state
 *     else:
 *         return __pyx_unpickle_DoFnContext, (type(self), 0x1b535c7, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_DoFnContext__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_DoFnContext); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __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))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_28652999);
    __Pyx_GIVEREF(__pyx_int_28652999);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_28652999);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __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_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 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_6);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DoFnContext, (type(self), 0x1b535c7, 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, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_11DoFnContext_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_11DoFnContext_7__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnContext_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __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));

  /* function exit code */
  __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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__118)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 16, 0, __PYX_ERR(1, 16, __pyx_L1_error));

  /* "(tree fragment)":17
 *         return __pyx_unpickle_DoFnContext, (type(self), 0x1b535c7, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_DoFnContext__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6common___pyx_unpickle_DoFnContext__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DoFnContext, (type(self), 0x1b535c7, 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_AddTraceback("apache_beam.runners.common.DoFnContext.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1860
 * 
 * 
 * def group_by_key_input_visitor(deterministic_key_coders=True):             # <<<<<<<<<<<<<<
 *   # Importing here to avoid a circular dependency
 *   # pylint: disable=wrong-import-order, wrong-import-position
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_3group_by_key_input_visitor(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_3group_by_key_input_visitor = {"group_by_key_input_visitor", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_3group_by_key_input_visitor, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_3group_by_key_input_visitor(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_deterministic_key_coders = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("group_by_key_input_visitor (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_deterministic_key_coders,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)((PyObject *)Py_True));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_deterministic_key_coders);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_by_key_input_visitor") < 0)) __PYX_ERR(0, 1860, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_deterministic_key_coders = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("group_by_key_input_visitor", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1860, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.group_by_key_input_visitor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6common_2group_by_key_input_visitor(__pyx_self, __pyx_v_deterministic_key_coders);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1873
 *     we could directly replace the coder instead of mutating the element type.
 *     """
 *     def __init__(self, deterministic_key_coders=True):             # <<<<<<<<<<<<<<
 *       self.deterministic_key_coders = deterministic_key_coders
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_26group_by_key_input_visitor_22GroupByKeyInputVisitor_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_26group_by_key_input_visitor_22GroupByKeyInputVisitor_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_26group_by_key_input_visitor_22GroupByKeyInputVisitor_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_26group_by_key_input_visitor_22GroupByKeyInputVisitor_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_deterministic_key_coders = 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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_deterministic_key_coders,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject *)Py_True));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_deterministic_key_coders);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1873, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_deterministic_key_coders = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1873, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.group_by_key_input_visitor.GroupByKeyInputVisitor.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6common_26group_by_key_input_visitor_22GroupByKeyInputVisitor___init__(__pyx_self, __pyx_v_self, __pyx_v_deterministic_key_coders);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_11apache_beam_7runners_6common_26group_by_key_input_visitor_22GroupByKeyInputVisitor___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_deterministic_key_coders) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 1873, 0, __PYX_ERR(0, 1873, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1874
 *     """
 *     def __init__(self, deterministic_key_coders=True):
 *       self.deterministic_key_coders = deterministic_key_coders             # <<<<<<<<<<<<<<
 * 
 *     def enter_composite_transform(self, transform_node):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_deterministic_key_coders, __pyx_v_deterministic_key_coders) < 0) __PYX_ERR(0, 1874, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1873
 *     we could directly replace the coder instead of mutating the element type.
 *     """
 *     def __init__(self, deterministic_key_coders=True):             # <<<<<<<<<<<<<<
 *       self.deterministic_key_coders = deterministic_key_coders
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.group_by_key_input_visitor.GroupByKeyInputVisitor.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1876
 *       self.deterministic_key_coders = deterministic_key_coders
 * 
 *     def enter_composite_transform(self, transform_node):             # <<<<<<<<<<<<<<
 *       self.visit_transform(transform_node)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_26group_by_key_input_visitor_22GroupByKeyInputVisitor_3enter_composite_transform(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_26group_by_key_input_visitor_22GroupByKeyInputVisitor_3enter_composite_transform = {"enter_composite_transform", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_26group_by_key_input_visitor_22GroupByKeyInputVisitor_3enter_composite_transform, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_26group_by_key_input_visitor_22GroupByKeyInputVisitor_3enter_composite_transform(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_transform_node = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("enter_composite_transform (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_transform_node,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_transform_node)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("enter_composite_transform", 1, 2, 2, 1); __PYX_ERR(0, 1876, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "enter_composite_transform") < 0)) __PYX_ERR(0, 1876, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_transform_node = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("enter_composite_transform", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1876, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.group_by_key_input_visitor.GroupByKeyInputVisitor.enter_composite_transform", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6common_26group_by_key_input_visitor_22GroupByKeyInputVisitor_2enter_composite_transform(__pyx_self, __pyx_v_self, __pyx_v_transform_node);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_11apache_beam_7runners_6common_26group_by_key_input_visitor_22GroupByKeyInputVisitor_2enter_composite_transform(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_transform_node) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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("enter_composite_transform", 0);
  __Pyx_TraceCall("enter_composite_transform", __pyx_f[0], 1876, 0, __PYX_ERR(0, 1876, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1877
 * 
 *     def enter_composite_transform(self, transform_node):
 *       self.visit_transform(transform_node)             # <<<<<<<<<<<<<<
 * 
 *     def visit_transform(self, transform_node):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_visit_transform); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_transform_node) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_transform_node);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1877, __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/common.py":1876
 *       self.deterministic_key_coders = deterministic_key_coders
 * 
 *     def enter_composite_transform(self, transform_node):             # <<<<<<<<<<<<<<
 *       self.visit_transform(transform_node)
 * 
 */

  /* function exit code */
  __pyx_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.group_by_key_input_visitor.GroupByKeyInputVisitor.enter_composite_transform", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1879
 *       self.visit_transform(transform_node)
 * 
 *     def visit_transform(self, transform_node):             # <<<<<<<<<<<<<<
 *       if isinstance(transform_node.transform, GroupByKey):
 *         pcoll = transform_node.inputs[0]
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_26group_by_key_input_visitor_22GroupByKeyInputVisitor_5visit_transform(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_26group_by_key_input_visitor_22GroupByKeyInputVisitor_5visit_transform = {"visit_transform", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_26group_by_key_input_visitor_22GroupByKeyInputVisitor_5visit_transform, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_26group_by_key_input_visitor_22GroupByKeyInputVisitor_5visit_transform(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_transform_node = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("visit_transform (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_transform_node,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_transform_node)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("visit_transform", 1, 2, 2, 1); __PYX_ERR(0, 1879, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "visit_transform") < 0)) __PYX_ERR(0, 1879, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_transform_node = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("visit_transform", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1879, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.group_by_key_input_visitor.GroupByKeyInputVisitor.visit_transform", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6common_26group_by_key_input_visitor_22GroupByKeyInputVisitor_4visit_transform(__pyx_self, __pyx_v_self, __pyx_v_transform_node);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_11apache_beam_7runners_6common_26group_by_key_input_visitor_22GroupByKeyInputVisitor_4visit_transform(PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_transform_node) {
  struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor *__pyx_cur_scope;
  struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor *__pyx_outer_scope;
  PyObject *__pyx_v_pcoll = NULL;
  PyObject *__pyx_v_key_type = NULL;
  PyObject *__pyx_v_value_type = NULL;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  PyObject *__pyx_t_7 = NULL;
  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("visit_transform", 0);
  __pyx_outer_scope = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_TraceCall("visit_transform", __pyx_f[0], 1879, 0, __PYX_ERR(0, 1879, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1880
 * 
 *     def visit_transform(self, transform_node):
 *       if isinstance(transform_node.transform, GroupByKey):             # <<<<<<<<<<<<<<
 *         pcoll = transform_node.inputs[0]
 *         pcoll.element_type = typehints.coerce_to_kv_type(
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_transform_node, __pyx_n_s_transform); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(!__pyx_cur_scope->__pyx_v_GroupByKey)) { __Pyx_RaiseClosureNameError("GroupByKey"); __PYX_ERR(0, 1880, __pyx_L1_error) }
  __pyx_t_2 = __pyx_cur_scope->__pyx_v_GroupByKey;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = PyObject_IsInstance(__pyx_t_1, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1880, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "apache_beam/runners/common.py":1881
 *     def visit_transform(self, transform_node):
 *       if isinstance(transform_node.transform, GroupByKey):
 *         pcoll = transform_node.inputs[0]             # <<<<<<<<<<<<<<
 *         pcoll.element_type = typehints.coerce_to_kv_type(
 *             pcoll.element_type, transform_node.full_label)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_transform_node, __pyx_n_s_inputs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1881, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1881, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_pcoll = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "apache_beam/runners/common.py":1882
 *       if isinstance(transform_node.transform, GroupByKey):
 *         pcoll = transform_node.inputs[0]
 *         pcoll.element_type = typehints.coerce_to_kv_type(             # <<<<<<<<<<<<<<
 *             pcoll.element_type, transform_node.full_label)
 *         pcoll.requires_deterministic_key_coder = (
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_typehints); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1882, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_coerce_to_kv_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1882, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/runners/common.py":1883
 *         pcoll = transform_node.inputs[0]
 *         pcoll.element_type = typehints.coerce_to_kv_type(
 *             pcoll.element_type, transform_node.full_label)             # <<<<<<<<<<<<<<
 *         pcoll.requires_deterministic_key_coder = (
 *             self.deterministic_key_coders and transform_node.full_label)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_pcoll, __pyx_n_s_element_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1883, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_transform_node, __pyx_n_s_full_label); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1883, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_2, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1882, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_2, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1882, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1882, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_6);
      __pyx_t_2 = 0;
      __pyx_t_6 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1882, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "apache_beam/runners/common.py":1882
 *       if isinstance(transform_node.transform, GroupByKey):
 *         pcoll = transform_node.inputs[0]
 *         pcoll.element_type = typehints.coerce_to_kv_type(             # <<<<<<<<<<<<<<
 *             pcoll.element_type, transform_node.full_label)
 *         pcoll.requires_deterministic_key_coder = (
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_pcoll, __pyx_n_s_element_type, __pyx_t_1) < 0) __PYX_ERR(0, 1882, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/runners/common.py":1885
 *             pcoll.element_type, transform_node.full_label)
 *         pcoll.requires_deterministic_key_coder = (
 *             self.deterministic_key_coders and transform_node.full_label)             # <<<<<<<<<<<<<<
 *         key_type, value_type = pcoll.element_type.tuple_types
 *         if transform_node.outputs:
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_deterministic_key_coders); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1885, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1885, __pyx_L1_error)
    if (__pyx_t_4) {
      __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_transform_node, __pyx_n_s_full_label); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1885, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_L4_bool_binop_done:;

    /* "apache_beam/runners/common.py":1884
 *         pcoll.element_type = typehints.coerce_to_kv_type(
 *             pcoll.element_type, transform_node.full_label)
 *         pcoll.requires_deterministic_key_coder = (             # <<<<<<<<<<<<<<
 *             self.deterministic_key_coders and transform_node.full_label)
 *         key_type, value_type = pcoll.element_type.tuple_types
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_pcoll, __pyx_n_s_requires_deterministic_key_coder, __pyx_t_1) < 0) __PYX_ERR(0, 1884, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/runners/common.py":1886
 *         pcoll.requires_deterministic_key_coder = (
 *             self.deterministic_key_coders and transform_node.full_label)
 *         key_type, value_type = pcoll.element_type.tuple_types             # <<<<<<<<<<<<<<
 *         if transform_node.outputs:
 *           key = next(iter(transform_node.outputs.keys()))
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_pcoll, __pyx_n_s_element_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1886, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_tuple_types); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1886, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    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, 1886, __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_t_9 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_9);
      #else
      __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1886, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1886, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      #endif
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1886, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext;
      index = 0; __pyx_t_1 = __pyx_t_10(__pyx_t_6); if (unlikely(!__pyx_t_1)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_1);
      index = 1; __pyx_t_9 = __pyx_t_10(__pyx_t_6); if (unlikely(!__pyx_t_9)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_9);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_6), 2) < 0) __PYX_ERR(0, 1886, __pyx_L1_error)
      __pyx_t_10 = NULL;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_10 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 1886, __pyx_L1_error)
      __pyx_L7_unpacking_done:;
    }
    __pyx_v_key_type = __pyx_t_1;
    __pyx_t_1 = 0;
    __pyx_v_value_type = __pyx_t_9;
    __pyx_t_9 = 0;

    /* "apache_beam/runners/common.py":1887
 *             self.deterministic_key_coders and transform_node.full_label)
 *         key_type, value_type = pcoll.element_type.tuple_types
 *         if transform_node.outputs:             # <<<<<<<<<<<<<<
 *           key = next(iter(transform_node.outputs.keys()))
 *           transform_node.outputs[key].element_type = typehints.KV[
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_transform_node, __pyx_n_s_outputs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1887, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1887, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_4) {

      /* "apache_beam/runners/common.py":1888
 *         key_type, value_type = pcoll.element_type.tuple_types
 *         if transform_node.outputs:
 *           key = next(iter(transform_node.outputs.keys()))             # <<<<<<<<<<<<<<
 *           transform_node.outputs[key].element_type = typehints.KV[
 *               key_type, typehints.Iterable[value_type]]
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_transform_node, __pyx_n_s_outputs); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1888, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1888, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1888, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1888, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyIter_Next(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1888, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_key = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "apache_beam/runners/common.py":1889
 *         if transform_node.outputs:
 *           key = next(iter(transform_node.outputs.keys()))
 *           transform_node.outputs[key].element_type = typehints.KV[             # <<<<<<<<<<<<<<
 *               key_type, typehints.Iterable[value_type]]
 *           transform_node.outputs[key].requires_deterministic_key_coder = (
 */
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_typehints); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1889, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_KV); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1889, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "apache_beam/runners/common.py":1890
 *           key = next(iter(transform_node.outputs.keys()))
 *           transform_node.outputs[key].element_type = typehints.KV[
 *               key_type, typehints.Iterable[value_type]]             # <<<<<<<<<<<<<<
 *           transform_node.outputs[key].requires_deterministic_key_coder = (
 *               self.deterministic_key_coders and transform_node.full_label)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_typehints); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1890, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_Iterable); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1890, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_9, __pyx_v_value_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1890, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "apache_beam/runners/common.py":1889
 *         if transform_node.outputs:
 *           key = next(iter(transform_node.outputs.keys()))
 *           transform_node.outputs[key].element_type = typehints.KV[             # <<<<<<<<<<<<<<
 *               key_type, typehints.Iterable[value_type]]
 *           transform_node.outputs[key].requires_deterministic_key_coder = (
 */
      __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1889, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_INCREF(__pyx_v_key_type);
      __Pyx_GIVEREF(__pyx_v_key_type);
      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_key_type);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1889, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_transform_node, __pyx_n_s_outputs); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1889, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_9, __pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1889, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (__Pyx_PyObject_SetAttrStr(__pyx_t_1, __pyx_n_s_element_type, __pyx_t_5) < 0) __PYX_ERR(0, 1889, __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":1892
 *               key_type, typehints.Iterable[value_type]]
 *           transform_node.outputs[key].requires_deterministic_key_coder = (
 *               self.deterministic_key_coders and transform_node.full_label)             # <<<<<<<<<<<<<<
 * 
 *   return GroupByKeyInputVisitor(deterministic_key_coders)
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_deterministic_key_coders); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1892, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1892, __pyx_L1_error)
      if (__pyx_t_4) {
        __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_L9_bool_binop_done;
      }
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_transform_node, __pyx_n_s_full_label); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1892, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_1 = __pyx_t_5;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_L9_bool_binop_done:;

      /* "apache_beam/runners/common.py":1891
 *           transform_node.outputs[key].element_type = typehints.KV[
 *               key_type, typehints.Iterable[value_type]]
 *           transform_node.outputs[key].requires_deterministic_key_coder = (             # <<<<<<<<<<<<<<
 *               self.deterministic_key_coders and transform_node.full_label)
 * 
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_transform_node, __pyx_n_s_outputs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1891, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_v_key); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1891, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__Pyx_PyObject_SetAttrStr(__pyx_t_9, __pyx_n_s_requires_deterministic_key_coder, __pyx_t_1) < 0) __PYX_ERR(0, 1891, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "apache_beam/runners/common.py":1887
 *             self.deterministic_key_coders and transform_node.full_label)
 *         key_type, value_type = pcoll.element_type.tuple_types
 *         if transform_node.outputs:             # <<<<<<<<<<<<<<
 *           key = next(iter(transform_node.outputs.keys()))
 *           transform_node.outputs[key].element_type = typehints.KV[
 */
    }

    /* "apache_beam/runners/common.py":1880
 * 
 *     def visit_transform(self, transform_node):
 *       if isinstance(transform_node.transform, GroupByKey):             # <<<<<<<<<<<<<<
 *         pcoll = transform_node.inputs[0]
 *         pcoll.element_type = typehints.coerce_to_kv_type(
 */
  }

  /* "apache_beam/runners/common.py":1879
 *       self.visit_transform(transform_node)
 * 
 *     def visit_transform(self, transform_node):             # <<<<<<<<<<<<<<
 *       if isinstance(transform_node.transform, GroupByKey):
 *         pcoll = transform_node.inputs[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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apache_beam.runners.common.group_by_key_input_visitor.GroupByKeyInputVisitor.visit_transform", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pcoll);
  __Pyx_XDECREF(__pyx_v_key_type);
  __Pyx_XDECREF(__pyx_v_value_type);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1860
 * 
 * 
 * def group_by_key_input_visitor(deterministic_key_coders=True):             # <<<<<<<<<<<<<<
 *   # Importing here to avoid a circular dependency
 *   # pylint: disable=wrong-import-order, wrong-import-position
 */

static PyObject *__pyx_pf_11apache_beam_7runners_6common_2group_by_key_input_visitor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_deterministic_key_coders) {
  struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor *__pyx_cur_scope;
  PyObject *__pyx_v_PipelineVisitor = NULL;
  PyObject *__pyx_v_GroupByKeyInputVisitor = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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_TraceFrameInit(__pyx_codeobj__119)
  __Pyx_RefNannySetupContext("group_by_key_input_visitor", 0);
  __pyx_cur_scope = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor *)__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor(__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1860, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("group_by_key_input_visitor", __pyx_f[0], 1860, 0, __PYX_ERR(0, 1860, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1863
 *   # Importing here to avoid a circular dependency
 *   # pylint: disable=wrong-import-order, wrong-import-position
 *   from apache_beam.pipeline import PipelineVisitor             # <<<<<<<<<<<<<<
 *   from apache_beam.transforms.core import GroupByKey
 * 
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_PipelineVisitor);
  __Pyx_GIVEREF(__pyx_n_s_PipelineVisitor);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PipelineVisitor);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_pipeline, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_PipelineVisitor); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_PipelineVisitor = __pyx_t_1;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":1864
 *   # pylint: disable=wrong-import-order, wrong-import-position
 *   from apache_beam.pipeline import PipelineVisitor
 *   from apache_beam.transforms.core import GroupByKey             # <<<<<<<<<<<<<<
 * 
 *   class GroupByKeyInputVisitor(PipelineVisitor):
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_GroupByKey);
  __Pyx_GIVEREF(__pyx_n_s_GroupByKey);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_GroupByKey);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_transforms_core, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_GroupByKey); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_cur_scope->__pyx_v_GroupByKey = __pyx_t_2;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":1866
 *   from apache_beam.transforms.core import GroupByKey
 * 
 *   class GroupByKeyInputVisitor(PipelineVisitor):             # <<<<<<<<<<<<<<
 *     """A visitor that replaces `Any` element type for input `PCollection` of
 *     a `GroupByKey` with a `KV` type.
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_PipelineVisitor);
  __Pyx_GIVEREF(__pyx_v_PipelineVisitor);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_PipelineVisitor);
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_GroupByKeyInputVisitor, __pyx_n_s_group_by_key_input_visitor_local, (PyObject *) NULL, __pyx_n_s_apache_beam_runners_common, __pyx_kp_s_A_visitor_that_replaces_Any_elem); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "apache_beam/runners/common.py":1873
 *     we could directly replace the coder instead of mutating the element type.
 *     """
 *     def __init__(self, deterministic_key_coders=True):             # <<<<<<<<<<<<<<
 *       self.deterministic_key_coders = deterministic_key_coders
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_26group_by_key_input_visitor_22GroupByKeyInputVisitor_1__init__, 0, __pyx_n_s_group_by_key_input_visitor_local_2, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__121)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__122);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 1873, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "apache_beam/runners/common.py":1876
 *       self.deterministic_key_coders = deterministic_key_coders
 * 
 *     def enter_composite_transform(self, transform_node):             # <<<<<<<<<<<<<<
 *       self.visit_transform(transform_node)
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_26group_by_key_input_visitor_22GroupByKeyInputVisitor_3enter_composite_transform, 0, __pyx_n_s_group_by_key_input_visitor_local_3, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__124)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_enter_composite_transform, __pyx_t_4) < 0) __PYX_ERR(0, 1876, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "apache_beam/runners/common.py":1879
 *       self.visit_transform(transform_node)
 * 
 *     def visit_transform(self, transform_node):             # <<<<<<<<<<<<<<
 *       if isinstance(transform_node.transform, GroupByKey):
 *         pcoll = transform_node.inputs[0]
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_26group_by_key_input_visitor_22GroupByKeyInputVisitor_5visit_transform, 0, __pyx_n_s_group_by_key_input_visitor_local_4, ((PyObject*)__pyx_cur_scope), __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__126)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_visit_transform, __pyx_t_4) < 0) __PYX_ERR(0, 1879, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "apache_beam/runners/common.py":1866
 *   from apache_beam.transforms.core import GroupByKey
 * 
 *   class GroupByKeyInputVisitor(PipelineVisitor):             # <<<<<<<<<<<<<<
 *     """A visitor that replaces `Any` element type for input `PCollection` of
 *     a `GroupByKey` with a `KV` type.
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_GroupByKeyInputVisitor, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_GroupByKeyInputVisitor = __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;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":1894
 *               self.deterministic_key_coders and transform_node.full_label)
 * 
 *   return GroupByKeyInputVisitor(deterministic_key_coders)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_v_GroupByKeyInputVisitor, __pyx_v_deterministic_key_coders); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1894, __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":1860
 * 
 * 
 * def group_by_key_input_visitor(deterministic_key_coders=True):             # <<<<<<<<<<<<<<
 *   # Importing here to avoid a circular dependency
 *   # pylint: disable=wrong-import-order, wrong-import-position
 */

  /* 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.group_by_key_input_visitor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_PipelineVisitor);
  __Pyx_XDECREF(__pyx_v_GroupByKeyInputVisitor);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1897
 * 
 * 
 * def validate_pipeline_graph(pipeline_proto):             # <<<<<<<<<<<<<<
 *   """Ensures this is a correctly constructed Beam pipeline.
 *   """
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_5validate_pipeline_graph(PyObject *__pyx_self, PyObject *__pyx_v_pipeline_proto); /*proto*/
static char __pyx_doc_11apache_beam_7runners_6common_4validate_pipeline_graph[] = "Ensures this is a correctly constructed Beam pipeline.\n  ";
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_5validate_pipeline_graph = {"validate_pipeline_graph", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_5validate_pipeline_graph, METH_O, __pyx_doc_11apache_beam_7runners_6common_4validate_pipeline_graph};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_5validate_pipeline_graph(PyObject *__pyx_self, PyObject *__pyx_v_pipeline_proto) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("validate_pipeline_graph (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6common_4validate_pipeline_graph(__pyx_self, ((PyObject *)__pyx_v_pipeline_proto));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1900
 *   """Ensures this is a correctly constructed Beam pipeline.
 *   """
 *   def get_coder(pcoll_id):             # <<<<<<<<<<<<<<
 *     return pipeline_proto.components.coders[
 *         pipeline_proto.components.pcollections[pcoll_id].coder_id]
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_23validate_pipeline_graph_1get_coder(PyObject *__pyx_self, PyObject *__pyx_v_pcoll_id); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_23validate_pipeline_graph_1get_coder = {"get_coder", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_23validate_pipeline_graph_1get_coder, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_23validate_pipeline_graph_1get_coder(PyObject *__pyx_self, PyObject *__pyx_v_pcoll_id) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_coder (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6common_23validate_pipeline_graph_get_coder(__pyx_self, ((PyObject *)__pyx_v_pcoll_id));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_11apache_beam_7runners_6common_23validate_pipeline_graph_get_coder(PyObject *__pyx_self, PyObject *__pyx_v_pcoll_id) {
  struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph *__pyx_cur_scope;
  struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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_coder", 0);
  __pyx_outer_scope = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_TraceCall("get_coder", __pyx_f[0], 1900, 0, __PYX_ERR(0, 1900, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1901
 *   """
 *   def get_coder(pcoll_id):
 *     return pipeline_proto.components.coders[             # <<<<<<<<<<<<<<
 *         pipeline_proto.components.pcollections[pcoll_id].coder_id]
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_pipeline_proto)) { __Pyx_RaiseClosureNameError("pipeline_proto"); __PYX_ERR(0, 1901, __pyx_L1_error) }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_pipeline_proto, __pyx_n_s_components); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_coders); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":1902
 *   def get_coder(pcoll_id):
 *     return pipeline_proto.components.coders[
 *         pipeline_proto.components.pcollections[pcoll_id].coder_id]             # <<<<<<<<<<<<<<
 * 
 *   def validate_transform(transform_id):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_pipeline_proto)) { __Pyx_RaiseClosureNameError("pipeline_proto"); __PYX_ERR(0, 1902, __pyx_L1_error) }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_pipeline_proto, __pyx_n_s_components); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_pcollections); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_pcoll_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1902, __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_n_s_coder_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":1901
 *   """
 *   def get_coder(pcoll_id):
 *     return pipeline_proto.components.coders[             # <<<<<<<<<<<<<<
 *         pipeline_proto.components.pcollections[pcoll_id].coder_id]
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1901, __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/runners/common.py":1900
 *   """Ensures this is a correctly constructed Beam pipeline.
 *   """
 *   def get_coder(pcoll_id):             # <<<<<<<<<<<<<<
 *     return pipeline_proto.components.coders[
 *         pipeline_proto.components.pcollections[pcoll_id].coder_id]
 */

  /* 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.validate_pipeline_graph.get_coder", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1904
 *         pipeline_proto.components.pcollections[pcoll_id].coder_id]
 * 
 *   def validate_transform(transform_id):             # <<<<<<<<<<<<<<
 *     transform_proto = pipeline_proto.components.transforms[transform_id]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_23validate_pipeline_graph_3validate_transform(PyObject *__pyx_self, PyObject *__pyx_v_transform_id); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_23validate_pipeline_graph_3validate_transform = {"validate_transform", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_23validate_pipeline_graph_3validate_transform, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_23validate_pipeline_graph_3validate_transform(PyObject *__pyx_self, PyObject *__pyx_v_transform_id) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("validate_transform (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6common_23validate_pipeline_graph_2validate_transform(__pyx_self, ((PyObject *)__pyx_v_transform_id));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_11apache_beam_7runners_6common_23validate_pipeline_graph_2validate_transform(PyObject *__pyx_self, PyObject *__pyx_v_transform_id) {
  struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph *__pyx_cur_scope;
  struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph *__pyx_outer_scope;
  PyObject *__pyx_v_transform_proto = NULL;
  PyObject *__pyx_v_input_coder = NULL;
  PyObject *__pyx_v_output_coder = NULL;
  PyObject *__pyx_v_output_values_coder = NULL;
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_UCS4 __pyx_t_6;
  int __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("validate_transform", 0);
  __pyx_outer_scope = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_TraceCall("validate_transform", __pyx_f[0], 1904, 0, __PYX_ERR(0, 1904, __pyx_L1_error));

  /* "apache_beam/runners/common.py":1905
 * 
 *   def validate_transform(transform_id):
 *     transform_proto = pipeline_proto.components.transforms[transform_id]             # <<<<<<<<<<<<<<
 * 
 *     # Currently the only validation we perform is that GBK operations have
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_pipeline_proto)) { __Pyx_RaiseClosureNameError("pipeline_proto"); __PYX_ERR(0, 1905, __pyx_L1_error) }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_pipeline_proto, __pyx_n_s_components); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_transforms); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_transform_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_transform_proto = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":1909
 *     # Currently the only validation we perform is that GBK operations have
 *     # their coders set properly.
 *     if transform_proto.spec.urn == common_urns.primitives.GROUP_BY_KEY.urn:             # <<<<<<<<<<<<<<
 *       if len(transform_proto.inputs) != 1:
 *         raise ValueError("Unexpected number of inputs: %s" % transform_proto)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_transform_proto, __pyx_n_s_spec); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_urn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_common_urns); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_primitives); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1909, __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_n_s_GROUP_BY_KEY); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1909, __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_n_s_urn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1909, __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, 1909, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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, 1909, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "apache_beam/runners/common.py":1910
 *     # their coders set properly.
 *     if transform_proto.spec.urn == common_urns.primitives.GROUP_BY_KEY.urn:
 *       if len(transform_proto.inputs) != 1:             # <<<<<<<<<<<<<<
 *         raise ValueError("Unexpected number of inputs: %s" % transform_proto)
 *       if len(transform_proto.outputs) != 1:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_transform_proto, __pyx_n_s_inputs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1910, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1910, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = ((__pyx_t_5 != 1) != 0);
    if (unlikely(__pyx_t_4)) {

      /* "apache_beam/runners/common.py":1911
 *     if transform_proto.spec.urn == common_urns.primitives.GROUP_BY_KEY.urn:
 *       if len(transform_proto.inputs) != 1:
 *         raise ValueError("Unexpected number of inputs: %s" % transform_proto)             # <<<<<<<<<<<<<<
 *       if len(transform_proto.outputs) != 1:
 *         raise ValueError("Unexpected number of outputs: %s" % transform_proto)
 */
      __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Unexpected_number_of_inputs_s, __pyx_v_transform_proto); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1911, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1911, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(0, 1911, __pyx_L1_error)

      /* "apache_beam/runners/common.py":1910
 *     # their coders set properly.
 *     if transform_proto.spec.urn == common_urns.primitives.GROUP_BY_KEY.urn:
 *       if len(transform_proto.inputs) != 1:             # <<<<<<<<<<<<<<
 *         raise ValueError("Unexpected number of inputs: %s" % transform_proto)
 *       if len(transform_proto.outputs) != 1:
 */
    }

    /* "apache_beam/runners/common.py":1912
 *       if len(transform_proto.inputs) != 1:
 *         raise ValueError("Unexpected number of inputs: %s" % transform_proto)
 *       if len(transform_proto.outputs) != 1:             # <<<<<<<<<<<<<<
 *         raise ValueError("Unexpected number of outputs: %s" % transform_proto)
 *       input_coder = get_coder(next(iter(transform_proto.inputs.values())))
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_transform_proto, __pyx_n_s_outputs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1912, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1912, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = ((__pyx_t_5 != 1) != 0);
    if (unlikely(__pyx_t_4)) {

      /* "apache_beam/runners/common.py":1913
 *         raise ValueError("Unexpected number of inputs: %s" % transform_proto)
 *       if len(transform_proto.outputs) != 1:
 *         raise ValueError("Unexpected number of outputs: %s" % transform_proto)             # <<<<<<<<<<<<<<
 *       input_coder = get_coder(next(iter(transform_proto.inputs.values())))
 *       output_coder = get_coder(next(iter(transform_proto.outputs.values())))
 */
      __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Unexpected_number_of_outputs_s, __pyx_v_transform_proto); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1913, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1913, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 1913, __pyx_L1_error)

      /* "apache_beam/runners/common.py":1912
 *       if len(transform_proto.inputs) != 1:
 *         raise ValueError("Unexpected number of inputs: %s" % transform_proto)
 *       if len(transform_proto.outputs) != 1:             # <<<<<<<<<<<<<<
 *         raise ValueError("Unexpected number of outputs: %s" % transform_proto)
 *       input_coder = get_coder(next(iter(transform_proto.inputs.values())))
 */
    }

    /* "apache_beam/runners/common.py":1914
 *       if len(transform_proto.outputs) != 1:
 *         raise ValueError("Unexpected number of outputs: %s" % transform_proto)
 *       input_coder = get_coder(next(iter(transform_proto.inputs.values())))             # <<<<<<<<<<<<<<
 *       output_coder = get_coder(next(iter(transform_proto.outputs.values())))
 *       if input_coder.spec.urn != common_urns.coders.KV.urn:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_transform_proto, __pyx_n_s_inputs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1914, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1914, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1914, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1914, __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, 1914, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_v_get_coder)) { __Pyx_RaiseClosureNameError("get_coder"); __PYX_ERR(0, 1914, __pyx_L1_error) }
    __pyx_t_2 = __pyx_pf_11apache_beam_7runners_6common_23validate_pipeline_graph_get_coder(__pyx_cur_scope->__pyx_v_get_coder, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1914, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_input_coder = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "apache_beam/runners/common.py":1915
 *         raise ValueError("Unexpected number of outputs: %s" % transform_proto)
 *       input_coder = get_coder(next(iter(transform_proto.inputs.values())))
 *       output_coder = get_coder(next(iter(transform_proto.outputs.values())))             # <<<<<<<<<<<<<<
 *       if input_coder.spec.urn != common_urns.coders.KV.urn:
 *         raise ValueError(
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_transform_proto, __pyx_n_s_outputs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1915, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1915, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1915, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1915, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyIter_Next(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1915, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_v_get_coder)) { __Pyx_RaiseClosureNameError("get_coder"); __PYX_ERR(0, 1915, __pyx_L1_error) }
    __pyx_t_3 = __pyx_pf_11apache_beam_7runners_6common_23validate_pipeline_graph_get_coder(__pyx_cur_scope->__pyx_v_get_coder, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1915, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_output_coder = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "apache_beam/runners/common.py":1916
 *       input_coder = get_coder(next(iter(transform_proto.inputs.values())))
 *       output_coder = get_coder(next(iter(transform_proto.outputs.values())))
 *       if input_coder.spec.urn != common_urns.coders.KV.urn:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Bad coder for input of %s: %s" % (transform_id, input_coder))
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_coder, __pyx_n_s_spec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1916, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_urn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1916, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_common_urns); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1916, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_coders); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1916, __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_n_s_KV); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1916, __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_n_s_urn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1916, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1916, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1916, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(__pyx_t_4)) {

      /* "apache_beam/runners/common.py":1918
 *       if input_coder.spec.urn != common_urns.coders.KV.urn:
 *         raise ValueError(
 *             "Bad coder for input of %s: %s" % (transform_id, input_coder))             # <<<<<<<<<<<<<<
 *       if output_coder.spec.urn != common_urns.coders.KV.urn:
 *         raise ValueError(
 */
      __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1918, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = 0;
      __pyx_t_6 = 127;
      __Pyx_INCREF(__pyx_kp_u_Bad_coder_for_input_of);
      __pyx_t_5 += 23;
      __Pyx_GIVEREF(__pyx_kp_u_Bad_coder_for_input_of);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Bad_coder_for_input_of);
      __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_transform_id), __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1918, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_6;
      __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
      __pyx_t_1 = 0;
      __Pyx_INCREF(__pyx_kp_u__127);
      __pyx_t_5 += 2;
      __Pyx_GIVEREF(__pyx_kp_u__127);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__127);
      __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_input_coder), __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1918, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_6;
      __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_3, 4, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1918, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "apache_beam/runners/common.py":1917
 *       output_coder = get_coder(next(iter(transform_proto.outputs.values())))
 *       if input_coder.spec.urn != common_urns.coders.KV.urn:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Bad coder for input of %s: %s" % (transform_id, input_coder))
 *       if output_coder.spec.urn != common_urns.coders.KV.urn:
 */
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1917, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(0, 1917, __pyx_L1_error)

      /* "apache_beam/runners/common.py":1916
 *       input_coder = get_coder(next(iter(transform_proto.inputs.values())))
 *       output_coder = get_coder(next(iter(transform_proto.outputs.values())))
 *       if input_coder.spec.urn != common_urns.coders.KV.urn:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Bad coder for input of %s: %s" % (transform_id, input_coder))
 */
    }

    /* "apache_beam/runners/common.py":1919
 *         raise ValueError(
 *             "Bad coder for input of %s: %s" % (transform_id, input_coder))
 *       if output_coder.spec.urn != common_urns.coders.KV.urn:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Bad coder for output of %s: %s" % (transform_id, output_coder))
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_output_coder, __pyx_n_s_spec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1919, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_urn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1919, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_common_urns); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1919, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_coders); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1919, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_KV); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1919, __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_n_s_urn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1919, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1919, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __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, 1919, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(__pyx_t_4)) {

      /* "apache_beam/runners/common.py":1921
 *       if output_coder.spec.urn != common_urns.coders.KV.urn:
 *         raise ValueError(
 *             "Bad coder for output of %s: %s" % (transform_id, output_coder))             # <<<<<<<<<<<<<<
 *       output_values_coder = pipeline_proto.components.coders[
 *           output_coder.component_coder_ids[1]]
 */
      __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1921, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = 0;
      __pyx_t_6 = 127;
      __Pyx_INCREF(__pyx_kp_u_Bad_coder_for_output_of);
      __pyx_t_5 += 24;
      __Pyx_GIVEREF(__pyx_kp_u_Bad_coder_for_output_of);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Bad_coder_for_output_of);
      __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_transform_id), __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1921, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_6;
      __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_INCREF(__pyx_kp_u__127);
      __pyx_t_5 += 2;
      __Pyx_GIVEREF(__pyx_kp_u__127);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__127);
      __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_output_coder), __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1921, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_6;
      __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_3, 4, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1921, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "apache_beam/runners/common.py":1920
 *             "Bad coder for input of %s: %s" % (transform_id, input_coder))
 *       if output_coder.spec.urn != common_urns.coders.KV.urn:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Bad coder for output of %s: %s" % (transform_id, output_coder))
 *       output_values_coder = pipeline_proto.components.coders[
 */
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1920, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(0, 1920, __pyx_L1_error)

      /* "apache_beam/runners/common.py":1919
 *         raise ValueError(
 *             "Bad coder for input of %s: %s" % (transform_id, input_coder))
 *       if output_coder.spec.urn != common_urns.coders.KV.urn:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Bad coder for output of %s: %s" % (transform_id, output_coder))
 */
    }

    /* "apache_beam/runners/common.py":1922
 *         raise ValueError(
 *             "Bad coder for output of %s: %s" % (transform_id, output_coder))
 *       output_values_coder = pipeline_proto.components.coders[             # <<<<<<<<<<<<<<
 *           output_coder.component_coder_ids[1]]
 *       if (input_coder.component_coder_ids[0] !=
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_pipeline_proto)) { __Pyx_RaiseClosureNameError("pipeline_proto"); __PYX_ERR(0, 1922, __pyx_L1_error) }
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_pipeline_proto, __pyx_n_s_components); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1922, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_coders); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1922, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "apache_beam/runners/common.py":1923
 *             "Bad coder for output of %s: %s" % (transform_id, output_coder))
 *       output_values_coder = pipeline_proto.components.coders[
 *           output_coder.component_coder_ids[1]]             # <<<<<<<<<<<<<<
 *       if (input_coder.component_coder_ids[0] !=
 *           output_coder.component_coder_ids[0] or
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_output_coder, __pyx_n_s_component_coder_ids); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1923, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;

    /* "apache_beam/runners/common.py":1922
 *         raise ValueError(
 *             "Bad coder for output of %s: %s" % (transform_id, output_coder))
 *       output_values_coder = pipeline_proto.components.coders[             # <<<<<<<<<<<<<<
 *           output_coder.component_coder_ids[1]]
 *       if (input_coder.component_coder_ids[0] !=
 */
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1922, __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_output_values_coder = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "apache_beam/runners/common.py":1924
 *       output_values_coder = pipeline_proto.components.coders[
 *           output_coder.component_coder_ids[1]]
 *       if (input_coder.component_coder_ids[0] !=             # <<<<<<<<<<<<<<
 *           output_coder.component_coder_ids[0] or
 *           output_values_coder.spec.urn != common_urns.coders.ITERABLE.urn or
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_coder, __pyx_n_s_component_coder_ids); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1924, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;

    /* "apache_beam/runners/common.py":1925
 *           output_coder.component_coder_ids[1]]
 *       if (input_coder.component_coder_ids[0] !=
 *           output_coder.component_coder_ids[0] or             # <<<<<<<<<<<<<<
 *           output_values_coder.spec.urn != common_urns.coders.ITERABLE.urn or
 *           output_values_coder.component_coder_ids[0] !=
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_output_coder, __pyx_n_s_component_coder_ids); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1925, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1925, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1924, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/runners/common.py":1924
 *       output_values_coder = pipeline_proto.components.coders[
 *           output_coder.component_coder_ids[1]]
 *       if (input_coder.component_coder_ids[0] !=             # <<<<<<<<<<<<<<
 *           output_coder.component_coder_ids[0] or
 *           output_values_coder.spec.urn != common_urns.coders.ITERABLE.urn or
 */
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1924, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!__pyx_t_7) {
    } else {
      __pyx_t_4 = __pyx_t_7;
      goto __pyx_L9_bool_binop_done;
    }

    /* "apache_beam/runners/common.py":1926
 *       if (input_coder.component_coder_ids[0] !=
 *           output_coder.component_coder_ids[0] or
 *           output_values_coder.spec.urn != common_urns.coders.ITERABLE.urn or             # <<<<<<<<<<<<<<
 *           output_values_coder.component_coder_ids[0] !=
 *           input_coder.component_coder_ids[1]):
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_output_values_coder, __pyx_n_s_spec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1926, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_urn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1926, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_common_urns); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1926, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_coders); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1926, __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_n_s_ITERABLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1926, __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_n_s_urn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1926, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1926, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __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, 1926, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!__pyx_t_7) {
    } else {
      __pyx_t_4 = __pyx_t_7;
      goto __pyx_L9_bool_binop_done;
    }

    /* "apache_beam/runners/common.py":1927
 *           output_coder.component_coder_ids[0] or
 *           output_values_coder.spec.urn != common_urns.coders.ITERABLE.urn or
 *           output_values_coder.component_coder_ids[0] !=             # <<<<<<<<<<<<<<
 *           input_coder.component_coder_ids[1]):
 *         raise ValueError(
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_output_values_coder, __pyx_n_s_component_coder_ids); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1927, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1927, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "apache_beam/runners/common.py":1928
 *           output_values_coder.spec.urn != common_urns.coders.ITERABLE.urn or
 *           output_values_coder.component_coder_ids[0] !=
 *           input_coder.component_coder_ids[1]):             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Incompatible input coder %s and output coder %s for transform %s" %
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_coder, __pyx_n_s_component_coder_ids); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1928, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1928, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1927, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/runners/common.py":1927
 *           output_coder.component_coder_ids[0] or
 *           output_values_coder.spec.urn != common_urns.coders.ITERABLE.urn or
 *           output_values_coder.component_coder_ids[0] !=             # <<<<<<<<<<<<<<
 *           input_coder.component_coder_ids[1]):
 *         raise ValueError(
 */
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1927, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = __pyx_t_7;
    __pyx_L9_bool_binop_done:;

    /* "apache_beam/runners/common.py":1924
 *       output_values_coder = pipeline_proto.components.coders[
 *           output_coder.component_coder_ids[1]]
 *       if (input_coder.component_coder_ids[0] !=             # <<<<<<<<<<<<<<
 *           output_coder.component_coder_ids[0] or
 *           output_values_coder.spec.urn != common_urns.coders.ITERABLE.urn or
 */
    if (unlikely(__pyx_t_4)) {

      /* "apache_beam/runners/common.py":1930
 *           input_coder.component_coder_ids[1]):
 *         raise ValueError(
 *             "Incompatible input coder %s and output coder %s for transform %s" %             # <<<<<<<<<<<<<<
 *             (transform_id, input_coder, output_coder))
 *     elif transform_proto.spec.urn == common_urns.primitives.ASSIGN_WINDOWS.urn:
 */
      __pyx_t_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1930, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = 0;
      __pyx_t_6 = 127;
      __Pyx_INCREF(__pyx_kp_u_Incompatible_input_coder);
      __pyx_t_5 += 25;
      __Pyx_GIVEREF(__pyx_kp_u_Incompatible_input_coder);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Incompatible_input_coder);

      /* "apache_beam/runners/common.py":1931
 *         raise ValueError(
 *             "Incompatible input coder %s and output coder %s for transform %s" %
 *             (transform_id, input_coder, output_coder))             # <<<<<<<<<<<<<<
 *     elif transform_proto.spec.urn == common_urns.primitives.ASSIGN_WINDOWS.urn:
 *       if not transform_proto.inputs:
 */
      __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_transform_id), __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1931, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_6;
      __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_INCREF(__pyx_kp_u_and_output_coder);
      __pyx_t_5 += 18;
      __Pyx_GIVEREF(__pyx_kp_u_and_output_coder);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_and_output_coder);
      __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_input_coder), __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1931, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_6;
      __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_INCREF(__pyx_kp_u_for_transform);
      __pyx_t_5 += 15;
      __Pyx_GIVEREF(__pyx_kp_u_for_transform);
      PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_kp_u_for_transform);
      __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_output_coder), __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1931, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_6;
      __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "apache_beam/runners/common.py":1930
 *           input_coder.component_coder_ids[1]):
 *         raise ValueError(
 *             "Incompatible input coder %s and output coder %s for transform %s" %             # <<<<<<<<<<<<<<
 *             (transform_id, input_coder, output_coder))
 *     elif transform_proto.spec.urn == common_urns.primitives.ASSIGN_WINDOWS.urn:
 */
      __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_3, 6, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1930, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "apache_beam/runners/common.py":1929
 *           output_values_coder.component_coder_ids[0] !=
 *           input_coder.component_coder_ids[1]):
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Incompatible input coder %s and output coder %s for transform %s" %
 *             (transform_id, input_coder, output_coder))
 */
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1929, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(0, 1929, __pyx_L1_error)

      /* "apache_beam/runners/common.py":1924
 *       output_values_coder = pipeline_proto.components.coders[
 *           output_coder.component_coder_ids[1]]
 *       if (input_coder.component_coder_ids[0] !=             # <<<<<<<<<<<<<<
 *           output_coder.component_coder_ids[0] or
 *           output_values_coder.spec.urn != common_urns.coders.ITERABLE.urn or
 */
    }

    /* "apache_beam/runners/common.py":1909
 *     # Currently the only validation we perform is that GBK operations have
 *     # their coders set properly.
 *     if transform_proto.spec.urn == common_urns.primitives.GROUP_BY_KEY.urn:             # <<<<<<<<<<<<<<
 *       if len(transform_proto.inputs) != 1:
 *         raise ValueError("Unexpected number of inputs: %s" % transform_proto)
 */
    goto __pyx_L3;
  }

  /* "apache_beam/runners/common.py":1932
 *             "Incompatible input coder %s and output coder %s for transform %s" %
 *             (transform_id, input_coder, output_coder))
 *     elif transform_proto.spec.urn == common_urns.primitives.ASSIGN_WINDOWS.urn:             # <<<<<<<<<<<<<<
 *       if not transform_proto.inputs:
 *         raise ValueError("Missing input for transform: %s" % transform_proto)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_transform_proto, __pyx_n_s_spec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_urn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_common_urns); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_primitives); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1932, __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_n_s_ASSIGN_WINDOWS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1932, __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_n_s_urn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1932, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1932, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "apache_beam/runners/common.py":1933
 *             (transform_id, input_coder, output_coder))
 *     elif transform_proto.spec.urn == common_urns.primitives.ASSIGN_WINDOWS.urn:
 *       if not transform_proto.inputs:             # <<<<<<<<<<<<<<
 *         raise ValueError("Missing input for transform: %s" % transform_proto)
 *     elif transform_proto.spec.urn == common_urns.primitives.PAR_DO.urn:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_transform_proto, __pyx_n_s_inputs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1933, __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, 1933, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = ((!__pyx_t_4) != 0);
    if (unlikely(__pyx_t_7)) {

      /* "apache_beam/runners/common.py":1934
 *     elif transform_proto.spec.urn == common_urns.primitives.ASSIGN_WINDOWS.urn:
 *       if not transform_proto.inputs:
 *         raise ValueError("Missing input for transform: %s" % transform_proto)             # <<<<<<<<<<<<<<
 *     elif transform_proto.spec.urn == common_urns.primitives.PAR_DO.urn:
 *       if not transform_proto.inputs:
 */
      __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Missing_input_for_transform_s, __pyx_v_transform_proto); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1934, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1934, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 1934, __pyx_L1_error)

      /* "apache_beam/runners/common.py":1933
 *             (transform_id, input_coder, output_coder))
 *     elif transform_proto.spec.urn == common_urns.primitives.ASSIGN_WINDOWS.urn:
 *       if not transform_proto.inputs:             # <<<<<<<<<<<<<<
 *         raise ValueError("Missing input for transform: %s" % transform_proto)
 *     elif transform_proto.spec.urn == common_urns.primitives.PAR_DO.urn:
 */
    }

    /* "apache_beam/runners/common.py":1932
 *             "Incompatible input coder %s and output coder %s for transform %s" %
 *             (transform_id, input_coder, output_coder))
 *     elif transform_proto.spec.urn == common_urns.primitives.ASSIGN_WINDOWS.urn:             # <<<<<<<<<<<<<<
 *       if not transform_proto.inputs:
 *         raise ValueError("Missing input for transform: %s" % transform_proto)
 */
    goto __pyx_L3;
  }

  /* "apache_beam/runners/common.py":1935
 *       if not transform_proto.inputs:
 *         raise ValueError("Missing input for transform: %s" % transform_proto)
 *     elif transform_proto.spec.urn == common_urns.primitives.PAR_DO.urn:             # <<<<<<<<<<<<<<
 *       if not transform_proto.inputs:
 *         raise ValueError("Missing input for transform: %s" % transform_proto)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_transform_proto, __pyx_n_s_spec); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_urn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_common_urns); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_primitives); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1935, __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_n_s_PAR_DO); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1935, __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_n_s_urn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1935, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1935, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_7) {

    /* "apache_beam/runners/common.py":1936
 *         raise ValueError("Missing input for transform: %s" % transform_proto)
 *     elif transform_proto.spec.urn == common_urns.primitives.PAR_DO.urn:
 *       if not transform_proto.inputs:             # <<<<<<<<<<<<<<
 *         raise ValueError("Missing input for transform: %s" % transform_proto)
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_transform_proto, __pyx_n_s_inputs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1936, __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, 1936, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = ((!__pyx_t_7) != 0);
    if (unlikely(__pyx_t_4)) {

      /* "apache_beam/runners/common.py":1937
 *     elif transform_proto.spec.urn == common_urns.primitives.PAR_DO.urn:
 *       if not transform_proto.inputs:
 *         raise ValueError("Missing input for transform: %s" % transform_proto)             # <<<<<<<<<<<<<<
 * 
 *     for t in transform_proto.subtransforms:
 */
      __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Missing_input_for_transform_s, __pyx_v_transform_proto); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1937, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1937, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 1937, __pyx_L1_error)

      /* "apache_beam/runners/common.py":1936
 *         raise ValueError("Missing input for transform: %s" % transform_proto)
 *     elif transform_proto.spec.urn == common_urns.primitives.PAR_DO.urn:
 *       if not transform_proto.inputs:             # <<<<<<<<<<<<<<
 *         raise ValueError("Missing input for transform: %s" % transform_proto)
 * 
 */
    }

    /* "apache_beam/runners/common.py":1935
 *       if not transform_proto.inputs:
 *         raise ValueError("Missing input for transform: %s" % transform_proto)
 *     elif transform_proto.spec.urn == common_urns.primitives.PAR_DO.urn:             # <<<<<<<<<<<<<<
 *       if not transform_proto.inputs:
 *         raise ValueError("Missing input for transform: %s" % transform_proto)
 */
  }
  __pyx_L3:;

  /* "apache_beam/runners/common.py":1939
 *         raise ValueError("Missing input for transform: %s" % transform_proto)
 * 
 *     for t in transform_proto.subtransforms:             # <<<<<<<<<<<<<<
 *       validate_transform(t)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_transform_proto, __pyx_n_s_subtransforms); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1939, __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_5 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1939, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1939, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1939, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1939, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1939, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1939, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_8(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1939, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "apache_beam/runners/common.py":1940
 * 
 *     for t in transform_proto.subtransforms:
 *       validate_transform(t)             # <<<<<<<<<<<<<<
 * 
 *   for t in pipeline_proto.root_transform_ids:
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_validate_transform)) { __Pyx_RaiseClosureNameError("validate_transform"); __PYX_ERR(0, 1940, __pyx_L1_error) }
    __pyx_t_2 = __pyx_pf_11apache_beam_7runners_6common_23validate_pipeline_graph_2validate_transform(__pyx_cur_scope->__pyx_v_validate_transform, __pyx_v_t); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1940, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/runners/common.py":1939
 *         raise ValueError("Missing input for transform: %s" % transform_proto)
 * 
 *     for t in transform_proto.subtransforms:             # <<<<<<<<<<<<<<
 *       validate_transform(t)
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":1904
 *         pipeline_proto.components.pcollections[pcoll_id].coder_id]
 * 
 *   def validate_transform(transform_id):             # <<<<<<<<<<<<<<
 *     transform_proto = pipeline_proto.components.transforms[transform_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_AddTraceback("apache_beam.runners.common.validate_pipeline_graph.validate_transform", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_transform_proto);
  __Pyx_XDECREF(__pyx_v_input_coder);
  __Pyx_XDECREF(__pyx_v_output_coder);
  __Pyx_XDECREF(__pyx_v_output_values_coder);
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/common.py":1897
 * 
 * 
 * def validate_pipeline_graph(pipeline_proto):             # <<<<<<<<<<<<<<
 *   """Ensures this is a correctly constructed Beam pipeline.
 *   """
 */

static PyObject *__pyx_pf_11apache_beam_7runners_6common_4validate_pipeline_graph(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pipeline_proto) {
  struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph *__pyx_cur_scope;
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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_TraceFrameInit(__pyx_codeobj__128)
  __Pyx_RefNannySetupContext("validate_pipeline_graph", 0);
  __pyx_cur_scope = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph *)__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph(__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1897, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("validate_pipeline_graph", __pyx_f[0], 1897, 0, __PYX_ERR(0, 1897, __pyx_L1_error));
  __pyx_cur_scope->__pyx_v_pipeline_proto = __pyx_v_pipeline_proto;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_pipeline_proto);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_pipeline_proto);

  /* "apache_beam/runners/common.py":1900
 *   """Ensures this is a correctly constructed Beam pipeline.
 *   """
 *   def get_coder(pcoll_id):             # <<<<<<<<<<<<<<
 *     return pipeline_proto.components.coders[
 *         pipeline_proto.components.pcollections[pcoll_id].coder_id]
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_23validate_pipeline_graph_1get_coder, 0, __pyx_n_s_validate_pipeline_graph_locals_g, ((PyObject*)__pyx_cur_scope), __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__130)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_get_coder = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":1904
 *         pipeline_proto.components.pcollections[pcoll_id].coder_id]
 * 
 *   def validate_transform(transform_id):             # <<<<<<<<<<<<<<
 *     transform_proto = pipeline_proto.components.transforms[transform_id]
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_23validate_pipeline_graph_3validate_transform, 0, __pyx_n_s_validate_pipeline_graph_locals_v, ((PyObject*)__pyx_cur_scope), __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__132)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_validate_transform = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":1942
 *       validate_transform(t)
 * 
 *   for t in pipeline_proto.root_transform_ids:             # <<<<<<<<<<<<<<
 *     validate_transform(t)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_pipeline_proto, __pyx_n_s_root_transform_ids); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1942, __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, 1942, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1942, __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))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1942, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1942, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1942, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1942, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1942, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "apache_beam/runners/common.py":1943
 * 
 *   for t in pipeline_proto.root_transform_ids:
 *     validate_transform(t)             # <<<<<<<<<<<<<<
 */
    __pyx_t_1 = __pyx_pf_11apache_beam_7runners_6common_23validate_pipeline_graph_2validate_transform(__pyx_cur_scope->__pyx_v_validate_transform, __pyx_v_t); 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/runners/common.py":1942
 *       validate_transform(t)
 * 
 *   for t in pipeline_proto.root_transform_ids:             # <<<<<<<<<<<<<<
 *     validate_transform(t)
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":1897
 * 
 * 
 * def validate_pipeline_graph(pipeline_proto):             # <<<<<<<<<<<<<<
 *   """Ensures this is a correctly constructed Beam pipeline.
 *   """
 */

  /* function exit code */
  __pyx_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.validate_pipeline_graph", __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_Receiver(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_7__pyx_unpickle_Receiver(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_7__pyx_unpickle_Receiver = {"__pyx_unpickle_Receiver", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_7__pyx_unpickle_Receiver, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_7__pyx_unpickle_Receiver(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Receiver", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Receiver", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Receiver") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Receiver", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle_Receiver", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6common_6__pyx_unpickle_Receiver(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_11apache_beam_7runners_6common_6__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_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__133)
  __Pyx_RefNannySetupContext("__pyx_unpickle_Receiver", 0);
  __Pyx_TraceCall("__pyx_unpickle_Receiver", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__134, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = Receiver.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = Receiver.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __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(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = Receiver.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Receiver__set_state(<Receiver> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_Receiver), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = Receiver.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Receiver__set_state(<Receiver> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = Receiver.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Receiver__set_state(<Receiver> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_Receiver__set_state(Receiver __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __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)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = Receiver.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Receiver__set_state(<Receiver> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Receiver__set_state(<Receiver> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_Receiver__set_state(Receiver __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_Receiver(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* 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.runners.common.__pyx_unpickle_Receiver", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_Receiver__set_state(<Receiver> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Receiver__set_state(Receiver __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Receiver__set_state", 0);
  __Pyx_TraceCall("__pyx_unpickle_Receiver__set_state", __pyx_f[1], 11, 0, __PYX_ERR(1, 11, __pyx_L1_error));

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_Receiver__set_state(Receiver __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_3 != 0);
  __pyx_t_1 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_Receiver__set_state(Receiver __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 13, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_Receiver__set_state(Receiver __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_Receiver__set_state(<Receiver> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Receiver__set_state(Receiver __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  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_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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_MethodWrapper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_9__pyx_unpickle_MethodWrapper(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_9__pyx_unpickle_MethodWrapper = {"__pyx_unpickle_MethodWrapper", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_9__pyx_unpickle_MethodWrapper, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_9__pyx_unpickle_MethodWrapper(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_MethodWrapper", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_MethodWrapper", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_MethodWrapper") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_MethodWrapper", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle_MethodWrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6common_8__pyx_unpickle_MethodWrapper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_11apache_beam_7runners_6common_8__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_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__135)
  __Pyx_RefNannySetupContext("__pyx_unpickle_MethodWrapper", 0);
  __Pyx_TraceCall("__pyx_unpickle_MethodWrapper", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xed3c1c6, 0x49bc0f9, 0xc8b0c72):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xed3c1c6, 0x49bc0f9, 0xc8b0c72) = (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_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__136, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xed3c1c6, 0x49bc0f9, 0xc8b0c72):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xed3c1c6, 0x49bc0f9, 0xc8b0c72) = (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_checksum)
 *     __pyx_result = MethodWrapper.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0xed3c1c6, 0x49bc0f9, 0xc8b0c72):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xed3c1c6, 0x49bc0f9, 0xc8b0c72) = (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_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = MethodWrapper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __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(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xed3c1c6, 0x49bc0f9, 0xc8b0c72):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xed3c1c6, 0x49bc0f9, 0xc8b0c72) = (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_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xed3c1c6, 0x49bc0f9, 0xc8b0c72) = (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_checksum)
 *     __pyx_result = MethodWrapper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_MethodWrapper__set_state(<MethodWrapper> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xed3c1c6, 0x49bc0f9, 0xc8b0c72) = (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_checksum)
 *     __pyx_result = MethodWrapper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_MethodWrapper__set_state(<MethodWrapper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = MethodWrapper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_MethodWrapper__set_state(<MethodWrapper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_MethodWrapper__set_state(MethodWrapper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __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)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xed3c1c6, 0x49bc0f9, 0xc8b0c72) = (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_checksum)
 *     __pyx_result = MethodWrapper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_MethodWrapper__set_state(<MethodWrapper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_MethodWrapper__set_state(<MethodWrapper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_MethodWrapper__set_state(MethodWrapper __pyx_result, tuple __pyx_state):
 *     __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)":1
 * def __pyx_unpickle_MethodWrapper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* 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.runners.common.__pyx_unpickle_MethodWrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_MethodWrapper__set_state(<MethodWrapper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_MethodWrapper__set_state(MethodWrapper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __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]
 *     if len(__pyx_state) > 16 and hasattr(__pyx_result, '__dict__'):
 */

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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __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("__pyx_unpickle_MethodWrapper__set_state", 0);
  __Pyx_TraceCall("__pyx_unpickle_MethodWrapper__set_state", __pyx_f[1], 11, 0, __PYX_ERR(1, 11, __pyx_L1_error));

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_MethodWrapper__set_state(MethodWrapper __pyx_result, tuple __pyx_state):
 *     __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]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 16 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[16])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) __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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 10, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 11, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 12, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 13, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 14, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 15, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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, tuple __pyx_state):
 *     __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]
 *     if len(__pyx_state) > 16 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[16])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 16) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __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]
 *     if len(__pyx_state) > 16 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[16])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 16, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_MethodWrapper__set_state(MethodWrapper __pyx_result, tuple __pyx_state):
 *     __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]
 *     if len(__pyx_state) > 16 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[16])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_MethodWrapper__set_state(<MethodWrapper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_MethodWrapper__set_state(MethodWrapper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __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]
 *     if len(__pyx_state) > 16 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_DoFnSignature(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_11__pyx_unpickle_DoFnSignature(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_11__pyx_unpickle_DoFnSignature = {"__pyx_unpickle_DoFnSignature", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11__pyx_unpickle_DoFnSignature, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_11__pyx_unpickle_DoFnSignature(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DoFnSignature", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DoFnSignature", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_DoFnSignature") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DoFnSignature", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle_DoFnSignature", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6common_10__pyx_unpickle_DoFnSignature(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_11apache_beam_7runners_6common_10__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_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__137)
  __Pyx_RefNannySetupContext("__pyx_unpickle_DoFnSignature", 0);
  __Pyx_TraceCall("__pyx_unpickle_DoFnSignature", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x87afe8e, 0x8b80bb7, 0xe7c08a8):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x87afe8e, 0x8b80bb7, 0xe7c08a8) = (_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_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__138, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x87afe8e, 0x8b80bb7, 0xe7c08a8):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x87afe8e, 0x8b80bb7, 0xe7c08a8) = (_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_checksum)
 *     __pyx_result = DoFnSignature.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0x87afe8e, 0x8b80bb7, 0xe7c08a8):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x87afe8e, 0x8b80bb7, 0xe7c08a8) = (_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_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = DoFnSignature.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __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(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x87afe8e, 0x8b80bb7, 0xe7c08a8):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x87afe8e, 0x8b80bb7, 0xe7c08a8) = (_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_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x87afe8e, 0x8b80bb7, 0xe7c08a8) = (_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_checksum)
 *     __pyx_result = DoFnSignature.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DoFnSignature__set_state(<DoFnSignature> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x87afe8e, 0x8b80bb7, 0xe7c08a8) = (_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_checksum)
 *     __pyx_result = DoFnSignature.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DoFnSignature__set_state(<DoFnSignature> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = DoFnSignature.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DoFnSignature__set_state(<DoFnSignature> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_DoFnSignature__set_state(DoFnSignature __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __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)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x87afe8e, 0x8b80bb7, 0xe7c08a8) = (_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_checksum)
 *     __pyx_result = DoFnSignature.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DoFnSignature__set_state(<DoFnSignature> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DoFnSignature__set_state(<DoFnSignature> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_DoFnSignature__set_state(DoFnSignature __pyx_result, tuple __pyx_state):
 *     __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)":1
 * def __pyx_unpickle_DoFnSignature(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* 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.runners.common.__pyx_unpickle_DoFnSignature", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_DoFnSignature__set_state(<DoFnSignature> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DoFnSignature__set_state(DoFnSignature __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __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]
 *     if len(__pyx_state) > 14 and hasattr(__pyx_result, '__dict__'):
 */

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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __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("__pyx_unpickle_DoFnSignature__set_state", 0);
  __Pyx_TraceCall("__pyx_unpickle_DoFnSignature__set_state", __pyx_f[1], 11, 0, __PYX_ERR(1, 11, __pyx_L1_error));

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_DoFnSignature__set_state(DoFnSignature __pyx_result, tuple __pyx_state):
 *     __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]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 14 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[14])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 10, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 11, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 12, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 13, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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, tuple __pyx_state):
 *     __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]
 *     if len(__pyx_state) > 14 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[14])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 14) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __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]
 *     if len(__pyx_state) > 14 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[14])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 14, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_DoFnSignature__set_state(DoFnSignature __pyx_result, tuple __pyx_state):
 *     __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]
 *     if len(__pyx_state) > 14 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[14])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_DoFnSignature__set_state(<DoFnSignature> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DoFnSignature__set_state(DoFnSignature __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __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]
 *     if len(__pyx_state) > 14 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_DoFnInvoker(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_13__pyx_unpickle_DoFnInvoker(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13__pyx_unpickle_DoFnInvoker = {"__pyx_unpickle_DoFnInvoker", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13__pyx_unpickle_DoFnInvoker, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_13__pyx_unpickle_DoFnInvoker(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DoFnInvoker", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DoFnInvoker", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_DoFnInvoker") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DoFnInvoker", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle_DoFnInvoker", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6common_12__pyx_unpickle_DoFnInvoker(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_11apache_beam_7runners_6common_12__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_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__139)
  __Pyx_RefNannySetupContext("__pyx_unpickle_DoFnInvoker", 0);
  __Pyx_TraceCall("__pyx_unpickle_DoFnInvoker", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x24f2bc5, 0x09ba3a5, 0x838897a):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x24f2bc5, 0x09ba3a5, 0x838897a) = (bundle_finalizer_param, output_handler, signature, user_state_context))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__140, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x24f2bc5, 0x09ba3a5, 0x838897a):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x24f2bc5, 0x09ba3a5, 0x838897a) = (bundle_finalizer_param, output_handler, signature, user_state_context))" % __pyx_checksum)
 *     __pyx_result = DoFnInvoker.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0x24f2bc5, 0x09ba3a5, 0x838897a):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x24f2bc5, 0x09ba3a5, 0x838897a) = (bundle_finalizer_param, output_handler, signature, user_state_context))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = DoFnInvoker.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __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(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x24f2bc5, 0x09ba3a5, 0x838897a):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x24f2bc5, 0x09ba3a5, 0x838897a) = (bundle_finalizer_param, output_handler, signature, user_state_context))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x24f2bc5, 0x09ba3a5, 0x838897a) = (bundle_finalizer_param, output_handler, signature, user_state_context))" % __pyx_checksum)
 *     __pyx_result = DoFnInvoker.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DoFnInvoker__set_state(<DoFnInvoker> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x24f2bc5, 0x09ba3a5, 0x838897a) = (bundle_finalizer_param, output_handler, signature, user_state_context))" % __pyx_checksum)
 *     __pyx_result = DoFnInvoker.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DoFnInvoker__set_state(<DoFnInvoker> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = DoFnInvoker.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DoFnInvoker__set_state(<DoFnInvoker> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_DoFnInvoker__set_state(DoFnInvoker __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __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)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x24f2bc5, 0x09ba3a5, 0x838897a) = (bundle_finalizer_param, output_handler, signature, user_state_context))" % __pyx_checksum)
 *     __pyx_result = DoFnInvoker.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DoFnInvoker__set_state(<DoFnInvoker> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DoFnInvoker__set_state(<DoFnInvoker> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_DoFnInvoker__set_state(DoFnInvoker __pyx_result, tuple __pyx_state):
 *     __pyx_result.bundle_finalizer_param = __pyx_state[0]; __pyx_result.output_handler = __pyx_state[1]; __pyx_result.signature = __pyx_state[2]; __pyx_result.user_state_context = __pyx_state[3]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_DoFnInvoker(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* 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.runners.common.__pyx_unpickle_DoFnInvoker", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_DoFnInvoker__set_state(<DoFnInvoker> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DoFnInvoker__set_state(DoFnInvoker __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.bundle_finalizer_param = __pyx_state[0]; __pyx_result.output_handler = __pyx_state[1]; __pyx_result.signature = __pyx_state[2]; __pyx_result.user_state_context = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 */

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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __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("__pyx_unpickle_DoFnInvoker__set_state", 0);
  __Pyx_TraceCall("__pyx_unpickle_DoFnInvoker__set_state", __pyx_f[1], 11, 0, __PYX_ERR(1, 11, __pyx_L1_error));

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_DoFnInvoker__set_state(DoFnInvoker __pyx_result, tuple __pyx_state):
 *     __pyx_result.bundle_finalizer_param = __pyx_state[0]; __pyx_result.output_handler = __pyx_state[1]; __pyx_result.signature = __pyx_state[2]; __pyx_result.user_state_context = __pyx_state[3]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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_ptype_11apache_beam_7runners_6common_OutputHandler))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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_ptype_11apache_beam_7runners_6common_DoFnSignature))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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, tuple __pyx_state):
 *     __pyx_result.bundle_finalizer_param = __pyx_state[0]; __pyx_result.output_handler = __pyx_state[1]; __pyx_result.signature = __pyx_state[2]; __pyx_result.user_state_context = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 4) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result.bundle_finalizer_param = __pyx_state[0]; __pyx_result.output_handler = __pyx_state[1]; __pyx_result.signature = __pyx_state[2]; __pyx_result.user_state_context = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[4])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_DoFnInvoker__set_state(DoFnInvoker __pyx_result, tuple __pyx_state):
 *     __pyx_result.bundle_finalizer_param = __pyx_state[0]; __pyx_result.output_handler = __pyx_state[1]; __pyx_result.signature = __pyx_state[2]; __pyx_result.user_state_context = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_DoFnInvoker__set_state(<DoFnInvoker> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DoFnInvoker__set_state(DoFnInvoker __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.bundle_finalizer_param = __pyx_state[0]; __pyx_result.output_handler = __pyx_state[1]; __pyx_result.signature = __pyx_state[2]; __pyx_result.user_state_context = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_SimpleInvoker(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_15__pyx_unpickle_SimpleInvoker(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_15__pyx_unpickle_SimpleInvoker = {"__pyx_unpickle_SimpleInvoker", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_15__pyx_unpickle_SimpleInvoker, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_15__pyx_unpickle_SimpleInvoker(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SimpleInvoker", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SimpleInvoker", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_SimpleInvoker") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SimpleInvoker", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle_SimpleInvoker", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6common_14__pyx_unpickle_SimpleInvoker(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_11apache_beam_7runners_6common_14__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_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__141)
  __Pyx_RefNannySetupContext("__pyx_unpickle_SimpleInvoker", 0);
  __Pyx_TraceCall("__pyx_unpickle_SimpleInvoker", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x7bd7f82, 0x157f725, 0x3b947d9):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x7bd7f82, 0x157f725, 0x3b947d9) = (bundle_finalizer_param, output_handler, process_batch_method, process_method, signature, user_state_context))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__142, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x7bd7f82, 0x157f725, 0x3b947d9):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x7bd7f82, 0x157f725, 0x3b947d9) = (bundle_finalizer_param, output_handler, process_batch_method, process_method, signature, user_state_context))" % __pyx_checksum)
 *     __pyx_result = SimpleInvoker.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0x7bd7f82, 0x157f725, 0x3b947d9):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x7bd7f82, 0x157f725, 0x3b947d9) = (bundle_finalizer_param, output_handler, process_batch_method, process_method, signature, user_state_context))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = SimpleInvoker.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_5, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __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(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x7bd7f82, 0x157f725, 0x3b947d9):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x7bd7f82, 0x157f725, 0x3b947d9) = (bundle_finalizer_param, output_handler, process_batch_method, process_method, signature, user_state_context))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x7bd7f82, 0x157f725, 0x3b947d9) = (bundle_finalizer_param, output_handler, process_batch_method, process_method, signature, user_state_context))" % __pyx_checksum)
 *     __pyx_result = SimpleInvoker.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_SimpleInvoker__set_state(<SimpleInvoker> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x7bd7f82, 0x157f725, 0x3b947d9) = (bundle_finalizer_param, output_handler, process_batch_method, process_method, signature, user_state_context))" % __pyx_checksum)
 *     __pyx_result = SimpleInvoker.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_SimpleInvoker__set_state(<SimpleInvoker> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = SimpleInvoker.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_SimpleInvoker__set_state(<SimpleInvoker> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_SimpleInvoker__set_state(SimpleInvoker __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __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)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x7bd7f82, 0x157f725, 0x3b947d9) = (bundle_finalizer_param, output_handler, process_batch_method, process_method, signature, user_state_context))" % __pyx_checksum)
 *     __pyx_result = SimpleInvoker.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_SimpleInvoker__set_state(<SimpleInvoker> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_SimpleInvoker__set_state(<SimpleInvoker> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_SimpleInvoker__set_state(SimpleInvoker __pyx_result, tuple __pyx_state):
 *     __pyx_result.bundle_finalizer_param = __pyx_state[0]; __pyx_result.output_handler = __pyx_state[1]; __pyx_result.process_batch_method = __pyx_state[2]; __pyx_result.process_method = __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)":1
 * def __pyx_unpickle_SimpleInvoker(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* 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.runners.common.__pyx_unpickle_SimpleInvoker", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_SimpleInvoker__set_state(<SimpleInvoker> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_SimpleInvoker__set_state(SimpleInvoker __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.bundle_finalizer_param = __pyx_state[0]; __pyx_result.output_handler = __pyx_state[1]; __pyx_result.process_batch_method = __pyx_state[2]; __pyx_result.process_method = __pyx_state[3]; __pyx_result.signature = __pyx_state[4]; __pyx_result.user_state_context = __pyx_state[5]
 *     if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'):
 */

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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __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("__pyx_unpickle_SimpleInvoker__set_state", 0);
  __Pyx_TraceCall("__pyx_unpickle_SimpleInvoker__set_state", __pyx_f[1], 11, 0, __PYX_ERR(1, 11, __pyx_L1_error));

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_SimpleInvoker__set_state(SimpleInvoker __pyx_result, tuple __pyx_state):
 *     __pyx_result.bundle_finalizer_param = __pyx_state[0]; __pyx_result.output_handler = __pyx_state[1]; __pyx_result.process_batch_method = __pyx_state[2]; __pyx_result.process_method = __pyx_state[3]; __pyx_result.signature = __pyx_state[4]; __pyx_result.user_state_context = __pyx_state[5]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[6])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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_ptype_11apache_beam_7runners_6common_OutputHandler))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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_ptype_11apache_beam_7runners_6common_DoFnSignature))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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, tuple __pyx_state):
 *     __pyx_result.bundle_finalizer_param = __pyx_state[0]; __pyx_result.output_handler = __pyx_state[1]; __pyx_result.process_batch_method = __pyx_state[2]; __pyx_result.process_method = __pyx_state[3]; __pyx_result.signature = __pyx_state[4]; __pyx_result.user_state_context = __pyx_state[5]
 *     if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[6])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 6) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result.bundle_finalizer_param = __pyx_state[0]; __pyx_result.output_handler = __pyx_state[1]; __pyx_result.process_batch_method = __pyx_state[2]; __pyx_result.process_method = __pyx_state[3]; __pyx_result.signature = __pyx_state[4]; __pyx_result.user_state_context = __pyx_state[5]
 *     if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[6])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_SimpleInvoker__set_state(SimpleInvoker __pyx_result, tuple __pyx_state):
 *     __pyx_result.bundle_finalizer_param = __pyx_state[0]; __pyx_result.output_handler = __pyx_state[1]; __pyx_result.process_batch_method = __pyx_state[2]; __pyx_result.process_method = __pyx_state[3]; __pyx_result.signature = __pyx_state[4]; __pyx_result.user_state_context = __pyx_state[5]
 *     if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[6])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_SimpleInvoker__set_state(<SimpleInvoker> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_SimpleInvoker__set_state(SimpleInvoker __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.bundle_finalizer_param = __pyx_state[0]; __pyx_result.output_handler = __pyx_state[1]; __pyx_result.process_batch_method = __pyx_state[2]; __pyx_result.process_method = __pyx_state[3]; __pyx_result.signature = __pyx_state[4]; __pyx_result.user_state_context = __pyx_state[5]
 *     if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_PerWindowInvoker(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_17__pyx_unpickle_PerWindowInvoker(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_17__pyx_unpickle_PerWindowInvoker = {"__pyx_unpickle_PerWindowInvoker", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_17__pyx_unpickle_PerWindowInvoker, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_17__pyx_unpickle_PerWindowInvoker(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PerWindowInvoker", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PerWindowInvoker", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_PerWindowInvoker") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PerWindowInvoker", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle_PerWindowInvoker", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6common_16__pyx_unpickle_PerWindowInvoker(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_11apache_beam_7runners_6common_16__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_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__143)
  __Pyx_RefNannySetupContext("__pyx_unpickle_PerWindowInvoker", 0);
  __Pyx_TraceCall("__pyx_unpickle_PerWindowInvoker", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xb7d4fae, 0xcfd00ef, 0xf533ced):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb7d4fae, 0xcfd00ef, 0xf533ced) = (args_for_process, args_for_process_batch, bundle_finalizer_param, cache_globally_windowed_args, context, current_window_index, current_windowed_value, 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, restriction, side_inputs, signature, splitting_lock, stop_window_index, threadsafe_restriction_tracker, threadsafe_watermark_estimator, user_state_context, watermark_estimator_state))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__144, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xb7d4fae, 0xcfd00ef, 0xf533ced):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb7d4fae, 0xcfd00ef, 0xf533ced) = (args_for_process, args_for_process_batch, bundle_finalizer_param, cache_globally_windowed_args, context, current_window_index, current_windowed_value, 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, restriction, side_inputs, signature, splitting_lock, stop_window_index, threadsafe_restriction_tracker, threadsafe_watermark_estimator, user_state_context, watermark_estimator_state))" % __pyx_checksum)
 *     __pyx_result = PerWindowInvoker.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0xb7d4fae, 0xcfd00ef, 0xf533ced):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb7d4fae, 0xcfd00ef, 0xf533ced) = (args_for_process, args_for_process_batch, bundle_finalizer_param, cache_globally_windowed_args, context, current_window_index, current_windowed_value, 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, restriction, side_inputs, signature, splitting_lock, stop_window_index, threadsafe_restriction_tracker, threadsafe_watermark_estimator, user_state_context, watermark_estimator_state))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = PerWindowInvoker.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_6, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __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(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xb7d4fae, 0xcfd00ef, 0xf533ced):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb7d4fae, 0xcfd00ef, 0xf533ced) = (args_for_process, args_for_process_batch, bundle_finalizer_param, cache_globally_windowed_args, context, current_window_index, current_windowed_value, 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, restriction, side_inputs, signature, splitting_lock, stop_window_index, threadsafe_restriction_tracker, threadsafe_watermark_estimator, user_state_context, watermark_estimator_state))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb7d4fae, 0xcfd00ef, 0xf533ced) = (args_for_process, args_for_process_batch, bundle_finalizer_param, cache_globally_windowed_args, context, current_window_index, current_windowed_value, 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, restriction, side_inputs, signature, splitting_lock, stop_window_index, threadsafe_restriction_tracker, threadsafe_watermark_estimator, user_state_context, watermark_estimator_state))" % __pyx_checksum)
 *     __pyx_result = PerWindowInvoker.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_PerWindowInvoker__set_state(<PerWindowInvoker> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb7d4fae, 0xcfd00ef, 0xf533ced) = (args_for_process, args_for_process_batch, bundle_finalizer_param, cache_globally_windowed_args, context, current_window_index, current_windowed_value, 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, restriction, side_inputs, signature, splitting_lock, stop_window_index, threadsafe_restriction_tracker, threadsafe_watermark_estimator, user_state_context, watermark_estimator_state))" % __pyx_checksum)
 *     __pyx_result = PerWindowInvoker.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_PerWindowInvoker__set_state(<PerWindowInvoker> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = PerWindowInvoker.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_PerWindowInvoker__set_state(<PerWindowInvoker> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_PerWindowInvoker__set_state(PerWindowInvoker __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __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)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb7d4fae, 0xcfd00ef, 0xf533ced) = (args_for_process, args_for_process_batch, bundle_finalizer_param, cache_globally_windowed_args, context, current_window_index, current_windowed_value, 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, restriction, side_inputs, signature, splitting_lock, stop_window_index, threadsafe_restriction_tracker, threadsafe_watermark_estimator, user_state_context, watermark_estimator_state))" % __pyx_checksum)
 *     __pyx_result = PerWindowInvoker.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_PerWindowInvoker__set_state(<PerWindowInvoker> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_PerWindowInvoker__set_state(<PerWindowInvoker> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_PerWindowInvoker__set_state(PerWindowInvoker __pyx_result, tuple __pyx_state):
 *     __pyx_result.args_for_process = __pyx_state[0]; __pyx_result.args_for_process_batch = __pyx_state[1]; __pyx_result.bundle_finalizer_param = __pyx_state[2]; __pyx_result.cache_globally_windowed_args = __pyx_state[3]; __pyx_result.context = __pyx_state[4]; __pyx_result.current_window_index = __pyx_state[5]; __pyx_result.current_windowed_value = __pyx_state[6]; __pyx_result.has_windowed_inputs = __pyx_state[7]; __pyx_result.is_key_param_required = __pyx_state[8]; __pyx_result.is_splittable = __pyx_state[9]; __pyx_result.kwargs_for_process = __pyx_state[10]; __pyx_result.kwargs_for_process_batch = __pyx_state[11]; __pyx_result.output_handler = __pyx_state[12]; __pyx_result.placeholders_for_process = __pyx_state[13]; __pyx_result.placeholders_for_process_batch = __pyx_state[14]; __pyx_result.process_batch_method = __pyx_state[15]; __pyx_result.process_method = __pyx_state[16]; __pyx_result.restriction = __pyx_state[17]; __pyx_result.side_inputs = __pyx_state[18]; __pyx_result.signature = __pyx_state[19]; __pyx_result.splitting_lock = __pyx_state[20]; __pyx_result.stop_window_index = __pyx_state[21]; __pyx_result.threadsafe_restriction_tracker = __pyx_state[22]; __pyx_result.threadsafe_watermark_estimator = __pyx_state[23]; __pyx_result.user_state_context = __pyx_state[24]; __pyx_result.watermark_estimator_state = __pyx_state[25]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_PerWindowInvoker(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* 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.runners.common.__pyx_unpickle_PerWindowInvoker", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_PerWindowInvoker__set_state(<PerWindowInvoker> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_PerWindowInvoker__set_state(PerWindowInvoker __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.args_for_process = __pyx_state[0]; __pyx_result.args_for_process_batch = __pyx_state[1]; __pyx_result.bundle_finalizer_param = __pyx_state[2]; __pyx_result.cache_globally_windowed_args = __pyx_state[3]; __pyx_result.context = __pyx_state[4]; __pyx_result.current_window_index = __pyx_state[5]; __pyx_result.current_windowed_value = __pyx_state[6]; __pyx_result.has_windowed_inputs = __pyx_state[7]; __pyx_result.is_key_param_required = __pyx_state[8]; __pyx_result.is_splittable = __pyx_state[9]; __pyx_result.kwargs_for_process = __pyx_state[10]; __pyx_result.kwargs_for_process_batch = __pyx_state[11]; __pyx_result.output_handler = __pyx_state[12]; __pyx_result.placeholders_for_process = __pyx_state[13]; __pyx_result.placeholders_for_process_batch = __pyx_state[14]; __pyx_result.process_batch_method = __pyx_state[15]; __pyx_result.process_method = __pyx_state[16]; __pyx_result.restriction = __pyx_state[17]; __pyx_result.side_inputs = __pyx_state[18]; __pyx_result.signature = __pyx_state[19]; __pyx_result.splitting_lock = __pyx_state[20]; __pyx_result.stop_window_index = __pyx_state[21]; __pyx_result.threadsafe_restriction_tracker = __pyx_state[22]; __pyx_result.threadsafe_watermark_estimator = __pyx_state[23]; __pyx_result.user_state_context = __pyx_state[24]; __pyx_result.watermark_estimator_state = __pyx_state[25]
 *     if len(__pyx_state) > 26 and hasattr(__pyx_result, '__dict__'):
 */

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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __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("__pyx_unpickle_PerWindowInvoker__set_state", 0);
  __Pyx_TraceCall("__pyx_unpickle_PerWindowInvoker__set_state", __pyx_f[1], 11, 0, __PYX_ERR(1, 11, __pyx_L1_error));

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_PerWindowInvoker__set_state(PerWindowInvoker __pyx_result, tuple __pyx_state):
 *     __pyx_result.args_for_process = __pyx_state[0]; __pyx_result.args_for_process_batch = __pyx_state[1]; __pyx_result.bundle_finalizer_param = __pyx_state[2]; __pyx_result.cache_globally_windowed_args = __pyx_state[3]; __pyx_result.context = __pyx_state[4]; __pyx_result.current_window_index = __pyx_state[5]; __pyx_result.current_windowed_value = __pyx_state[6]; __pyx_result.has_windowed_inputs = __pyx_state[7]; __pyx_result.is_key_param_required = __pyx_state[8]; __pyx_result.is_splittable = __pyx_state[9]; __pyx_result.kwargs_for_process = __pyx_state[10]; __pyx_result.kwargs_for_process_batch = __pyx_state[11]; __pyx_result.output_handler = __pyx_state[12]; __pyx_result.placeholders_for_process = __pyx_state[13]; __pyx_result.placeholders_for_process_batch = __pyx_state[14]; __pyx_result.process_batch_method = __pyx_state[15]; __pyx_result.process_method = __pyx_state[16]; __pyx_result.restriction = __pyx_state[17]; __pyx_result.side_inputs = __pyx_state[18]; __pyx_result.signature = __pyx_state[19]; __pyx_result.splitting_lock = __pyx_state[20]; __pyx_result.stop_window_index = __pyx_state[21]; __pyx_result.threadsafe_restriction_tracker = __pyx_state[22]; __pyx_result.threadsafe_watermark_estimator = __pyx_state[23]; __pyx_result.user_state_context = __pyx_state[24]; __pyx_result.watermark_estimator_state = __pyx_state[25]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 26 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[26])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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->cache_globally_windowed_args = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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_ptype_11apache_beam_7runners_6common_DoFnContext))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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_ptype_11apache_beam_5utils_14windowed_value_WindowedValue))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 10, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 11, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 12, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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_ptype_11apache_beam_7runners_6common_OutputHandler))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 13, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 14, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 15, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 16, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 17, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 18, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 19, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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_ptype_11apache_beam_7runners_6common_DoFnSignature))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 20, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 21, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 22, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 23, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 24, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 25, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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, tuple __pyx_state):
 *     __pyx_result.args_for_process = __pyx_state[0]; __pyx_result.args_for_process_batch = __pyx_state[1]; __pyx_result.bundle_finalizer_param = __pyx_state[2]; __pyx_result.cache_globally_windowed_args = __pyx_state[3]; __pyx_result.context = __pyx_state[4]; __pyx_result.current_window_index = __pyx_state[5]; __pyx_result.current_windowed_value = __pyx_state[6]; __pyx_result.has_windowed_inputs = __pyx_state[7]; __pyx_result.is_key_param_required = __pyx_state[8]; __pyx_result.is_splittable = __pyx_state[9]; __pyx_result.kwargs_for_process = __pyx_state[10]; __pyx_result.kwargs_for_process_batch = __pyx_state[11]; __pyx_result.output_handler = __pyx_state[12]; __pyx_result.placeholders_for_process = __pyx_state[13]; __pyx_result.placeholders_for_process_batch = __pyx_state[14]; __pyx_result.process_batch_method = __pyx_state[15]; __pyx_result.process_method = __pyx_state[16]; __pyx_result.restriction = __pyx_state[17]; __pyx_result.side_inputs = __pyx_state[18]; __pyx_result.signature = __pyx_state[19]; __pyx_result.splitting_lock = __pyx_state[20]; __pyx_result.stop_window_index = __pyx_state[21]; __pyx_result.threadsafe_restriction_tracker = __pyx_state[22]; __pyx_result.threadsafe_watermark_estimator = __pyx_state[23]; __pyx_result.user_state_context = __pyx_state[24]; __pyx_result.watermark_estimator_state = __pyx_state[25]
 *     if len(__pyx_state) > 26 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[26])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 26) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result.args_for_process = __pyx_state[0]; __pyx_result.args_for_process_batch = __pyx_state[1]; __pyx_result.bundle_finalizer_param = __pyx_state[2]; __pyx_result.cache_globally_windowed_args = __pyx_state[3]; __pyx_result.context = __pyx_state[4]; __pyx_result.current_window_index = __pyx_state[5]; __pyx_result.current_windowed_value = __pyx_state[6]; __pyx_result.has_windowed_inputs = __pyx_state[7]; __pyx_result.is_key_param_required = __pyx_state[8]; __pyx_result.is_splittable = __pyx_state[9]; __pyx_result.kwargs_for_process = __pyx_state[10]; __pyx_result.kwargs_for_process_batch = __pyx_state[11]; __pyx_result.output_handler = __pyx_state[12]; __pyx_result.placeholders_for_process = __pyx_state[13]; __pyx_result.placeholders_for_process_batch = __pyx_state[14]; __pyx_result.process_batch_method = __pyx_state[15]; __pyx_result.process_method = __pyx_state[16]; __pyx_result.restriction = __pyx_state[17]; __pyx_result.side_inputs = __pyx_state[18]; __pyx_result.signature = __pyx_state[19]; __pyx_result.splitting_lock = __pyx_state[20]; __pyx_result.stop_window_index = __pyx_state[21]; __pyx_result.threadsafe_restriction_tracker = __pyx_state[22]; __pyx_result.threadsafe_watermark_estimator = __pyx_state[23]; __pyx_result.user_state_context = __pyx_state[24]; __pyx_result.watermark_estimator_state = __pyx_state[25]
 *     if len(__pyx_state) > 26 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[26])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 26, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_PerWindowInvoker__set_state(PerWindowInvoker __pyx_result, tuple __pyx_state):
 *     __pyx_result.args_for_process = __pyx_state[0]; __pyx_result.args_for_process_batch = __pyx_state[1]; __pyx_result.bundle_finalizer_param = __pyx_state[2]; __pyx_result.cache_globally_windowed_args = __pyx_state[3]; __pyx_result.context = __pyx_state[4]; __pyx_result.current_window_index = __pyx_state[5]; __pyx_result.current_windowed_value = __pyx_state[6]; __pyx_result.has_windowed_inputs = __pyx_state[7]; __pyx_result.is_key_param_required = __pyx_state[8]; __pyx_result.is_splittable = __pyx_state[9]; __pyx_result.kwargs_for_process = __pyx_state[10]; __pyx_result.kwargs_for_process_batch = __pyx_state[11]; __pyx_result.output_handler = __pyx_state[12]; __pyx_result.placeholders_for_process = __pyx_state[13]; __pyx_result.placeholders_for_process_batch = __pyx_state[14]; __pyx_result.process_batch_method = __pyx_state[15]; __pyx_result.process_method = __pyx_state[16]; __pyx_result.restriction = __pyx_state[17]; __pyx_result.side_inputs = __pyx_state[18]; __pyx_result.signature = __pyx_state[19]; __pyx_result.splitting_lock = __pyx_state[20]; __pyx_result.stop_window_index = __pyx_state[21]; __pyx_result.threadsafe_restriction_tracker = __pyx_state[22]; __pyx_result.threadsafe_watermark_estimator = __pyx_state[23]; __pyx_result.user_state_context = __pyx_state[24]; __pyx_result.watermark_estimator_state = __pyx_state[25]
 *     if len(__pyx_state) > 26 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[26])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_PerWindowInvoker__set_state(<PerWindowInvoker> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_PerWindowInvoker__set_state(PerWindowInvoker __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.args_for_process = __pyx_state[0]; __pyx_result.args_for_process_batch = __pyx_state[1]; __pyx_result.bundle_finalizer_param = __pyx_state[2]; __pyx_result.cache_globally_windowed_args = __pyx_state[3]; __pyx_result.context = __pyx_state[4]; __pyx_result.current_window_index = __pyx_state[5]; __pyx_result.current_windowed_value = __pyx_state[6]; __pyx_result.has_windowed_inputs = __pyx_state[7]; __pyx_result.is_key_param_required = __pyx_state[8]; __pyx_result.is_splittable = __pyx_state[9]; __pyx_result.kwargs_for_process = __pyx_state[10]; __pyx_result.kwargs_for_process_batch = __pyx_state[11]; __pyx_result.output_handler = __pyx_state[12]; __pyx_result.placeholders_for_process = __pyx_state[13]; __pyx_result.placeholders_for_process_batch = __pyx_state[14]; __pyx_result.process_batch_method = __pyx_state[15]; __pyx_result.process_method = __pyx_state[16]; __pyx_result.restriction = __pyx_state[17]; __pyx_result.side_inputs = __pyx_state[18]; __pyx_result.signature = __pyx_state[19]; __pyx_result.splitting_lock = __pyx_state[20]; __pyx_result.stop_window_index = __pyx_state[21]; __pyx_result.threadsafe_restriction_tracker = __pyx_state[22]; __pyx_result.threadsafe_watermark_estimator = __pyx_state[23]; __pyx_result.user_state_context = __pyx_state[24]; __pyx_result.watermark_estimator_state = __pyx_state[25]
 *     if len(__pyx_state) > 26 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_DoFnRunner(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_19__pyx_unpickle_DoFnRunner(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_19__pyx_unpickle_DoFnRunner = {"__pyx_unpickle_DoFnRunner", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_19__pyx_unpickle_DoFnRunner, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_19__pyx_unpickle_DoFnRunner(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DoFnRunner", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DoFnRunner", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_DoFnRunner") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DoFnRunner", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle_DoFnRunner", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6common_18__pyx_unpickle_DoFnRunner(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_11apache_beam_7runners_6common_18__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_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__145)
  __Pyx_RefNannySetupContext("__pyx_unpickle_DoFnRunner", 0);
  __Pyx_TraceCall("__pyx_unpickle_DoFnRunner", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x503639a, 0x177d0a4, 0x8a5d4de):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x503639a, 0x177d0a4, 0x8a5d4de) = (bundle_finalizer_param, context, do_fn_invoker, execution_context, side_inputs, step_name, transform_id))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__146, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x503639a, 0x177d0a4, 0x8a5d4de):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x503639a, 0x177d0a4, 0x8a5d4de) = (bundle_finalizer_param, context, do_fn_invoker, execution_context, side_inputs, step_name, transform_id))" % __pyx_checksum)
 *     __pyx_result = DoFnRunner.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0x503639a, 0x177d0a4, 0x8a5d4de):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x503639a, 0x177d0a4, 0x8a5d4de) = (bundle_finalizer_param, context, do_fn_invoker, execution_context, side_inputs, step_name, transform_id))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = DoFnRunner.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_7, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __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(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x503639a, 0x177d0a4, 0x8a5d4de):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x503639a, 0x177d0a4, 0x8a5d4de) = (bundle_finalizer_param, context, do_fn_invoker, execution_context, side_inputs, step_name, transform_id))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x503639a, 0x177d0a4, 0x8a5d4de) = (bundle_finalizer_param, context, do_fn_invoker, execution_context, side_inputs, step_name, transform_id))" % __pyx_checksum)
 *     __pyx_result = DoFnRunner.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DoFnRunner__set_state(<DoFnRunner> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x503639a, 0x177d0a4, 0x8a5d4de) = (bundle_finalizer_param, context, do_fn_invoker, execution_context, side_inputs, step_name, transform_id))" % __pyx_checksum)
 *     __pyx_result = DoFnRunner.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DoFnRunner__set_state(<DoFnRunner> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = DoFnRunner.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DoFnRunner__set_state(<DoFnRunner> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_DoFnRunner__set_state(DoFnRunner __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __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)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x503639a, 0x177d0a4, 0x8a5d4de) = (bundle_finalizer_param, context, do_fn_invoker, execution_context, side_inputs, step_name, transform_id))" % __pyx_checksum)
 *     __pyx_result = DoFnRunner.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DoFnRunner__set_state(<DoFnRunner> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DoFnRunner__set_state(<DoFnRunner> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_DoFnRunner__set_state(DoFnRunner __pyx_result, tuple __pyx_state):
 *     __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)":1
 * def __pyx_unpickle_DoFnRunner(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* 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.runners.common.__pyx_unpickle_DoFnRunner", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_DoFnRunner__set_state(<DoFnRunner> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DoFnRunner__set_state(DoFnRunner __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __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]
 *     if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
 */

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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __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("__pyx_unpickle_DoFnRunner__set_state", 0);
  __Pyx_TraceCall("__pyx_unpickle_DoFnRunner__set_state", __pyx_f[1], 11, 0, __PYX_ERR(1, 11, __pyx_L1_error));

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_DoFnRunner__set_state(DoFnRunner __pyx_result, tuple __pyx_state):
 *     __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]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[7])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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_ptype_11apache_beam_7runners_6common_DoFnContext))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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_ptype_11apache_beam_7runners_6common_DoFnInvoker))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) __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, tuple __pyx_state):
 *     __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]
 *     if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[7])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 7) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __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]
 *     if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[7])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_DoFnRunner__set_state(DoFnRunner __pyx_result, tuple __pyx_state):
 *     __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]
 *     if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[7])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_DoFnRunner__set_state(<DoFnRunner> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DoFnRunner__set_state(DoFnRunner __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __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]
 *     if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_OutputHandler(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_21__pyx_unpickle_OutputHandler(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_21__pyx_unpickle_OutputHandler = {"__pyx_unpickle_OutputHandler", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_21__pyx_unpickle_OutputHandler, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_21__pyx_unpickle_OutputHandler(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_OutputHandler", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_OutputHandler", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_OutputHandler") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_OutputHandler", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle_OutputHandler", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6common_20__pyx_unpickle_OutputHandler(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_11apache_beam_7runners_6common_20__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_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__147)
  __Pyx_RefNannySetupContext("__pyx_unpickle_OutputHandler", 0);
  __Pyx_TraceCall("__pyx_unpickle_OutputHandler", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__134, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = OutputHandler.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = OutputHandler.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __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(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = OutputHandler.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_OutputHandler__set_state(<OutputHandler> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_OutputHandler), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __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_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(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, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __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)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __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, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_OutputHandler(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* 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.runners.common.__pyx_unpickle_OutputHandler", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __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, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_OutputHandler__set_state", 0);
  __Pyx_TraceCall("__pyx_unpickle_OutputHandler__set_state", __pyx_f[1], 11, 0, __PYX_ERR(1, 11, __pyx_L1_error));

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_OutputHandler__set_state(OutputHandler __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_3 != 0);
  __pyx_t_1 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_OutputHandler__set_state(OutputHandler __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 13, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_OutputHandler__set_state(OutputHandler __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  }

  /* "(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, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  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_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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle__OutputHandler(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_23__pyx_unpickle__OutputHandler(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_23__pyx_unpickle__OutputHandler = {"__pyx_unpickle__OutputHandler", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_23__pyx_unpickle__OutputHandler, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_23__pyx_unpickle__OutputHandler(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__OutputHandler", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__OutputHandler", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle__OutputHandler") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__OutputHandler", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle__OutputHandler", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6common_22__pyx_unpickle__OutputHandler(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_11apache_beam_7runners_6common_22__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_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__148)
  __Pyx_RefNannySetupContext("__pyx_unpickle__OutputHandler", 0);
  __Pyx_TraceCall("__pyx_unpickle__OutputHandler", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xca1400f, 0xa5be297, 0x46a3542):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xca1400f, 0xa5be297, 0x46a3542) = (_process_batch_yields_elements, _process_yields_batches, main_receivers, output_batch_converter, per_element_output_counter, tagged_receivers, window_fn))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__149, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xca1400f, 0xa5be297, 0x46a3542):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xca1400f, 0xa5be297, 0x46a3542) = (_process_batch_yields_elements, _process_yields_batches, main_receivers, output_batch_converter, per_element_output_counter, tagged_receivers, window_fn))" % __pyx_checksum)
 *     __pyx_result = _OutputHandler.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0xca1400f, 0xa5be297, 0x46a3542):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xca1400f, 0xa5be297, 0x46a3542) = (_process_batch_yields_elements, _process_yields_batches, main_receivers, output_batch_converter, per_element_output_counter, tagged_receivers, window_fn))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = _OutputHandler.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_8, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __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(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xca1400f, 0xa5be297, 0x46a3542):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xca1400f, 0xa5be297, 0x46a3542) = (_process_batch_yields_elements, _process_yields_batches, main_receivers, output_batch_converter, per_element_output_counter, tagged_receivers, window_fn))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xca1400f, 0xa5be297, 0x46a3542) = (_process_batch_yields_elements, _process_yields_batches, main_receivers, output_batch_converter, per_element_output_counter, tagged_receivers, window_fn))" % __pyx_checksum)
 *     __pyx_result = _OutputHandler.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle__OutputHandler__set_state(<_OutputHandler> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_7runners_6common__OutputHandler), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xca1400f, 0xa5be297, 0x46a3542) = (_process_batch_yields_elements, _process_yields_batches, main_receivers, output_batch_converter, per_element_output_counter, tagged_receivers, window_fn))" % __pyx_checksum)
 *     __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_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(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, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __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)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xca1400f, 0xa5be297, 0x46a3542) = (_process_batch_yields_elements, _process_yields_batches, main_receivers, output_batch_converter, per_element_output_counter, tagged_receivers, window_fn))" % __pyx_checksum)
 *     __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, tuple __pyx_state):
 *     __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)":1
 * def __pyx_unpickle__OutputHandler(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* 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.runners.common.__pyx_unpickle__OutputHandler", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __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, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __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]
 *     if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
 */

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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __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("__pyx_unpickle__OutputHandler__set_state", 0);
  __Pyx_TraceCall("__pyx_unpickle__OutputHandler__set_state", __pyx_f[1], 11, 0, __PYX_ERR(1, 11, __pyx_L1_error));

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle__OutputHandler__set_state(_OutputHandler __pyx_result, tuple __pyx_state):
 *     __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]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[7])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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_ptype_11apache_beam_7runners_6common_Receiver))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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, tuple __pyx_state):
 *     __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]
 *     if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[7])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 7) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __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]
 *     if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[7])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle__OutputHandler__set_state(_OutputHandler __pyx_result, tuple __pyx_state):
 *     __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]
 *     if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[7])
 */
  }

  /* "(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, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __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]
 *     if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_DoFnContext(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6common_25__pyx_unpickle_DoFnContext(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_25__pyx_unpickle_DoFnContext = {"__pyx_unpickle_DoFnContext", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_25__pyx_unpickle_DoFnContext, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6common_25__pyx_unpickle_DoFnContext(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 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);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DoFnContext", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DoFnContext", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_DoFnContext") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DoFnContext", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle_DoFnContext", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6common_24__pyx_unpickle_DoFnContext(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_11apache_beam_7runners_6common_24__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_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__150)
  __Pyx_RefNannySetupContext("__pyx_unpickle_DoFnContext", 0);
  __Pyx_TraceCall("__pyx_unpickle_DoFnContext", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x1b535c7, 0x3a8e3cf, 0xba3ce3b):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x1b535c7, 0x3a8e3cf, 0xba3ce3b) = (label, state, windowed_value))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__151, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x1b535c7, 0x3a8e3cf, 0xba3ce3b):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x1b535c7, 0x3a8e3cf, 0xba3ce3b) = (label, state, windowed_value))" % __pyx_checksum)
 *     __pyx_result = DoFnContext.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0x1b535c7, 0x3a8e3cf, 0xba3ce3b):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x1b535c7, 0x3a8e3cf, 0xba3ce3b) = (label, state, windowed_value))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = DoFnContext.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_9, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __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(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x1b535c7, 0x3a8e3cf, 0xba3ce3b):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x1b535c7, 0x3a8e3cf, 0xba3ce3b) = (label, state, windowed_value))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x1b535c7, 0x3a8e3cf, 0xba3ce3b) = (label, state, windowed_value))" % __pyx_checksum)
 *     __pyx_result = DoFnContext.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DoFnContext__set_state(<DoFnContext> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnContext), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x1b535c7, 0x3a8e3cf, 0xba3ce3b) = (label, state, windowed_value))" % __pyx_checksum)
 *     __pyx_result = DoFnContext.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DoFnContext__set_state(<DoFnContext> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = DoFnContext.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DoFnContext__set_state(<DoFnContext> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_DoFnContext__set_state(DoFnContext __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __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)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x1b535c7, 0x3a8e3cf, 0xba3ce3b) = (label, state, windowed_value))" % __pyx_checksum)
 *     __pyx_result = DoFnContext.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DoFnContext__set_state(<DoFnContext> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DoFnContext__set_state(<DoFnContext> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_DoFnContext__set_state(DoFnContext __pyx_result, tuple __pyx_state):
 *     __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)":1
 * def __pyx_unpickle_DoFnContext(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* 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.runners.common.__pyx_unpickle_DoFnContext", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_DoFnContext__set_state(<DoFnContext> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DoFnContext__set_state(DoFnContext __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.label = __pyx_state[0]; __pyx_result.state = __pyx_state[1]; __pyx_result.windowed_value = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

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_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __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("__pyx_unpickle_DoFnContext__set_state", 0);
  __Pyx_TraceCall("__pyx_unpickle_DoFnContext__set_state", __pyx_f[1], 11, 0, __PYX_ERR(1, 11, __pyx_L1_error));

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_DoFnContext__set_state(DoFnContext __pyx_result, tuple __pyx_state):
 *     __pyx_result.label = __pyx_state[0]; __pyx_result.state = __pyx_state[1]; __pyx_result.windowed_value = __pyx_state[2]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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_ptype_11apache_beam_5utils_14windowed_value_WindowedValue))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__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, tuple __pyx_state):
 *     __pyx_result.label = __pyx_state[0]; __pyx_result.state = __pyx_state[1]; __pyx_result.windowed_value = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 3) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result.label = __pyx_state[0]; __pyx_result.state = __pyx_state[1]; __pyx_result.windowed_value = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_DoFnContext__set_state(DoFnContext __pyx_result, tuple __pyx_state):
 *     __pyx_result.label = __pyx_state[0]; __pyx_result.state = __pyx_state[1]; __pyx_result.windowed_value = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_DoFnContext__set_state(<DoFnContext> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DoFnContext__set_state(DoFnContext __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.label = __pyx_state[0]; __pyx_result.state = __pyx_state[1]; __pyx_result.windowed_value = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
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;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 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(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_11apache_beam_7runners_6common_Receiver[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_8Receiver_7__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_8Receiver_9__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

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*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  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*/
  "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*/
  0, /*tp_dictoffset*/
  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 PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #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;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 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(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    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);
  (*Py_TYPE(o)->tp_free)(o);
}

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;
  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*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_3invoke_timer_callback, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_11apache_beam_7runners_6common_MethodWrapper[] = {
  {(char *)"args", __pyx_getprop_11apache_beam_7runners_6common_13MethodWrapper_args, __pyx_setprop_11apache_beam_7runners_6common_13MethodWrapper_args, (char *)0, 0},
  {(char *)"defaults", __pyx_getprop_11apache_beam_7runners_6common_13MethodWrapper_defaults, __pyx_setprop_11apache_beam_7runners_6common_13MethodWrapper_defaults, (char *)0, 0},
  {(char *)"method_value", __pyx_getprop_11apache_beam_7runners_6common_13MethodWrapper_method_value, __pyx_setprop_11apache_beam_7runners_6common_13MethodWrapper_method_value, (char *)0, 0},
  {(char *)"watermark_estimator_provider", __pyx_getprop_11apache_beam_7runners_6common_13MethodWrapper_watermark_estimator_provider, __pyx_setprop_11apache_beam_7runners_6common_13MethodWrapper_watermark_estimator_provider, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

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*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  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*/
  "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*/
  0, /*tp_dictoffset*/
  __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 PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #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;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 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(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    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);
  (*Py_TYPE(o)->tp_free)(o);
}

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;
  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)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_3get_restriction_provider, METH_NOARGS, 0},
  {"get_watermark_estimator_provider", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_5get_watermark_estimator_provider, METH_NOARGS, 0},
  {"is_unbounded_per_element", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_7is_unbounded_per_element, METH_NOARGS, 0},
  {"_validate", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_9_validate, METH_NOARGS, 0},
  {"_check_duplicate_dofn_params", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_11_check_duplicate_dofn_params, METH_O, 0},
  {"_validate_process", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_13_validate_process, METH_NOARGS, __pyx_doc_11apache_beam_7runners_6common_13DoFnSignature_12_validate_process},
  {"_validate_process_batch", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_15_validate_process_batch, METH_NOARGS, 0},
  {"_validate_bundle_method", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_17_validate_bundle_method, METH_O, __pyx_doc_11apache_beam_7runners_6common_13DoFnSignature_16_validate_bundle_method},
  {"_validate_stateful_dofn", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_19_validate_stateful_dofn, METH_NOARGS, 0},
  {"is_splittable_dofn", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_21is_splittable_dofn, METH_NOARGS, 0},
  {"get_restriction_coder", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_23get_restriction_coder, METH_NOARGS, __pyx_doc_11apache_beam_7runners_6common_13DoFnSignature_22get_restriction_coder},
  {"is_stateful_dofn", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_25is_stateful_dofn, METH_NOARGS, 0},
  {"has_timers", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_27has_timers, METH_NOARGS, 0},
  {"has_bundle_finalization", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_29has_bundle_finalization, METH_NOARGS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_31__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_33__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_11apache_beam_7runners_6common_DoFnSignature[] = {
  {(char *)"process_method", __pyx_getprop_11apache_beam_7runners_6common_13DoFnSignature_process_method, __pyx_setprop_11apache_beam_7runners_6common_13DoFnSignature_process_method, (char *)0, 0},
  {(char *)"process_batch_method", __pyx_getprop_11apache_beam_7runners_6common_13DoFnSignature_process_batch_method, __pyx_setprop_11apache_beam_7runners_6common_13DoFnSignature_process_batch_method, (char *)0, 0},
  {(char *)"start_bundle_method", __pyx_getprop_11apache_beam_7runners_6common_13DoFnSignature_start_bundle_method, __pyx_setprop_11apache_beam_7runners_6common_13DoFnSignature_start_bundle_method, (char *)0, 0},
  {(char *)"finish_bundle_method", __pyx_getprop_11apache_beam_7runners_6common_13DoFnSignature_finish_bundle_method, __pyx_setprop_11apache_beam_7runners_6common_13DoFnSignature_finish_bundle_method, (char *)0, 0},
  {(char *)"setup_lifecycle_method", __pyx_getprop_11apache_beam_7runners_6common_13DoFnSignature_setup_lifecycle_method, __pyx_setprop_11apache_beam_7runners_6common_13DoFnSignature_setup_lifecycle_method, (char *)0, 0},
  {(char *)"teardown_lifecycle_method", __pyx_getprop_11apache_beam_7runners_6common_13DoFnSignature_teardown_lifecycle_method, __pyx_setprop_11apache_beam_7runners_6common_13DoFnSignature_teardown_lifecycle_method, (char *)0, 0},
  {(char *)"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, (char *)0, 0},
  {(char *)"initial_restriction_method", __pyx_getprop_11apache_beam_7runners_6common_13DoFnSignature_initial_restriction_method, __pyx_setprop_11apache_beam_7runners_6common_13DoFnSignature_initial_restriction_method, (char *)0, 0},
  {(char *)"create_tracker_method", __pyx_getprop_11apache_beam_7runners_6common_13DoFnSignature_create_tracker_method, __pyx_setprop_11apache_beam_7runners_6common_13DoFnSignature_create_tracker_method, (char *)0, 0},
  {(char *)"split_method", __pyx_getprop_11apache_beam_7runners_6common_13DoFnSignature_split_method, __pyx_setprop_11apache_beam_7runners_6common_13DoFnSignature_split_method, (char *)0, 0},
  {(char *)"batching_configuration", __pyx_getprop_11apache_beam_7runners_6common_13DoFnSignature_batching_configuration, __pyx_setprop_11apache_beam_7runners_6common_13DoFnSignature_batching_configuration, (char *)0, 0},
  {(char *)"do_fn", __pyx_getprop_11apache_beam_7runners_6common_13DoFnSignature_do_fn, __pyx_setprop_11apache_beam_7runners_6common_13DoFnSignature_do_fn, (char *)0, 0},
  {(char *)"timer_methods", __pyx_getprop_11apache_beam_7runners_6common_13DoFnSignature_timer_methods, __pyx_setprop_11apache_beam_7runners_6common_13DoFnSignature_timer_methods, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

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*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  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*/
  "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*/
  0, /*tp_dictoffset*/
  __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 PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #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;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 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);
  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(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    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_TYPE(o)->tp_free)(o);
}

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;
  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;
  }
  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);
  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*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_3create_invoker, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6common_11DoFnInvoker_2create_invoker},
  {"invoke_process_batch", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_7invoke_process_batch, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6common_11DoFnInvoker_6invoke_process_batch},
  {"invoke_setup", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_9invoke_setup, METH_NOARGS, __pyx_doc_11apache_beam_7runners_6common_11DoFnInvoker_8invoke_setup},
  {"invoke_teardown", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_15invoke_teardown, METH_NOARGS, __pyx_doc_11apache_beam_7runners_6common_11DoFnInvoker_14invoke_teardown},
  {"invoke_user_timer", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_17invoke_user_timer, METH_VARARGS|METH_KEYWORDS, 0},
  {"invoke_create_watermark_estimator", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_19invoke_create_watermark_estimator, METH_O, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_27__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_29__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_11apache_beam_7runners_6common_DoFnInvoker[] = {
  {(char *)"signature", __pyx_getprop_11apache_beam_7runners_6common_11DoFnInvoker_signature, __pyx_setprop_11apache_beam_7runners_6common_11DoFnInvoker_signature, (char *)0, 0},
  {(char *)"bundle_finalizer_param", __pyx_getprop_11apache_beam_7runners_6common_11DoFnInvoker_bundle_finalizer_param, __pyx_setprop_11apache_beam_7runners_6common_11DoFnInvoker_bundle_finalizer_param, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

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*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  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*/
  "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*/
  0, /*tp_dictoffset*/
  __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 PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #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(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    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*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13SimpleInvoker_5invoke_process_batch, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13SimpleInvoker_7__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13SimpleInvoker_9__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

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*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  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*/
  "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*/
  0, /*tp_dictoffset*/
  __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 PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #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(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    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*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_5invoke_process_batch, METH_VARARGS|METH_KEYWORDS, 0},
  {"_should_process_window_for_sdf", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_7_should_process_window_for_sdf, METH_VARARGS|METH_KEYWORDS, 0},
  {"_invoke_process_per_window", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_9_invoke_process_per_window, METH_VARARGS|METH_KEYWORDS, 0},
  {"_invoke_process_batch_per_window", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_11_invoke_process_batch_per_window, METH_VARARGS|METH_KEYWORDS, 0},
  {"_try_split", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_13_try_split, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6common_16PerWindowInvoker_12_try_split},
  {"try_split", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_15try_split, METH_O, 0},
  {"_scale_progress", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_17_scale_progress, METH_VARARGS|METH_KEYWORDS, 0},
  {"current_element_progress", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_19current_element_progress, METH_NOARGS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_21__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_23__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

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*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  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*/
  "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*/
  0, /*tp_dictoffset*/
  __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 PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #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;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 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(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    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);
  (*Py_TYPE(o)->tp_free)(o);
}

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;
  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*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_5_maybe_sample_exception, METH_VARARGS|METH_KEYWORDS, 0},
  {"process_batch", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_7process_batch, METH_O, 0},
  {"process_with_sized_restriction", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_9process_with_sized_restriction, METH_O, 0},
  {"try_split", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_11try_split, METH_O, 0},
  {"current_element_progress", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_13current_element_progress, METH_NOARGS, 0},
  {"process_user_timer", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_15process_user_timer, METH_VARARGS|METH_KEYWORDS, 0},
  {"_invoke_bundle_method", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_17_invoke_bundle_method, METH_O, 0},
  {"_invoke_lifecycle_method", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_19_invoke_lifecycle_method, METH_O, 0},
  {"setup", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_21setup, METH_NOARGS, 0},
  {"start", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_23start, METH_NOARGS, 0},
  {"finish", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_25finish, METH_NOARGS, 0},
  {"teardown", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_27teardown, METH_NOARGS, 0},
  {"finalize", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_29finalize, METH_NOARGS, 0},
  {"_reraise_augmented", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_31_reraise_augmented, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_33__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_35__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_11apache_beam_7runners_6common_DoFnRunner[] = {
  {(char *)"bundle_finalizer_param", __pyx_getprop_11apache_beam_7runners_6common_10DoFnRunner_bundle_finalizer_param, __pyx_setprop_11apache_beam_7runners_6common_10DoFnRunner_bundle_finalizer_param, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

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*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  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*/
  "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*/
  0, /*tp_dictoffset*/
  __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 PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #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;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 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(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_11apache_beam_7runners_6common_OutputHandler[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13OutputHandler_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_13OutputHandler_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

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*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  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*/
  0, /*tp_dictoffset*/
  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 PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #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(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    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);
  if (PyType_IS_GC(__pyx_ptype_11apache_beam_7runners_6common_OutputHandler)) PyObject_GC_Track(o);
  __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;
  e = ((likely(__pyx_ptype_11apache_beam_7runners_6common_OutputHandler)) ? ((__pyx_ptype_11apache_beam_7runners_6common_OutputHandler->tp_traverse) ? __pyx_ptype_11apache_beam_7runners_6common_OutputHandler->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_11apache_beam_7runners_6common__OutputHandler)); 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 (likely(__pyx_ptype_11apache_beam_7runners_6common_OutputHandler)) { if (__pyx_ptype_11apache_beam_7runners_6common_OutputHandler->tp_clear) __pyx_ptype_11apache_beam_7runners_6common_OutputHandler->tp_clear(o); } else __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)__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_7start_bundle_outputs, METH_O, __pyx_doc_11apache_beam_7runners_6common_14_OutputHandler_6start_bundle_outputs},
  {"finish_bundle_outputs", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_9finish_bundle_outputs, METH_O, __pyx_doc_11apache_beam_7runners_6common_14_OutputHandler_8finish_bundle_outputs},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_11__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_13__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

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*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  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*/
  "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*/
  0, /*tp_dictoffset*/
  __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 PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #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;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 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(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->label);
  Py_CLEAR(p->state);
  Py_CLEAR(p->windowed_value);
  (*Py_TYPE(o)->tp_free)(o);
}

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;
  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)__pyx_pw_11apache_beam_7runners_6common_11DoFnContext_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6common_11DoFnContext_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_11apache_beam_7runners_6common_DoFnContext[] = {
  {(char *)"element", __pyx_getprop_11apache_beam_7runners_6common_11DoFnContext_element, 0, (char *)0, 0},
  {(char *)"timestamp", __pyx_getprop_11apache_beam_7runners_6common_11DoFnContext_timestamp, 0, (char *)0, 0},
  {(char *)"windows", __pyx_getprop_11apache_beam_7runners_6common_11DoFnContext_windows, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

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*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  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*/
  "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*/
  0, /*tp_dictoffset*/
  __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 PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #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(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->underlying);
  if (PyType_IS_GC(__pyx_ptype_11apache_beam_7runners_6common_Receiver)) PyObject_GC_Track(o);
  __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;
  e = ((likely(__pyx_ptype_11apache_beam_7runners_6common_Receiver)) ? ((__pyx_ptype_11apache_beam_7runners_6common_Receiver->tp_traverse) ? __pyx_ptype_11apache_beam_7runners_6common_Receiver->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_11apache_beam_7runners_6common__ReceiverAdapter)); 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 (likely(__pyx_ptype_11apache_beam_7runners_6common_Receiver)) { if (__pyx_ptype_11apache_beam_7runners_6common_Receiver->tp_clear) __pyx_ptype_11apache_beam_7runners_6common_Receiver->tp_clear(o); } else __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;
}

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*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  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*/
  0, /*tp_dictoffset*/
  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 PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders *__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders[8];
static int __pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders = 0;

static PyObject *__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders)))) {
    o = (PyObject*)__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders[--__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders];
    memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders(PyObject *o) {
  struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders *p = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_default_arg_values);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders)))) {
    __pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders[__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders++] = ((struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders *p = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders *)o;
  if (p->__pyx_v_default_arg_values) {
    e = (*v)(p->__pyx_v_default_arg_values, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders *p = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders *)o;
  tmp = ((PyObject*)p->__pyx_v_default_arg_values);
  p->__pyx_v_default_arg_values = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.runners.common.__pyx_scope_struct___get_arg_placeholders", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  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_arg_placeholders, /*tp_traverse*/
  __pyx_tp_clear_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders, /*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*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders, /*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 PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_1_genexpr *__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_1_genexpr[8];
static int __pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_1_genexpr = 0;

static PyObject *__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_1_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_1_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_1_genexpr)))) {
    o = (PyObject*)__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_1_genexpr[--__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_1_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_1_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct_1_genexpr(PyObject *o) {
  struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_1_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_arg);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_1_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_1_genexpr)))) {
    __pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_1_genexpr[__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_1_genexpr++] = ((struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_1_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_11apache_beam_7runners_6common___pyx_scope_struct_1_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_1_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_arg) {
    e = (*v)(p->__pyx_v_arg, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_1_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.runners.common.__pyx_scope_struct_1_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_1_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct_1_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  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_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*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_7runners_6common___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 PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2___init__ *__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_2___init__[8];
static int __pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_2___init__ = 0;

static PyObject *__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_2___init__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_2___init__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2___init__)))) {
    o = (PyObject*)__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_2___init__[--__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_2___init__];
    memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2___init__));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct_2___init__(PyObject *o) {
  struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2___init__ *p = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2___init__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_default_arg_values);
  Py_CLEAR(p->__pyx_v_side_inputs);
  Py_CLEAR(p->__pyx_v_signature);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_2___init__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2___init__)))) {
    __pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_2___init__[__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_2___init__++] = ((struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2___init__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_11apache_beam_7runners_6common___pyx_scope_struct_2___init__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2___init__ *p = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2___init__ *)o;
  if (p->__pyx_v_default_arg_values) {
    e = (*v)(p->__pyx_v_default_arg_values, a); if (e) return e;
  }
  if (p->__pyx_v_side_inputs) {
    e = (*v)(p->__pyx_v_side_inputs, a); if (e) return e;
  }
  if (p->__pyx_v_signature) {
    e = (*v)(p->__pyx_v_signature, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_11apache_beam_7runners_6common___pyx_scope_struct_2___init__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2___init__ *p = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2___init__ *)o;
  tmp = ((PyObject*)p->__pyx_v_default_arg_values);
  p->__pyx_v_default_arg_values = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_side_inputs);
  p->__pyx_v_side_inputs = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_signature);
  p->__pyx_v_signature = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_2___init__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.runners.common.__pyx_scope_struct_2___init__", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2___init__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct_2___init__, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  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___init__, /*tp_traverse*/
  __pyx_tp_clear_11apache_beam_7runners_6common___pyx_scope_struct_2___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*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_2___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 PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr *__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr[8];
static int __pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr = 0;

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_COMPILING_IN_CPYTHON && likely((__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr)))) {
    o = (PyObject*)__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr[--__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    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;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_si);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr)))) {
    __pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr[__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 {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

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;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_si) {
    e = (*v)(p->__pyx_v_si, a); if (e) return e;
  }
  return 0;
}

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*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  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*/
  0, /*tp_dictoffset*/
  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 PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr *__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr[8];
static int __pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr = 0;

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_COMPILING_IN_CPYTHON && likely((__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr)))) {
    o = (PyObject*)__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr[--__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    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;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_arg);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr)))) {
    __pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr[__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 {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

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;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_arg) {
    e = (*v)(p->__pyx_v_arg, a); if (e) return e;
  }
  return 0;
}

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*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  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*/
  0, /*tp_dictoffset*/
  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 PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr *__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr[8];
static int __pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr = 0;

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_COMPILING_IN_CPYTHON && likely((__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr)))) {
    o = (PyObject*)__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr[--__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    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;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_arg);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr)))) {
    __pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr[__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 {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

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;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_arg) {
    e = (*v)(p->__pyx_v_arg, a); if (e) return e;
  }
  return 0;
}

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*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  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*/
  0, /*tp_dictoffset*/
  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 PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr *__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr[8];
static int __pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr = 0;

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_COMPILING_IN_CPYTHON && likely((__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr)))) {
    o = (PyObject*)__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr[--__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    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;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_arg);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr)))) {
    __pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr[__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 {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

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;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_arg) {
    e = (*v)(p->__pyx_v_arg, a); if (e) return e;
  }
  return 0;
}

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*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  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*/
  0, /*tp_dictoffset*/
  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 PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};

static 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];
static int __pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split = 0;

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_COMPILING_IN_CPYTHON && likely((__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split)))) {
    o = (PyObject*)__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split[--__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split];
    memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    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;
  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_COMPILING_IN_CPYTHON && ((__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(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[__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 {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

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;
  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;
}

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*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  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*/
  0, /*tp_dictoffset*/
  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 PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor *__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor[8];
static int __pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor = 0;

static PyObject *__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor)))) {
    o = (PyObject*)__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor[--__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor];
    memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor(PyObject *o) {
  struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor *p = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_GroupByKey);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor)))) {
    __pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor[__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor++] = ((struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor *p = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor *)o;
  if (p->__pyx_v_GroupByKey) {
    e = (*v)(p->__pyx_v_GroupByKey, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor *p = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor *)o;
  tmp = ((PyObject*)p->__pyx_v_GroupByKey);
  p->__pyx_v_GroupByKey = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.runners.common.__pyx_scope_struct_8_group_by_key_input_visitor", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  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_8_group_by_key_input_visitor, /*tp_traverse*/
  __pyx_tp_clear_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor, /*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*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor, /*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 PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph *__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph[8];
static int __pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph = 0;

static PyObject *__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph)))) {
    o = (PyObject*)__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph[--__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph];
    memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph(PyObject *o) {
  struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph *p = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_get_coder);
  Py_CLEAR(p->__pyx_v_pipeline_proto);
  Py_CLEAR(p->__pyx_v_validate_transform);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph)))) {
    __pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph[__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph++] = ((struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph *p = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph *)o;
  if (p->__pyx_v_get_coder) {
    e = (*v)(p->__pyx_v_get_coder, a); if (e) return e;
  }
  if (p->__pyx_v_pipeline_proto) {
    e = (*v)(p->__pyx_v_pipeline_proto, a); if (e) return e;
  }
  if (p->__pyx_v_validate_transform) {
    e = (*v)(p->__pyx_v_validate_transform, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph *p = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph *)o;
  tmp = ((PyObject*)p->__pyx_v_get_coder);
  p->__pyx_v_get_coder = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_pipeline_proto);
  p->__pyx_v_pipeline_proto = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_validate_transform);
  p->__pyx_v_validate_transform = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.runners.common.__pyx_scope_struct_9_validate_pipeline_graph", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  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_9_validate_pipeline_graph, /*tp_traverse*/
  __pyx_tp_clear_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph, /*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*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph, /*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 PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
#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},
  {0, NULL}
};
#endif

static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    "common",
    __pyx_k_Worker_operations_executor_For_i, /* m_doc */
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    0, /* m_size */
  #else
    -1, /* m_size */
  #endif
    __pyx_methods /* m_methods */,
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    __pyx_moduledef_slots, /* m_slots */
  #else
    NULL, /* m_reload */
  #endif
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif
#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

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_n_s_ASSIGN_WINDOWS, __pyx_k_ASSIGN_WINDOWS, sizeof(__pyx_k_ASSIGN_WINDOWS), 0, 0, 1, 1},
  {&__pyx_kp_s_A_visitor_that_replaces_Any_elem, __pyx_k_A_visitor_that_replaces_Any_elem, sizeof(__pyx_k_A_visitor_that_replaces_Any_elem), 0, 0, 1, 0},
  {&__pyx_kp_s_An_uninspectable_WindowFn_Assign, __pyx_k_An_uninspectable_WindowFn_Assign, sizeof(__pyx_k_An_uninspectable_WindowFn_Assign), 0, 0, 1, 0},
  {&__pyx_n_s_Any, __pyx_k_Any, sizeof(__pyx_k_Any), 0, 0, 1, 1},
  {&__pyx_n_s_ArgPlaceholder, __pyx_k_ArgPlaceholder, sizeof(__pyx_k_ArgPlaceholder), 0, 0, 1, 1},
  {&__pyx_n_s_AssignContext, __pyx_k_AssignContext, sizeof(__pyx_k_AssignContext), 0, 0, 1, 1},
  {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1},
  {&__pyx_n_s_BATCH_FORBIDDEN, __pyx_k_BATCH_FORBIDDEN, sizeof(__pyx_k_BATCH_FORBIDDEN), 0, 0, 1, 1},
  {&__pyx_n_s_BATCH_REQUIRED, __pyx_k_BATCH_REQUIRED, sizeof(__pyx_k_BATCH_REQUIRED), 0, 0, 1, 1},
  {&__pyx_kp_u_Bad_coder_for_input_of, __pyx_k_Bad_coder_for_input_of, sizeof(__pyx_k_Bad_coder_for_input_of), 0, 1, 0, 0},
  {&__pyx_kp_u_Bad_coder_for_output_of, __pyx_k_Bad_coder_for_output_of, sizeof(__pyx_k_Bad_coder_for_output_of), 0, 1, 0, 0},
  {&__pyx_n_s_BaseException, __pyx_k_BaseException, sizeof(__pyx_k_BaseException), 0, 0, 1, 1},
  {&__pyx_n_s_BatchConverter, __pyx_k_BatchConverter, sizeof(__pyx_k_BatchConverter), 0, 0, 1, 1},
  {&__pyx_n_s_BatchingPreference, __pyx_k_BatchingPreference, sizeof(__pyx_k_BatchingPreference), 0, 0, 1, 1},
  {&__pyx_n_s_BatchingPreference_requires_batc, __pyx_k_BatchingPreference_requires_batc, sizeof(__pyx_k_BatchingPreference_requires_batc), 0, 0, 1, 1},
  {&__pyx_n_s_BatchingPreference_supports_batc, __pyx_k_BatchingPreference_supports_batc, sizeof(__pyx_k_BatchingPreference_supports_batc), 0, 0, 1, 1},
  {&__pyx_n_s_BatchingPreference_supports_elem, __pyx_k_BatchingPreference_supports_elem, sizeof(__pyx_k_BatchingPreference_supports_elem), 0, 0, 1, 1},
  {&__pyx_n_s_BundleFinalizerParam, __pyx_k_BundleFinalizerParam, sizeof(__pyx_k_BundleFinalizerParam), 0, 0, 1, 1},
  {&__pyx_n_s_BytesCoder, __pyx_k_BytesCoder, sizeof(__pyx_k_BytesCoder), 0, 0, 1, 1},
  {&__pyx_n_s_Counter, __pyx_k_Counter, sizeof(__pyx_k_Counter), 0, 0, 1, 1},
  {&__pyx_n_s_CounterName, __pyx_k_CounterName, sizeof(__pyx_k_CounterName), 0, 0, 1, 1},
  {&__pyx_n_s_DATAFLOW_DISTRIBUTION, __pyx_k_DATAFLOW_DISTRIBUTION, sizeof(__pyx_k_DATAFLOW_DISTRIBUTION), 0, 0, 1, 1},
  {&__pyx_n_s_DO_NOT_CARE, __pyx_k_DO_NOT_CARE, sizeof(__pyx_k_DO_NOT_CARE), 0, 0, 1, 1},
  {&__pyx_n_s_Dict, __pyx_k_Dict, sizeof(__pyx_k_Dict), 0, 0, 1, 1},
  {&__pyx_n_s_DoFn, __pyx_k_DoFn, sizeof(__pyx_k_DoFn), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnContext, __pyx_k_DoFnContext, sizeof(__pyx_k_DoFnContext), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnContext___reduce_cython, __pyx_k_DoFnContext___reduce_cython, sizeof(__pyx_k_DoFnContext___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnContext___setstate_cython, __pyx_k_DoFnContext___setstate_cython, sizeof(__pyx_k_DoFnContext___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnContext_set_element, __pyx_k_DoFnContext_set_element, sizeof(__pyx_k_DoFnContext_set_element), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnInvoker, __pyx_k_DoFnInvoker, sizeof(__pyx_k_DoFnInvoker), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnInvoker___reduce_cython, __pyx_k_DoFnInvoker___reduce_cython, sizeof(__pyx_k_DoFnInvoker___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnInvoker___setstate_cython, __pyx_k_DoFnInvoker___setstate_cython, sizeof(__pyx_k_DoFnInvoker___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnInvoker_create_invoker, __pyx_k_DoFnInvoker_create_invoker, sizeof(__pyx_k_DoFnInvoker_create_invoker), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnInvoker_invoke_create_tracke, __pyx_k_DoFnInvoker_invoke_create_tracke, sizeof(__pyx_k_DoFnInvoker_invoke_create_tracke), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnInvoker_invoke_create_waterm, __pyx_k_DoFnInvoker_invoke_create_waterm, sizeof(__pyx_k_DoFnInvoker_invoke_create_waterm), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnInvoker_invoke_finish_bundle, __pyx_k_DoFnInvoker_invoke_finish_bundle, sizeof(__pyx_k_DoFnInvoker_invoke_finish_bundle), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnInvoker_invoke_initial_restr, __pyx_k_DoFnInvoker_invoke_initial_restr, sizeof(__pyx_k_DoFnInvoker_invoke_initial_restr), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnInvoker_invoke_process, __pyx_k_DoFnInvoker_invoke_process, sizeof(__pyx_k_DoFnInvoker_invoke_process), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnInvoker_invoke_process_batch, __pyx_k_DoFnInvoker_invoke_process_batch, sizeof(__pyx_k_DoFnInvoker_invoke_process_batch), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnInvoker_invoke_setup, __pyx_k_DoFnInvoker_invoke_setup, sizeof(__pyx_k_DoFnInvoker_invoke_setup), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnInvoker_invoke_split, __pyx_k_DoFnInvoker_invoke_split, sizeof(__pyx_k_DoFnInvoker_invoke_split), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnInvoker_invoke_start_bundle, __pyx_k_DoFnInvoker_invoke_start_bundle, sizeof(__pyx_k_DoFnInvoker_invoke_start_bundle), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnInvoker_invoke_teardown, __pyx_k_DoFnInvoker_invoke_teardown, sizeof(__pyx_k_DoFnInvoker_invoke_teardown), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnInvoker_invoke_user_timer, __pyx_k_DoFnInvoker_invoke_user_timer, sizeof(__pyx_k_DoFnInvoker_invoke_user_timer), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnParam, __pyx_k_DoFnParam, sizeof(__pyx_k_DoFnParam), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnProcessParams, __pyx_k_DoFnProcessParams, sizeof(__pyx_k_DoFnProcessParams), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnRunner, __pyx_k_DoFnRunner, sizeof(__pyx_k_DoFnRunner), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnRunner___reduce_cython, __pyx_k_DoFnRunner___reduce_cython, sizeof(__pyx_k_DoFnRunner___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnRunner___setstate_cython, __pyx_k_DoFnRunner___setstate_cython, sizeof(__pyx_k_DoFnRunner___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnRunner__invoke_bundle_method, __pyx_k_DoFnRunner__invoke_bundle_method, sizeof(__pyx_k_DoFnRunner__invoke_bundle_method), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnRunner__invoke_lifecycle_met, __pyx_k_DoFnRunner__invoke_lifecycle_met, sizeof(__pyx_k_DoFnRunner__invoke_lifecycle_met), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnRunner__maybe_sample_excepti, __pyx_k_DoFnRunner__maybe_sample_excepti, sizeof(__pyx_k_DoFnRunner__maybe_sample_excepti), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnRunner__reraise_augmented, __pyx_k_DoFnRunner__reraise_augmented, sizeof(__pyx_k_DoFnRunner__reraise_augmented), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnRunner_current_element_progr, __pyx_k_DoFnRunner_current_element_progr, sizeof(__pyx_k_DoFnRunner_current_element_progr), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnRunner_finalize, __pyx_k_DoFnRunner_finalize, sizeof(__pyx_k_DoFnRunner_finalize), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnRunner_finish, __pyx_k_DoFnRunner_finish, sizeof(__pyx_k_DoFnRunner_finish), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnRunner_process, __pyx_k_DoFnRunner_process, sizeof(__pyx_k_DoFnRunner_process), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnRunner_process_batch, __pyx_k_DoFnRunner_process_batch, sizeof(__pyx_k_DoFnRunner_process_batch), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnRunner_process_user_timer, __pyx_k_DoFnRunner_process_user_timer, sizeof(__pyx_k_DoFnRunner_process_user_timer), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnRunner_process_with_sized_re, __pyx_k_DoFnRunner_process_with_sized_re, sizeof(__pyx_k_DoFnRunner_process_with_sized_re), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnRunner_setup, __pyx_k_DoFnRunner_setup, sizeof(__pyx_k_DoFnRunner_setup), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnRunner_start, __pyx_k_DoFnRunner_start, sizeof(__pyx_k_DoFnRunner_start), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnRunner_teardown, __pyx_k_DoFnRunner_teardown, sizeof(__pyx_k_DoFnRunner_teardown), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnRunner_try_split, __pyx_k_DoFnRunner_try_split, sizeof(__pyx_k_DoFnRunner_try_split), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnSignature, __pyx_k_DoFnSignature, sizeof(__pyx_k_DoFnSignature), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnSignature___reduce_cython, __pyx_k_DoFnSignature___reduce_cython, sizeof(__pyx_k_DoFnSignature___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnSignature___setstate_cython, __pyx_k_DoFnSignature___setstate_cython, sizeof(__pyx_k_DoFnSignature___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnSignature__check_duplicate_d, __pyx_k_DoFnSignature__check_duplicate_d, sizeof(__pyx_k_DoFnSignature__check_duplicate_d), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnSignature__validate, __pyx_k_DoFnSignature__validate, sizeof(__pyx_k_DoFnSignature__validate), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnSignature__validate_bundle_m, __pyx_k_DoFnSignature__validate_bundle_m, sizeof(__pyx_k_DoFnSignature__validate_bundle_m), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnSignature__validate_process, __pyx_k_DoFnSignature__validate_process, sizeof(__pyx_k_DoFnSignature__validate_process), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnSignature__validate_process_2, __pyx_k_DoFnSignature__validate_process_2, sizeof(__pyx_k_DoFnSignature__validate_process_2), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnSignature__validate_stateful, __pyx_k_DoFnSignature__validate_stateful, sizeof(__pyx_k_DoFnSignature__validate_stateful), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnSignature_get_restriction_co, __pyx_k_DoFnSignature_get_restriction_co, sizeof(__pyx_k_DoFnSignature_get_restriction_co), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnSignature_get_restriction_pr, __pyx_k_DoFnSignature_get_restriction_pr, sizeof(__pyx_k_DoFnSignature_get_restriction_pr), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnSignature_get_watermark_esti, __pyx_k_DoFnSignature_get_watermark_esti, sizeof(__pyx_k_DoFnSignature_get_watermark_esti), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnSignature_has_bundle_finaliz, __pyx_k_DoFnSignature_has_bundle_finaliz, sizeof(__pyx_k_DoFnSignature_has_bundle_finaliz), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnSignature_has_timers, __pyx_k_DoFnSignature_has_timers, sizeof(__pyx_k_DoFnSignature_has_timers), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnSignature_is_splittable_dofn, __pyx_k_DoFnSignature_is_splittable_dofn, sizeof(__pyx_k_DoFnSignature_is_splittable_dofn), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnSignature_is_stateful_dofn, __pyx_k_DoFnSignature_is_stateful_dofn, sizeof(__pyx_k_DoFnSignature_is_stateful_dofn), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnSignature_is_unbounded_per_e, __pyx_k_DoFnSignature_is_unbounded_per_e, sizeof(__pyx_k_DoFnSignature_is_unbounded_per_e), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnState, __pyx_k_DoFnState, sizeof(__pyx_k_DoFnState), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnState___init, __pyx_k_DoFnState___init, sizeof(__pyx_k_DoFnState___init), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnState_counter_for, __pyx_k_DoFnState_counter_for, sizeof(__pyx_k_DoFnState_counter_for), 0, 0, 1, 1},
  {&__pyx_kp_u_DoFn_2, __pyx_k_DoFn_2, sizeof(__pyx_k_DoFn_2), 0, 1, 0, 0},
  {&__pyx_kp_u_DoFn_is_splittable_but_DoFn_does, __pyx_k_DoFn_is_splittable_but_DoFn_does, sizeof(__pyx_k_DoFn_is_splittable_but_DoFn_does), 0, 1, 0, 0},
  {&__pyx_kp_u_DoFn_process_method_only_paramet, __pyx_k_DoFn_process_method_only_paramet, sizeof(__pyx_k_DoFn_process_method_only_paramet), 0, 1, 0, 0},
  {&__pyx_n_s_DynamicTimerTagParam, __pyx_k_DynamicTimerTagParam, sizeof(__pyx_k_DynamicTimerTagParam), 0, 0, 1, 1},
  {&__pyx_n_s_ENCODED_IMPULSE_VALUE, __pyx_k_ENCODED_IMPULSE_VALUE, sizeof(__pyx_k_ENCODED_IMPULSE_VALUE), 0, 0, 1, 1},
  {&__pyx_n_s_ElementParam, __pyx_k_ElementParam, sizeof(__pyx_k_ElementParam), 0, 0, 1, 1},
  {&__pyx_n_s_Enum, __pyx_k_Enum, sizeof(__pyx_k_Enum), 0, 0, 1, 1},
  {&__pyx_n_s_ExecutionContext, __pyx_k_ExecutionContext, sizeof(__pyx_k_ExecutionContext), 0, 0, 1, 1},
  {&__pyx_kp_u_Expected_size_0_but_received_s, __pyx_k_Expected_size_0_but_received_s, sizeof(__pyx_k_Expected_size_0_but_received_s), 0, 1, 0, 0},
  {&__pyx_kp_u_Finish_Bundle_should_only_output, __pyx_k_Finish_Bundle_should_only_output, sizeof(__pyx_k_Finish_Bundle_should_only_output), 0, 1, 0, 0},
  {&__pyx_kp_s_For_internal_use_only_no_backwar, __pyx_k_For_internal_use_only_no_backwar, sizeof(__pyx_k_For_internal_use_only_no_backwar), 0, 0, 1, 0},
  {&__pyx_n_s_GROUP_BY_KEY, __pyx_k_GROUP_BY_KEY, sizeof(__pyx_k_GROUP_BY_KEY), 0, 0, 1, 1},
  {&__pyx_n_s_GlobalWindow, __pyx_k_GlobalWindow, sizeof(__pyx_k_GlobalWindow), 0, 0, 1, 1},
  {&__pyx_n_s_GlobalWindowCoder, __pyx_k_GlobalWindowCoder, sizeof(__pyx_k_GlobalWindowCoder), 0, 0, 1, 1},
  {&__pyx_n_s_GlobalWindows, __pyx_k_GlobalWindows, sizeof(__pyx_k_GlobalWindows), 0, 0, 1, 1},
  {&__pyx_n_s_GroupByKey, __pyx_k_GroupByKey, sizeof(__pyx_k_GroupByKey), 0, 0, 1, 1},
  {&__pyx_n_s_GroupByKeyInputVisitor, __pyx_k_GroupByKeyInputVisitor, sizeof(__pyx_k_GroupByKeyInputVisitor), 0, 0, 1, 1},
  {&__pyx_kp_s_Holds_the_name_information_for_a, __pyx_k_Holds_the_name_information_for_a, sizeof(__pyx_k_Holds_the_name_information_for_a), 0, 0, 1, 0},
  {&__pyx_n_s_HomogeneousWindowedBatch, __pyx_k_HomogeneousWindowedBatch, sizeof(__pyx_k_HomogeneousWindowedBatch), 0, 0, 1, 1},
  {&__pyx_n_s_IMPULSE_VALUE_CODER_IMPL, __pyx_k_IMPULSE_VALUE_CODER_IMPL, sizeof(__pyx_k_IMPULSE_VALUE_CODER_IMPL), 0, 0, 1, 1},
  {&__pyx_n_s_ITERABLE, __pyx_k_ITERABLE, sizeof(__pyx_k_ITERABLE), 0, 0, 1, 1},
  {&__pyx_kp_u_In, __pyx_k_In, sizeof(__pyx_k_In), 0, 1, 0, 0},
  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_k_Incompatible_checksums_0x_x_vs_0, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2, __pyx_k_Incompatible_checksums_0x_x_vs_0_2, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_2), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3, __pyx_k_Incompatible_checksums_0x_x_vs_0_3, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_3), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_4, __pyx_k_Incompatible_checksums_0x_x_vs_0_4, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_4), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_5, __pyx_k_Incompatible_checksums_0x_x_vs_0_5, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_5), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_6, __pyx_k_Incompatible_checksums_0x_x_vs_0_6, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_6), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_7, __pyx_k_Incompatible_checksums_0x_x_vs_0_7, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_7), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_8, __pyx_k_Incompatible_checksums_0x_x_vs_0_8, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_8), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_9, __pyx_k_Incompatible_checksums_0x_x_vs_0_9, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_9), 0, 0, 1, 0},
  {&__pyx_kp_u_Incompatible_input_coder, __pyx_k_Incompatible_input_coder, sizeof(__pyx_k_Incompatible_input_coder), 0, 1, 0, 0},
  {&__pyx_kp_u_Input_value_to_a_stateful_DoFn_o, __pyx_k_Input_value_to_a_stateful_DoFn_o, sizeof(__pyx_k_Input_value_to_a_stateful_DoFn_o), 0, 1, 0, 0},
  {&__pyx_n_s_Iterable, __pyx_k_Iterable, sizeof(__pyx_k_Iterable), 0, 0, 1, 1},
  {&__pyx_n_s_KV, __pyx_k_KV, sizeof(__pyx_k_KV), 0, 0, 1, 1},
  {&__pyx_n_s_KeyParam, __pyx_k_KeyParam, sizeof(__pyx_k_KeyParam), 0, 0, 1, 1},
  {&__pyx_n_s_LOGGER, __pyx_k_LOGGER, sizeof(__pyx_k_LOGGER), 0, 0, 1, 1},
  {&__pyx_n_s_List, __pyx_k_List, sizeof(__pyx_k_List), 0, 0, 1, 1},
  {&__pyx_n_s_Lock, __pyx_k_Lock, sizeof(__pyx_k_Lock), 0, 0, 1, 1},
  {&__pyx_n_s_Mapping, __pyx_k_Mapping, sizeof(__pyx_k_Mapping), 0, 0, 1, 1},
  {&__pyx_n_s_MethodWrapper, __pyx_k_MethodWrapper, sizeof(__pyx_k_MethodWrapper), 0, 0, 1, 1},
  {&__pyx_n_u_MethodWrapper, __pyx_k_MethodWrapper, sizeof(__pyx_k_MethodWrapper), 0, 1, 0, 1},
  {&__pyx_n_s_MethodWrapper___reduce_cython, __pyx_k_MethodWrapper___reduce_cython, sizeof(__pyx_k_MethodWrapper___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_MethodWrapper___setstate_cython, __pyx_k_MethodWrapper___setstate_cython, sizeof(__pyx_k_MethodWrapper___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_MethodWrapper_invoke_timer_callb, __pyx_k_MethodWrapper_invoke_timer_callb, sizeof(__pyx_k_MethodWrapper_invoke_timer_callb), 0, 0, 1, 1},
  {&__pyx_kp_u_Missing_input_for_transform_s, __pyx_k_Missing_input_for_transform_s, sizeof(__pyx_k_Missing_input_for_transform_s), 0, 1, 0, 0},
  {&__pyx_kp_u_Must_provide_context_when_not_us, __pyx_k_Must_provide_context_when_not_us, sizeof(__pyx_k_Must_provide_context_when_not_us), 0, 1, 0, 0},
  {&__pyx_n_s_NO_VALUE, __pyx_k_NO_VALUE, sizeof(__pyx_k_NO_VALUE), 0, 0, 1, 1},
  {&__pyx_n_s_NameContext, __pyx_k_NameContext, sizeof(__pyx_k_NameContext), 0, 0, 1, 1},
  {&__pyx_n_s_NameContext___eq, __pyx_k_NameContext___eq, sizeof(__pyx_k_NameContext___eq), 0, 0, 1, 1},
  {&__pyx_n_s_NameContext___hash, __pyx_k_NameContext___hash, sizeof(__pyx_k_NameContext___hash), 0, 0, 1, 1},
  {&__pyx_n_s_NameContext___init, __pyx_k_NameContext___init, sizeof(__pyx_k_NameContext___init), 0, 0, 1, 1},
  {&__pyx_n_s_NameContext___repr, __pyx_k_NameContext___repr, sizeof(__pyx_k_NameContext___repr), 0, 0, 1, 1},
  {&__pyx_n_s_NameContext_logging_name, __pyx_k_NameContext_logging_name, sizeof(__pyx_k_NameContext_logging_name), 0, 0, 1, 1},
  {&__pyx_n_s_NameContext_metrics_name, __pyx_k_NameContext_metrics_name, sizeof(__pyx_k_NameContext_metrics_name), 0, 0, 1, 1},
  {&__pyx_kp_u_NameContext_s, __pyx_k_NameContext_s, sizeof(__pyx_k_NameContext_s), 0, 1, 0, 0},
  {&__pyx_n_s_NoContext, __pyx_k_NoContext, sizeof(__pyx_k_NoContext), 0, 0, 1, 1},
  {&__pyx_n_s_NoContext___init, __pyx_k_NoContext___init, sizeof(__pyx_k_NoContext___init), 0, 0, 1, 1},
  {&__pyx_n_s_NoContext_existing_windows, __pyx_k_NoContext_existing_windows, sizeof(__pyx_k_NoContext_existing_windows), 0, 0, 1, 1},
  {&__pyx_n_s_NoContext_timestamp, __pyx_k_NoContext_timestamp, sizeof(__pyx_k_NoContext_timestamp), 0, 0, 1, 1},
  {&__pyx_n_s_NoOpWatermarkEstimatorProvider, __pyx_k_NoOpWatermarkEstimatorProvider, sizeof(__pyx_k_NoOpWatermarkEstimatorProvider), 0, 0, 1, 1},
  {&__pyx_kp_u_No_existing_windows_in_this_cont, __pyx_k_No_existing_windows_in_this_cont, sizeof(__pyx_k_No_existing_windows_in_this_cont), 0, 1, 0, 0},
  {&__pyx_kp_u_No_timestamp_in_this_context, __pyx_k_No_timestamp_in_this_context, sizeof(__pyx_k_No_timestamp_in_this_context), 0, 1, 0, 0},
  {&__pyx_n_s_NotImplementedError, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1},
  {&__pyx_n_s_Optional, __pyx_k_Optional, sizeof(__pyx_k_Optional), 0, 0, 1, 1},
  {&__pyx_n_s_OutputHandler, __pyx_k_OutputHandler, sizeof(__pyx_k_OutputHandler), 0, 0, 1, 1},
  {&__pyx_n_s_OutputHandler_2, __pyx_k_OutputHandler_2, sizeof(__pyx_k_OutputHandler_2), 0, 0, 1, 1},
  {&__pyx_n_s_OutputHandler___reduce_cython, __pyx_k_OutputHandler___reduce_cython, sizeof(__pyx_k_OutputHandler___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_OutputHandler___reduce_cython_2, __pyx_k_OutputHandler___reduce_cython_2, sizeof(__pyx_k_OutputHandler___reduce_cython_2), 0, 0, 1, 1},
  {&__pyx_n_s_OutputHandler___setstate_cython, __pyx_k_OutputHandler___setstate_cython, sizeof(__pyx_k_OutputHandler___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_OutputHandler___setstate_cython_2, __pyx_k_OutputHandler___setstate_cython_2, sizeof(__pyx_k_OutputHandler___setstate_cython_2), 0, 0, 1, 1},
  {&__pyx_n_s_OutputHandler_finish_bundle_out, __pyx_k_OutputHandler_finish_bundle_out, sizeof(__pyx_k_OutputHandler_finish_bundle_out), 0, 0, 1, 1},
  {&__pyx_n_s_OutputHandler_handle_process_ba, __pyx_k_OutputHandler_handle_process_ba, sizeof(__pyx_k_OutputHandler_handle_process_ba), 0, 0, 1, 1},
  {&__pyx_n_s_OutputHandler_handle_process_bat, __pyx_k_OutputHandler_handle_process_bat, sizeof(__pyx_k_OutputHandler_handle_process_bat), 0, 0, 1, 1},
  {&__pyx_n_s_OutputHandler_handle_process_ou, __pyx_k_OutputHandler_handle_process_ou, sizeof(__pyx_k_OutputHandler_handle_process_ou), 0, 0, 1, 1},
  {&__pyx_n_s_OutputHandler_handle_process_out, __pyx_k_OutputHandler_handle_process_out, sizeof(__pyx_k_OutputHandler_handle_process_out), 0, 0, 1, 1},
  {&__pyx_n_s_OutputHandler_start_bundle_outp, __pyx_k_OutputHandler_start_bundle_outp, sizeof(__pyx_k_OutputHandler_start_bundle_outp), 0, 0, 1, 1},
  {&__pyx_n_s_PAR_DO, __pyx_k_PAR_DO, sizeof(__pyx_k_PAR_DO), 0, 0, 1, 1},
  {&__pyx_n_s_PaneInfoParam, __pyx_k_PaneInfoParam, sizeof(__pyx_k_PaneInfoParam), 0, 0, 1, 1},
  {&__pyx_n_s_PerWindowInvoker, __pyx_k_PerWindowInvoker, sizeof(__pyx_k_PerWindowInvoker), 0, 0, 1, 1},
  {&__pyx_n_s_PerWindowInvoker___reduce_cython, __pyx_k_PerWindowInvoker___reduce_cython, sizeof(__pyx_k_PerWindowInvoker___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_PerWindowInvoker___setstate_cyth, __pyx_k_PerWindowInvoker___setstate_cyth, sizeof(__pyx_k_PerWindowInvoker___setstate_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_PerWindowInvoker__invoke_process, __pyx_k_PerWindowInvoker__invoke_process, sizeof(__pyx_k_PerWindowInvoker__invoke_process), 0, 0, 1, 1},
  {&__pyx_n_s_PerWindowInvoker__invoke_process_2, __pyx_k_PerWindowInvoker__invoke_process_2, sizeof(__pyx_k_PerWindowInvoker__invoke_process_2), 0, 0, 1, 1},
  {&__pyx_n_s_PerWindowInvoker__scale_progress, __pyx_k_PerWindowInvoker__scale_progress, sizeof(__pyx_k_PerWindowInvoker__scale_progress), 0, 0, 1, 1},
  {&__pyx_n_s_PerWindowInvoker__should_process, __pyx_k_PerWindowInvoker__should_process, sizeof(__pyx_k_PerWindowInvoker__should_process), 0, 0, 1, 1},
  {&__pyx_n_s_PerWindowInvoker__try_split, __pyx_k_PerWindowInvoker__try_split, sizeof(__pyx_k_PerWindowInvoker__try_split), 0, 0, 1, 1},
  {&__pyx_n_s_PerWindowInvoker_current_element, __pyx_k_PerWindowInvoker_current_element, sizeof(__pyx_k_PerWindowInvoker_current_element), 0, 0, 1, 1},
  {&__pyx_n_s_PerWindowInvoker_invoke_process, __pyx_k_PerWindowInvoker_invoke_process, sizeof(__pyx_k_PerWindowInvoker_invoke_process), 0, 0, 1, 1},
  {&__pyx_n_s_PerWindowInvoker_invoke_process_2, __pyx_k_PerWindowInvoker_invoke_process_2, sizeof(__pyx_k_PerWindowInvoker_invoke_process_2), 0, 0, 1, 1},
  {&__pyx_n_s_PerWindowInvoker_try_split, __pyx_k_PerWindowInvoker_try_split, sizeof(__pyx_k_PerWindowInvoker_try_split), 0, 0, 1, 1},
  {&__pyx_kp_u_Per_key_DoFn_params_are_not_yet, __pyx_k_Per_key_DoFn_params_are_not_yet, sizeof(__pyx_k_Per_key_DoFn_params_are_not_yet), 0, 1, 0, 0},
  {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
  {&__pyx_n_s_PipelineVisitor, __pyx_k_PipelineVisitor, sizeof(__pyx_k_PipelineVisitor), 0, 0, 1, 1},
  {&__pyx_kp_u_Received, __pyx_k_Received, sizeof(__pyx_k_Received), 0, 1, 0, 0},
  {&__pyx_n_s_Receiver, __pyx_k_Receiver, sizeof(__pyx_k_Receiver), 0, 0, 1, 1},
  {&__pyx_n_s_ReceiverAdapter, __pyx_k_ReceiverAdapter, sizeof(__pyx_k_ReceiverAdapter), 0, 0, 1, 1},
  {&__pyx_n_s_Receiver___reduce_cython, __pyx_k_Receiver___reduce_cython, sizeof(__pyx_k_Receiver___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Receiver___setstate_cython, __pyx_k_Receiver___setstate_cython, sizeof(__pyx_k_Receiver___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Receiver_flush, __pyx_k_Receiver_flush, sizeof(__pyx_k_Receiver_flush), 0, 0, 1, 1},
  {&__pyx_n_s_Receiver_receive, __pyx_k_Receiver_receive, sizeof(__pyx_k_Receiver_receive), 0, 0, 1, 1},
  {&__pyx_n_s_Receiver_receive_batch, __pyx_k_Receiver_receive_batch, sizeof(__pyx_k_Receiver_receive_batch), 0, 0, 1, 1},
  {&__pyx_kp_u_Requested_execution_of_a_statefu, __pyx_k_Requested_execution_of_a_statefu, sizeof(__pyx_k_Requested_execution_of_a_statefu), 0, 1, 0, 0},
  {&__pyx_n_s_RestrictionParam, __pyx_k_RestrictionParam, sizeof(__pyx_k_RestrictionParam), 0, 0, 1, 1},
  {&__pyx_n_s_RestrictionProgress, __pyx_k_RestrictionProgress, sizeof(__pyx_k_RestrictionProgress), 0, 0, 1, 1},
  {&__pyx_n_s_RestrictionProvider, __pyx_k_RestrictionProvider, sizeof(__pyx_k_RestrictionProvider), 0, 0, 1, 1},
  {&__pyx_n_s_RestrictionTracker, __pyx_k_RestrictionTracker, sizeof(__pyx_k_RestrictionTracker), 0, 0, 1, 1},
  {&__pyx_n_s_RestrictionTrackerView, __pyx_k_RestrictionTrackerView, sizeof(__pyx_k_RestrictionTrackerView), 0, 0, 1, 1},
  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
  {&__pyx_n_s_RuntimeValueProvider, __pyx_k_RuntimeValueProvider, sizeof(__pyx_k_RuntimeValueProvider), 0, 0, 1, 1},
  {&__pyx_n_s_SideInputParam, __pyx_k_SideInputParam, sizeof(__pyx_k_SideInputParam), 0, 0, 1, 1},
  {&__pyx_n_s_SimpleInvoker, __pyx_k_SimpleInvoker, sizeof(__pyx_k_SimpleInvoker), 0, 0, 1, 1},
  {&__pyx_n_s_SimpleInvoker___reduce_cython, __pyx_k_SimpleInvoker___reduce_cython, sizeof(__pyx_k_SimpleInvoker___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_SimpleInvoker___setstate_cython, __pyx_k_SimpleInvoker___setstate_cython, sizeof(__pyx_k_SimpleInvoker___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_SimpleInvoker_invoke_process, __pyx_k_SimpleInvoker_invoke_process, sizeof(__pyx_k_SimpleInvoker_invoke_process), 0, 0, 1, 1},
  {&__pyx_n_s_SimpleInvoker_invoke_process_bat, __pyx_k_SimpleInvoker_invoke_process_bat, sizeof(__pyx_k_SimpleInvoker_invoke_process_bat), 0, 0, 1, 1},
  {&__pyx_n_s_SplitResultPrimary, __pyx_k_SplitResultPrimary, sizeof(__pyx_k_SplitResultPrimary), 0, 0, 1, 1},
  {&__pyx_n_s_SplitResultResidual, __pyx_k_SplitResultResidual, sizeof(__pyx_k_SplitResultResidual), 0, 0, 1, 1},
  {&__pyx_kp_u_Start_Bundle_should_not_output_a, __pyx_k_Start_Bundle_should_not_output_a, sizeof(__pyx_k_Start_Bundle_should_not_output_a), 0, 1, 0, 0},
  {&__pyx_n_s_StateParam, __pyx_k_StateParam, sizeof(__pyx_k_StateParam), 0, 0, 1, 1},
  {&__pyx_n_s_StopIteration, __pyx_k_StopIteration, sizeof(__pyx_k_StopIteration), 0, 0, 1, 1},
  {&__pyx_n_s_TYPE_CHECKING, __pyx_k_TYPE_CHECKING, sizeof(__pyx_k_TYPE_CHECKING), 0, 0, 1, 1},
  {&__pyx_n_s_TaggedOutput, __pyx_k_TaggedOutput, sizeof(__pyx_k_TaggedOutput), 0, 0, 1, 1},
  {&__pyx_n_s_ThreadsafeRestrictionTracker, __pyx_k_ThreadsafeRestrictionTracker, sizeof(__pyx_k_ThreadsafeRestrictionTracker), 0, 0, 1, 1},
  {&__pyx_n_s_ThreadsafeWatermarkEstimator, __pyx_k_ThreadsafeWatermarkEstimator, sizeof(__pyx_k_ThreadsafeWatermarkEstimator), 0, 0, 1, 1},
  {&__pyx_n_s_TimerParam, __pyx_k_TimerParam, sizeof(__pyx_k_TimerParam), 0, 0, 1, 1},
  {&__pyx_n_s_TimerSpec, __pyx_k_TimerSpec, sizeof(__pyx_k_TimerSpec), 0, 0, 1, 1},
  {&__pyx_n_s_Timestamp, __pyx_k_Timestamp, sizeof(__pyx_k_Timestamp), 0, 0, 1, 1},
  {&__pyx_n_s_TimestampParam, __pyx_k_TimestampParam, sizeof(__pyx_k_TimestampParam), 0, 0, 1, 1},
  {&__pyx_n_s_TimestampedValue, __pyx_k_TimestampedValue, sizeof(__pyx_k_TimestampedValue), 0, 0, 1, 1},
  {&__pyx_n_s_Tuple, __pyx_k_Tuple, sizeof(__pyx_k_Tuple), 0, 0, 1, 1},
  {&__pyx_n_s_TupleCoder, __pyx_k_TupleCoder, sizeof(__pyx_k_TupleCoder), 0, 0, 1, 1},
  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  {&__pyx_kp_u_Unexpected_number_of_inputs_s, __pyx_k_Unexpected_number_of_inputs_s, sizeof(__pyx_k_Unexpected_number_of_inputs_s), 0, 1, 0, 0},
  {&__pyx_kp_u_Unexpected_number_of_outputs_s, __pyx_k_Unexpected_number_of_outputs_s, sizeof(__pyx_k_Unexpected_number_of_outputs_s), 0, 1, 0, 0},
  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  {&__pyx_kp_u_Value_for_sideinput_s_not_provid, __pyx_k_Value_for_sideinput_s_not_provid, sizeof(__pyx_k_Value_for_sideinput_s_not_provid), 0, 1, 0, 0},
  {&__pyx_n_s_WatermarkEstimator, __pyx_k_WatermarkEstimator, sizeof(__pyx_k_WatermarkEstimator), 0, 0, 1, 1},
  {&__pyx_n_s_WatermarkEstimatorParam, __pyx_k_WatermarkEstimatorParam, sizeof(__pyx_k_WatermarkEstimatorParam), 0, 0, 1, 1},
  {&__pyx_n_s_WatermarkEstimatorProvider, __pyx_k_WatermarkEstimatorProvider, sizeof(__pyx_k_WatermarkEstimatorProvider), 0, 0, 1, 1},
  {&__pyx_n_s_WindowFn, __pyx_k_WindowFn, sizeof(__pyx_k_WindowFn), 0, 0, 1, 1},
  {&__pyx_n_s_WindowParam, __pyx_k_WindowParam, sizeof(__pyx_k_WindowParam), 0, 0, 1, 1},
  {&__pyx_n_s_WindowedBatch, __pyx_k_WindowedBatch, sizeof(__pyx_k_WindowedBatch), 0, 0, 1, 1},
  {&__pyx_n_u_WindowedBatch, __pyx_k_WindowedBatch, sizeof(__pyx_k_WindowedBatch), 0, 1, 0, 1},
  {&__pyx_n_s_WindowedValue, __pyx_k_WindowedValue, sizeof(__pyx_k_WindowedValue), 0, 0, 1, 1},
  {&__pyx_n_s_WindowedValueCoder, __pyx_k_WindowedValueCoder, sizeof(__pyx_k_WindowedValueCoder), 0, 0, 1, 1},
  {&__pyx_kp_b__111, __pyx_k__111, sizeof(__pyx_k__111), 0, 0, 0, 0},
  {&__pyx_kp_u__111, __pyx_k__111, sizeof(__pyx_k__111), 0, 1, 0, 0},
  {&__pyx_kp_u__127, __pyx_k__127, sizeof(__pyx_k__127), 0, 1, 0, 0},
  {&__pyx_n_s__184, __pyx_k__184, sizeof(__pyx_k__184), 0, 0, 1, 1},
  {&__pyx_kp_u__23, __pyx_k__23, sizeof(__pyx_k__23), 0, 1, 0, 0},
  {&__pyx_kp_u__64, __pyx_k__64, sizeof(__pyx_k__64), 0, 1, 0, 0},
  {&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 0, 1, 1},
  {&__pyx_n_s_accumulator, __pyx_k_accumulator, sizeof(__pyx_k_accumulator), 0, 0, 1, 1},
  {&__pyx_n_s_additional_args, __pyx_k_additional_args, sizeof(__pyx_k_additional_args), 0, 0, 1, 1},
  {&__pyx_n_s_additional_kwargs, __pyx_k_additional_kwargs, sizeof(__pyx_k_additional_kwargs), 0, 0, 1, 1},
  {&__pyx_n_s_aggregator, __pyx_k_aggregator, sizeof(__pyx_k_aggregator), 0, 0, 1, 1},
  {&__pyx_n_s_all_timer_specs, __pyx_k_all_timer_specs, sizeof(__pyx_k_all_timer_specs), 0, 0, 1, 1},
  {&__pyx_kp_u_and_output_coder, __pyx_k_and_output_coder, sizeof(__pyx_k_and_output_coder), 0, 1, 0, 0},
  {&__pyx_n_s_any, __pyx_k_any, sizeof(__pyx_k_any), 0, 0, 1, 1},
  {&__pyx_n_s_apache_beam_coders, __pyx_k_apache_beam_coders, sizeof(__pyx_k_apache_beam_coders), 0, 0, 1, 1},
  {&__pyx_n_s_apache_beam_internal, __pyx_k_apache_beam_internal, sizeof(__pyx_k_apache_beam_internal), 0, 0, 1, 1},
  {&__pyx_n_s_apache_beam_io_iobase, __pyx_k_apache_beam_io_iobase, sizeof(__pyx_k_apache_beam_io_iobase), 0, 0, 1, 1},
  {&__pyx_n_s_apache_beam_iobase, __pyx_k_apache_beam_iobase, sizeof(__pyx_k_apache_beam_iobase), 0, 0, 1, 1},
  {&__pyx_n_s_apache_beam_options_value_provid, __pyx_k_apache_beam_options_value_provid, sizeof(__pyx_k_apache_beam_options_value_provid), 0, 0, 1, 1},
  {&__pyx_n_s_apache_beam_pipeline, __pyx_k_apache_beam_pipeline, sizeof(__pyx_k_apache_beam_pipeline), 0, 0, 1, 1},
  {&__pyx_n_s_apache_beam_portability, __pyx_k_apache_beam_portability, sizeof(__pyx_k_apache_beam_portability), 0, 0, 1, 1},
  {&__pyx_n_s_apache_beam_pvalue, __pyx_k_apache_beam_pvalue, sizeof(__pyx_k_apache_beam_pvalue), 0, 0, 1, 1},
  {&__pyx_n_s_apache_beam_runners_common, __pyx_k_apache_beam_runners_common, sizeof(__pyx_k_apache_beam_runners_common), 0, 0, 1, 1},
  {&__pyx_kp_s_apache_beam_runners_common_py, __pyx_k_apache_beam_runners_common_py, sizeof(__pyx_k_apache_beam_runners_common_py), 0, 0, 1, 0},
  {&__pyx_n_s_apache_beam_runners_sdf_utils, __pyx_k_apache_beam_runners_sdf_utils, sizeof(__pyx_k_apache_beam_runners_sdf_utils), 0, 0, 1, 1},
  {&__pyx_n_s_apache_beam_runners_worker_bundl, __pyx_k_apache_beam_runners_worker_bundl, sizeof(__pyx_k_apache_beam_runners_worker_bundl), 0, 0, 1, 1},
  {&__pyx_n_s_apache_beam_transforms, __pyx_k_apache_beam_transforms, sizeof(__pyx_k_apache_beam_transforms), 0, 0, 1, 1},
  {&__pyx_n_s_apache_beam_transforms_core, __pyx_k_apache_beam_transforms_core, sizeof(__pyx_k_apache_beam_transforms_core), 0, 0, 1, 1},
  {&__pyx_n_s_apache_beam_transforms_window, __pyx_k_apache_beam_transforms_window, sizeof(__pyx_k_apache_beam_transforms_window), 0, 0, 1, 1},
  {&__pyx_n_s_apache_beam_typehints, __pyx_k_apache_beam_typehints, sizeof(__pyx_k_apache_beam_typehints), 0, 0, 1, 1},
  {&__pyx_n_s_apache_beam_typehints_batch, __pyx_k_apache_beam_typehints_batch, sizeof(__pyx_k_apache_beam_typehints_batch), 0, 0, 1, 1},
  {&__pyx_n_s_apache_beam_utils_counters, __pyx_k_apache_beam_utils_counters, sizeof(__pyx_k_apache_beam_utils_counters), 0, 0, 1, 1},
  {&__pyx_n_s_apache_beam_utils_timestamp, __pyx_k_apache_beam_utils_timestamp, sizeof(__pyx_k_apache_beam_utils_timestamp), 0, 0, 1, 1},
  {&__pyx_n_s_apache_beam_utils_windowed_value, __pyx_k_apache_beam_utils_windowed_value, sizeof(__pyx_k_apache_beam_utils_windowed_value), 0, 0, 1, 1},
  {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
  {&__pyx_n_s_arg_names, __pyx_k_arg_names, sizeof(__pyx_k_arg_names), 0, 0, 1, 1},
  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
  {&__pyx_n_s_args_for_process, __pyx_k_args_for_process, sizeof(__pyx_k_args_for_process), 0, 0, 1, 1},
  {&__pyx_n_s_args_for_process_batch, __pyx_k_args_for_process_batch, sizeof(__pyx_k_args_for_process_batch), 0, 0, 1, 1},
  {&__pyx_n_s_args_to_pick, __pyx_k_args_to_pick, sizeof(__pyx_k_args_to_pick), 0, 0, 1, 1},
  {&__pyx_n_s_args_with_placeholders, __pyx_k_args_with_placeholders, sizeof(__pyx_k_args_with_placeholders), 0, 0, 1, 1},
  {&__pyx_n_s_as_empty_windowed_value, __pyx_k_as_empty_windowed_value, sizeof(__pyx_k_as_empty_windowed_value), 0, 0, 1, 1},
  {&__pyx_n_s_assign, __pyx_k_assign, sizeof(__pyx_k_assign), 0, 0, 1, 1},
  {&__pyx_n_s_attached_callback, __pyx_k_attached_callback, sizeof(__pyx_k_attached_callback), 0, 0, 1, 1},
  {&__pyx_n_s_batch, __pyx_k_batch, sizeof(__pyx_k_batch), 0, 0, 1, 1},
  {&__pyx_n_u_beam_yields_batches, __pyx_k_beam_yields_batches, sizeof(__pyx_k_beam_yields_batches), 0, 1, 0, 1},
  {&__pyx_n_u_beam_yields_elements, __pyx_k_beam_yields_elements, sizeof(__pyx_k_beam_yields_elements), 0, 1, 0, 1},
  {&__pyx_n_s_bundle_finalizer_param, __pyx_k_bundle_finalizer_param, sizeof(__pyx_k_bundle_finalizer_param), 0, 0, 1, 1},
  {&__pyx_n_s_bundle_method, __pyx_k_bundle_method, sizeof(__pyx_k_bundle_method), 0, 0, 1, 1},
  {&__pyx_kp_u_cannot_be_used_in, __pyx_k_cannot_be_used_in, sizeof(__pyx_k_cannot_be_used_in), 0, 1, 0, 0},
  {&__pyx_n_s_check_done, __pyx_k_check_done, sizeof(__pyx_k_check_done), 0, 0, 1, 1},
  {&__pyx_n_s_check_duplicate_dofn_params, __pyx_k_check_duplicate_dofn_params, sizeof(__pyx_k_check_duplicate_dofn_params), 0, 0, 1, 1},
  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
  {&__pyx_n_s_coder_id, __pyx_k_coder_id, sizeof(__pyx_k_coder_id), 0, 0, 1, 1},
  {&__pyx_n_s_coders, __pyx_k_coders, sizeof(__pyx_k_coders), 0, 0, 1, 1},
  {&__pyx_n_s_coerce_to_kv_type, __pyx_k_coerce_to_kv_type, sizeof(__pyx_k_coerce_to_kv_type), 0, 0, 1, 1},
  {&__pyx_n_s_common_urns, __pyx_k_common_urns, sizeof(__pyx_k_common_urns), 0, 0, 1, 1},
  {&__pyx_n_s_completed, __pyx_k_completed, sizeof(__pyx_k_completed), 0, 0, 1, 1},
  {&__pyx_n_s_completed_work, __pyx_k_completed_work, sizeof(__pyx_k_completed_work), 0, 0, 1, 1},
  {&__pyx_n_s_component_coder_ids, __pyx_k_component_coder_ids, sizeof(__pyx_k_component_coder_ids), 0, 0, 1, 1},
  {&__pyx_n_s_components, __pyx_k_components, sizeof(__pyx_k_components), 0, 0, 1, 1},
  {&__pyx_n_s_compute_whole_window_split, __pyx_k_compute_whole_window_split, sizeof(__pyx_k_compute_whole_window_split), 0, 0, 1, 1},
  {&__pyx_n_s_context, __pyx_k_context, sizeof(__pyx_k_context), 0, 0, 1, 1},
  {&__pyx_n_s_core, __pyx_k_core, sizeof(__pyx_k_core), 0, 0, 1, 1},
  {&__pyx_n_s_counter_factory, __pyx_k_counter_factory, sizeof(__pyx_k_counter_factory), 0, 0, 1, 1},
  {&__pyx_n_s_counter_factory_2, __pyx_k_counter_factory_2, sizeof(__pyx_k_counter_factory_2), 0, 0, 1, 1},
  {&__pyx_n_s_counter_for, __pyx_k_counter_for, sizeof(__pyx_k_counter_for), 0, 0, 1, 1},
  {&__pyx_n_s_create_invoker, __pyx_k_create_invoker, sizeof(__pyx_k_create_invoker), 0, 0, 1, 1},
  {&__pyx_n_u_create_tracker, __pyx_k_create_tracker, sizeof(__pyx_k_create_tracker), 0, 1, 0, 1},
  {&__pyx_n_u_create_watermark_estimator, __pyx_k_create_watermark_estimator, sizeof(__pyx_k_create_watermark_estimator), 0, 1, 0, 1},
  {&__pyx_n_s_current_element_progress, __pyx_k_current_element_progress, sizeof(__pyx_k_current_element_progress), 0, 0, 1, 1},
  {&__pyx_n_s_current_estimator_state, __pyx_k_current_estimator_state, sizeof(__pyx_k_current_estimator_state), 0, 0, 1, 1},
  {&__pyx_n_s_current_progress, __pyx_k_current_progress, sizeof(__pyx_k_current_progress), 0, 0, 1, 1},
  {&__pyx_n_s_current_watermark, __pyx_k_current_watermark, sizeof(__pyx_k_current_watermark), 0, 0, 1, 1},
  {&__pyx_n_s_current_window_index, __pyx_k_current_window_index, sizeof(__pyx_k_current_window_index), 0, 0, 1, 1},
  {&__pyx_n_s_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 0, 1, 1},
  {&__pyx_n_s_default_arg_values, __pyx_k_default_arg_values, sizeof(__pyx_k_default_arg_values), 0, 0, 1, 1},
  {&__pyx_n_s_defaults, __pyx_k_defaults, sizeof(__pyx_k_defaults), 0, 0, 1, 1},
  {&__pyx_n_s_deferred_restriction, __pyx_k_deferred_restriction, sizeof(__pyx_k_deferred_restriction), 0, 0, 1, 1},
  {&__pyx_n_s_deferred_status, __pyx_k_deferred_status, sizeof(__pyx_k_deferred_status), 0, 0, 1, 1},
  {&__pyx_n_s_deferred_timestamp, __pyx_k_deferred_timestamp, sizeof(__pyx_k_deferred_timestamp), 0, 0, 1, 1},
  {&__pyx_n_s_deterministic_key_coders, __pyx_k_deterministic_key_coders, sizeof(__pyx_k_deterministic_key_coders), 0, 0, 1, 1},
  {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
  {&__pyx_n_s_dict_2, __pyx_k_dict_2, sizeof(__pyx_k_dict_2), 0, 0, 1, 1},
  {&__pyx_n_s_do_fn, __pyx_k_do_fn, sizeof(__pyx_k_do_fn), 0, 0, 1, 1},
  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
  {&__pyx_n_s_dynamic_timer_tag, __pyx_k_dynamic_timer_tag, sizeof(__pyx_k_dynamic_timer_tag), 0, 0, 1, 1},
  {&__pyx_n_s_element, __pyx_k_element, sizeof(__pyx_k_element), 0, 0, 1, 1},
  {&__pyx_kp_u_element_not_accessible_in_this_c, __pyx_k_element_not_accessible_in_this_c, sizeof(__pyx_k_element_not_accessible_in_this_c), 0, 1, 0, 0},
  {&__pyx_n_s_element_type, __pyx_k_element_type, sizeof(__pyx_k_element_type), 0, 0, 1, 1},
  {&__pyx_n_s_encode_nested, __pyx_k_encode_nested, sizeof(__pyx_k_encode_nested), 0, 0, 1, 1},
  {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1},
  {&__pyx_n_s_enter_composite_transform, __pyx_k_enter_composite_transform, sizeof(__pyx_k_enter_composite_transform), 0, 0, 1, 1},
  {&__pyx_n_s_enum, __pyx_k_enum, sizeof(__pyx_k_enum), 0, 0, 1, 1},
  {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
  {&__pyx_n_s_eq, __pyx_k_eq, sizeof(__pyx_k_eq), 0, 0, 1, 1},
  {&__pyx_n_s_estimator_state, __pyx_k_estimator_state, sizeof(__pyx_k_estimator_state), 0, 0, 1, 1},
  {&__pyx_n_s_estimator_state_coder, __pyx_k_estimator_state_coder, sizeof(__pyx_k_estimator_state_coder), 0, 0, 1, 1},
  {&__pyx_n_s_exc_info, __pyx_k_exc_info, sizeof(__pyx_k_exc_info), 0, 0, 1, 1},
  {&__pyx_n_s_exception, __pyx_k_exception, sizeof(__pyx_k_exception), 0, 0, 1, 1},
  {&__pyx_n_s_existing_windows, __pyx_k_existing_windows, sizeof(__pyx_k_existing_windows), 0, 0, 1, 1},
  {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1},
  {&__pyx_n_s_exn, __pyx_k_exn, sizeof(__pyx_k_exn), 0, 0, 1, 1},
  {&__pyx_n_s_experiments, __pyx_k_experiments, sizeof(__pyx_k_experiments), 0, 0, 1, 1},
  {&__pyx_n_s_extend, __pyx_k_extend, sizeof(__pyx_k_extend), 0, 0, 1, 1},
  {&__pyx_n_s_finalize, __pyx_k_finalize, sizeof(__pyx_k_finalize), 0, 0, 1, 1},
  {&__pyx_n_s_finalize_bundle, __pyx_k_finalize_bundle, sizeof(__pyx_k_finalize_bundle), 0, 0, 1, 1},
  {&__pyx_n_s_finish, __pyx_k_finish, sizeof(__pyx_k_finish), 0, 0, 1, 1},
  {&__pyx_n_u_finish_bundle, __pyx_k_finish_bundle, sizeof(__pyx_k_finish_bundle), 0, 1, 0, 1},
  {&__pyx_n_s_finish_bundle_outputs, __pyx_k_finish_bundle_outputs, sizeof(__pyx_k_finish_bundle_outputs), 0, 0, 1, 1},
  {&__pyx_n_s_flush, __pyx_k_flush, sizeof(__pyx_k_flush), 0, 0, 1, 1},
  {&__pyx_n_s_fn, __pyx_k_fn, sizeof(__pyx_k_fn), 0, 0, 1, 1},
  {&__pyx_kp_u_for_transform, __pyx_k_for_transform, sizeof(__pyx_k_for_transform), 0, 1, 0, 0},
  {&__pyx_n_s_format_exception_only, __pyx_k_format_exception_only, sizeof(__pyx_k_format_exception_only), 0, 0, 1, 1},
  {&__pyx_n_s_fraction, __pyx_k_fraction, sizeof(__pyx_k_fraction), 0, 0, 1, 1},
  {&__pyx_n_s_fraction_of_remainder, __pyx_k_fraction_of_remainder, sizeof(__pyx_k_fraction_of_remainder), 0, 0, 1, 1},
  {&__pyx_kp_u_from_DoFn_that_was_expected_to, __pyx_k_from_DoFn_that_was_expected_to, sizeof(__pyx_k_from_DoFn_that_was_expected_to), 0, 1, 0, 0},
  {&__pyx_n_s_from_batch_and_windowed_value, __pyx_k_from_batch_and_windowed_value, sizeof(__pyx_k_from_batch_and_windowed_value), 0, 0, 1, 1},
  {&__pyx_n_s_from_index, __pyx_k_from_index, sizeof(__pyx_k_from_index), 0, 0, 1, 1},
  {&__pyx_n_s_full_label, __pyx_k_full_label, sizeof(__pyx_k_full_label), 0, 0, 1, 1},
  {&__pyx_n_s_genexpr, __pyx_k_genexpr, sizeof(__pyx_k_genexpr), 0, 0, 1, 1},
  {&__pyx_n_s_getLogger, __pyx_k_getLogger, sizeof(__pyx_k_getLogger), 0, 0, 1, 1},
  {&__pyx_n_s_get_aggregator_counter, __pyx_k_get_aggregator_counter, sizeof(__pyx_k_get_aggregator_counter), 0, 0, 1, 1},
  {&__pyx_n_s_get_arg_placeholders, __pyx_k_get_arg_placeholders, sizeof(__pyx_k_get_arg_placeholders), 0, 0, 1, 1},
  {&__pyx_n_s_get_arg_placeholders_locals_Arg, __pyx_k_get_arg_placeholders_locals_Arg, sizeof(__pyx_k_get_arg_placeholders_locals_Arg), 0, 0, 1, 1},
  {&__pyx_n_s_get_arg_placeholders_locals_Arg_2, __pyx_k_get_arg_placeholders_locals_Arg_2, sizeof(__pyx_k_get_arg_placeholders_locals_Arg_2), 0, 0, 1, 1},
  {&__pyx_n_s_get_arg_placeholders_locals_gen, __pyx_k_get_arg_placeholders_locals_gen, sizeof(__pyx_k_get_arg_placeholders_locals_gen), 0, 0, 1, 1},
  {&__pyx_n_s_get_coder, __pyx_k_get_coder, sizeof(__pyx_k_get_coder), 0, 0, 1, 1},
  {&__pyx_n_s_get_counter, __pyx_k_get_counter, sizeof(__pyx_k_get_counter), 0, 0, 1, 1},
  {&__pyx_n_s_get_dofn_specs, __pyx_k_get_dofn_specs, sizeof(__pyx_k_get_dofn_specs), 0, 0, 1, 1},
  {&__pyx_n_s_get_estimator_state, __pyx_k_get_estimator_state, sizeof(__pyx_k_get_estimator_state), 0, 0, 1, 1},
  {&__pyx_n_s_get_function_arguments, __pyx_k_get_function_arguments, sizeof(__pyx_k_get_function_arguments), 0, 0, 1, 1},
  {&__pyx_n_s_get_impl, __pyx_k_get_impl, sizeof(__pyx_k_get_impl), 0, 0, 1, 1},
  {&__pyx_n_s_get_length, __pyx_k_get_length, sizeof(__pyx_k_get_length), 0, 0, 1, 1},
  {&__pyx_n_s_get_restriction_coder, __pyx_k_get_restriction_coder, sizeof(__pyx_k_get_restriction_coder), 0, 0, 1, 1},
  {&__pyx_n_s_get_restriction_provider, __pyx_k_get_restriction_provider, sizeof(__pyx_k_get_restriction_provider), 0, 0, 1, 1},
  {&__pyx_n_s_get_state, __pyx_k_get_state, sizeof(__pyx_k_get_state), 0, 0, 1, 1},
  {&__pyx_n_s_get_timer, __pyx_k_get_timer, sizeof(__pyx_k_get_timer), 0, 0, 1, 1},
  {&__pyx_n_s_get_watermark_estimator_provider, __pyx_k_get_watermark_estimator_provider, sizeof(__pyx_k_get_watermark_estimator_provider), 0, 0, 1, 1},
  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
  {&__pyx_n_s_global_window, __pyx_k_global_window, sizeof(__pyx_k_global_window), 0, 0, 1, 1},
  {&__pyx_n_s_group_by_key_input_visitor, __pyx_k_group_by_key_input_visitor, sizeof(__pyx_k_group_by_key_input_visitor), 0, 0, 1, 1},
  {&__pyx_n_s_group_by_key_input_visitor_local, __pyx_k_group_by_key_input_visitor_local, sizeof(__pyx_k_group_by_key_input_visitor_local), 0, 0, 1, 1},
  {&__pyx_n_s_group_by_key_input_visitor_local_2, __pyx_k_group_by_key_input_visitor_local_2, sizeof(__pyx_k_group_by_key_input_visitor_local_2), 0, 0, 1, 1},
  {&__pyx_n_s_group_by_key_input_visitor_local_3, __pyx_k_group_by_key_input_visitor_local_3, sizeof(__pyx_k_group_by_key_input_visitor_local_3), 0, 0, 1, 1},
  {&__pyx_n_s_group_by_key_input_visitor_local_4, __pyx_k_group_by_key_input_visitor_local_4, sizeof(__pyx_k_group_by_key_input_visitor_local_4), 0, 0, 1, 1},
  {&__pyx_n_s_handle_process_batch_outputs, __pyx_k_handle_process_batch_outputs, sizeof(__pyx_k_handle_process_batch_outputs), 0, 0, 1, 1},
  {&__pyx_n_s_handle_process_outputs, __pyx_k_handle_process_outputs, sizeof(__pyx_k_handle_process_outputs), 0, 0, 1, 1},
  {&__pyx_n_s_has_bundle_finalization, __pyx_k_has_bundle_finalization, sizeof(__pyx_k_has_bundle_finalization), 0, 0, 1, 1},
  {&__pyx_kp_u_has_duplicate, __pyx_k_has_duplicate, sizeof(__pyx_k_has_duplicate), 0, 1, 0, 0},
  {&__pyx_n_s_has_timers, __pyx_k_has_timers, sizeof(__pyx_k_has_timers), 0, 0, 1, 1},
  {&__pyx_kp_u_has_unsupported_per_key_DoFn_pa, __pyx_k_has_unsupported_per_key_DoFn_pa, sizeof(__pyx_k_has_unsupported_per_key_DoFn_pa), 0, 1, 0, 0},
  {&__pyx_kp_u_has_unsupported_process_batch_m, __pyx_k_has_unsupported_process_batch_m, sizeof(__pyx_k_has_unsupported_process_batch_m), 0, 1, 0, 0},
  {&__pyx_n_s_hash, __pyx_k_hash, sizeof(__pyx_k_hash), 0, 0, 1, 1},
  {&__pyx_kp_u_https_github_com_apache_beam_iss, __pyx_k_https_github_com_apache_beam_iss, sizeof(__pyx_k_https_github_com_apache_beam_iss), 0, 1, 0, 0},
  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
  {&__pyx_n_s_init___locals_genexpr, __pyx_k_init___locals_genexpr, sizeof(__pyx_k_init___locals_genexpr), 0, 0, 1, 1},
  {&__pyx_n_u_initial_restriction, __pyx_k_initial_restriction, sizeof(__pyx_k_initial_restriction), 0, 1, 0, 1},
  {&__pyx_n_s_input_args, __pyx_k_input_args, sizeof(__pyx_k_input_args), 0, 0, 1, 1},
  {&__pyx_n_s_input_coder, __pyx_k_input_coder, sizeof(__pyx_k_input_coder), 0, 0, 1, 1},
  {&__pyx_n_s_input_kwargs, __pyx_k_input_kwargs, sizeof(__pyx_k_input_kwargs), 0, 0, 1, 1},
  {&__pyx_n_s_inputs, __pyx_k_inputs, sizeof(__pyx_k_inputs), 0, 0, 1, 1},
  {&__pyx_n_s_insert_values_in_args, __pyx_k_insert_values_in_args, sizeof(__pyx_k_insert_values_in_args), 0, 0, 1, 1},
  {&__pyx_n_s_instruction_id, __pyx_k_instruction_id, sizeof(__pyx_k_instruction_id), 0, 0, 1, 1},
  {&__pyx_n_s_invoke_bundle_method, __pyx_k_invoke_bundle_method, sizeof(__pyx_k_invoke_bundle_method), 0, 0, 1, 1},
  {&__pyx_n_s_invoke_create_tracker, __pyx_k_invoke_create_tracker, sizeof(__pyx_k_invoke_create_tracker), 0, 0, 1, 1},
  {&__pyx_n_s_invoke_create_watermark_estimato, __pyx_k_invoke_create_watermark_estimato, sizeof(__pyx_k_invoke_create_watermark_estimato), 0, 0, 1, 1},
  {&__pyx_n_s_invoke_finish_bundle, __pyx_k_invoke_finish_bundle, sizeof(__pyx_k_invoke_finish_bundle), 0, 0, 1, 1},
  {&__pyx_n_s_invoke_initial_restriction, __pyx_k_invoke_initial_restriction, sizeof(__pyx_k_invoke_initial_restriction), 0, 0, 1, 1},
  {&__pyx_n_s_invoke_lifecycle_method, __pyx_k_invoke_lifecycle_method, sizeof(__pyx_k_invoke_lifecycle_method), 0, 0, 1, 1},
  {&__pyx_n_s_invoke_process, __pyx_k_invoke_process, sizeof(__pyx_k_invoke_process), 0, 0, 1, 1},
  {&__pyx_n_s_invoke_process_batch, __pyx_k_invoke_process_batch, sizeof(__pyx_k_invoke_process_batch), 0, 0, 1, 1},
  {&__pyx_n_s_invoke_process_batch_per_window, __pyx_k_invoke_process_batch_per_window, sizeof(__pyx_k_invoke_process_batch_per_window), 0, 0, 1, 1},
  {&__pyx_n_s_invoke_process_per_window, __pyx_k_invoke_process_per_window, sizeof(__pyx_k_invoke_process_per_window), 0, 0, 1, 1},
  {&__pyx_n_s_invoke_setup, __pyx_k_invoke_setup, sizeof(__pyx_k_invoke_setup), 0, 0, 1, 1},
  {&__pyx_n_s_invoke_split, __pyx_k_invoke_split, sizeof(__pyx_k_invoke_split), 0, 0, 1, 1},
  {&__pyx_n_s_invoke_start_bundle, __pyx_k_invoke_start_bundle, sizeof(__pyx_k_invoke_start_bundle), 0, 0, 1, 1},
  {&__pyx_n_s_invoke_teardown, __pyx_k_invoke_teardown, sizeof(__pyx_k_invoke_teardown), 0, 0, 1, 1},
  {&__pyx_n_s_invoke_timer_callback, __pyx_k_invoke_timer_callback, sizeof(__pyx_k_invoke_timer_callback), 0, 0, 1, 1},
  {&__pyx_n_s_invoke_user_timer, __pyx_k_invoke_user_timer, sizeof(__pyx_k_invoke_user_timer), 0, 0, 1, 1},
  {&__pyx_n_s_is_cythonized, __pyx_k_is_cythonized, sizeof(__pyx_k_is_cythonized), 0, 0, 1, 1},
  {&__pyx_n_s_is_globally_windowed, __pyx_k_is_globally_windowed, sizeof(__pyx_k_is_globally_windowed), 0, 0, 1, 1},
  {&__pyx_kp_u_is_not_a_string, __pyx_k_is_not_a_string, sizeof(__pyx_k_is_not_a_string), 0, 1, 0, 0},
  {&__pyx_n_s_is_splittable_dofn, __pyx_k_is_splittable_dofn, sizeof(__pyx_k_is_splittable_dofn), 0, 0, 1, 1},
  {&__pyx_n_s_is_stateful_dofn, __pyx_k_is_stateful_dofn, sizeof(__pyx_k_is_stateful_dofn), 0, 0, 1, 1},
  {&__pyx_n_s_is_unbounded_per_element, __pyx_k_is_unbounded_per_element, sizeof(__pyx_k_is_unbounded_per_element), 0, 0, 1, 1},
  {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
  {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1},
  {&__pyx_n_s_key_type, __pyx_k_key_type, sizeof(__pyx_k_key_type), 0, 0, 1, 1},
  {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1},
  {&__pyx_n_s_kw, __pyx_k_kw, sizeof(__pyx_k_kw), 0, 0, 1, 1},
  {&__pyx_n_s_kwargs, __pyx_k_kwargs, sizeof(__pyx_k_kwargs), 0, 0, 1, 1},
  {&__pyx_n_s_kwargs_for_process, __pyx_k_kwargs_for_process, sizeof(__pyx_k_kwargs_for_process), 0, 0, 1, 1},
  {&__pyx_n_s_kwargs_for_process_batch, __pyx_k_kwargs_for_process_batch, sizeof(__pyx_k_kwargs_for_process_batch), 0, 0, 1, 1},
  {&__pyx_n_s_label, __pyx_k_label, sizeof(__pyx_k_label), 0, 0, 1, 1},
  {&__pyx_n_s_lifecycle_method, __pyx_k_lifecycle_method, sizeof(__pyx_k_lifecycle_method), 0, 0, 1, 1},
  {&__pyx_n_s_logging, __pyx_k_logging, sizeof(__pyx_k_logging), 0, 0, 1, 1},
  {&__pyx_n_s_logging_context, __pyx_k_logging_context, sizeof(__pyx_k_logging_context), 0, 0, 1, 1},
  {&__pyx_n_s_logging_name, __pyx_k_logging_name, sizeof(__pyx_k_logging_name), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_main_receivers, __pyx_k_main_receivers, sizeof(__pyx_k_main_receivers), 0, 0, 1, 1},
  {&__pyx_n_s_maybe_sample_exception, __pyx_k_maybe_sample_exception, sizeof(__pyx_k_maybe_sample_exception), 0, 0, 1, 1},
  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
  {&__pyx_n_s_method, __pyx_k_method, sizeof(__pyx_k_method), 0, 0, 1, 1},
  {&__pyx_n_s_method_name, __pyx_k_method_name, sizeof(__pyx_k_method_name), 0, 0, 1, 1},
  {&__pyx_kp_u_method_parameters, __pyx_k_method_parameters, sizeof(__pyx_k_method_parameters), 0, 1, 0, 0},
  {&__pyx_n_s_method_value, __pyx_k_method_value, sizeof(__pyx_k_method_value), 0, 0, 1, 1},
  {&__pyx_n_s_method_wrapper, __pyx_k_method_wrapper, sizeof(__pyx_k_method_wrapper), 0, 0, 1, 1},
  {&__pyx_n_s_metrics_name, __pyx_k_metrics_name, sizeof(__pyx_k_metrics_name), 0, 0, 1, 1},
  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
  {&__pyx_n_s_new_exn, __pyx_k_new_exn, sizeof(__pyx_k_new_exn), 0, 0, 1, 1},
  {&__pyx_n_s_new_stop_window_index, __pyx_k_new_stop_window_index, sizeof(__pyx_k_new_stop_window_index), 0, 0, 1, 1},
  {&__pyx_n_s_obj_to_invoke, __pyx_k_obj_to_invoke, sizeof(__pyx_k_obj_to_invoke), 0, 0, 1, 1},
  {&__pyx_kp_u_obj_to_invoke_has_to_be_either, __pyx_k_obj_to_invoke_has_to_be_either, sizeof(__pyx_k_obj_to_invoke_has_to_be_either), 0, 1, 0, 0},
  {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
  {&__pyx_n_s_observe_timestamp, __pyx_k_observe_timestamp, sizeof(__pyx_k_observe_timestamp), 0, 0, 1, 1},
  {&__pyx_n_s_of, __pyx_k_of, sizeof(__pyx_k_of), 0, 0, 1, 1},
  {&__pyx_n_s_operation_name, __pyx_k_operation_name, sizeof(__pyx_k_operation_name), 0, 0, 1, 1},
  {&__pyx_n_s_other, __pyx_k_other, sizeof(__pyx_k_other), 0, 0, 1, 1},
  {&__pyx_n_s_output_batch_converter, __pyx_k_output_batch_converter, sizeof(__pyx_k_output_batch_converter), 0, 0, 1, 1},
  {&__pyx_n_u_output_batch_converter, __pyx_k_output_batch_converter, sizeof(__pyx_k_output_batch_converter), 0, 1, 0, 1},
  {&__pyx_n_s_output_coder, __pyx_k_output_coder, sizeof(__pyx_k_output_coder), 0, 0, 1, 1},
  {&__pyx_n_s_output_handler, __pyx_k_output_handler, sizeof(__pyx_k_output_handler), 0, 0, 1, 1},
  {&__pyx_n_s_output_sampler, __pyx_k_output_sampler, sizeof(__pyx_k_output_sampler), 0, 0, 1, 1},
  {&__pyx_n_s_output_values_coder, __pyx_k_output_values_coder, sizeof(__pyx_k_output_values_coder), 0, 0, 1, 1},
  {&__pyx_n_s_outputs, __pyx_k_outputs, sizeof(__pyx_k_outputs), 0, 0, 1, 1},
  {&__pyx_n_u_outputs_per_element_counter, __pyx_k_outputs_per_element_counter, sizeof(__pyx_k_outputs_per_element_counter), 0, 1, 0, 1},
  {&__pyx_n_s_p, __pyx_k_p, sizeof(__pyx_k_p), 0, 0, 1, 1},
  {&__pyx_n_s_pane_info, __pyx_k_pane_info, sizeof(__pyx_k_pane_info), 0, 0, 1, 1},
  {&__pyx_n_s_param, __pyx_k_param, sizeof(__pyx_k_param), 0, 0, 1, 1},
  {&__pyx_n_s_param_id, __pyx_k_param_id, sizeof(__pyx_k_param_id), 0, 0, 1, 1},
  {&__pyx_n_s_param_ids, __pyx_k_param_ids, sizeof(__pyx_k_param_ids), 0, 0, 1, 1},
  {&__pyx_n_s_pcoll, __pyx_k_pcoll, sizeof(__pyx_k_pcoll), 0, 0, 1, 1},
  {&__pyx_n_s_pcoll_id, __pyx_k_pcoll_id, sizeof(__pyx_k_pcoll_id), 0, 0, 1, 1},
  {&__pyx_n_s_pcollections, __pyx_k_pcollections, sizeof(__pyx_k_pcollections), 0, 0, 1, 1},
  {&__pyx_kp_u_per_element_output_count, __pyx_k_per_element_output_count, sizeof(__pyx_k_per_element_output_count), 0, 1, 0, 0},
  {&__pyx_n_s_per_element_output_counter, __pyx_k_per_element_output_counter, sizeof(__pyx_k_per_element_output_counter), 0, 0, 1, 1},
  {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
  {&__pyx_n_s_pipeline_proto, __pyx_k_pipeline_proto, sizeof(__pyx_k_pipeline_proto), 0, 0, 1, 1},
  {&__pyx_n_s_placeholder, __pyx_k_placeholder, sizeof(__pyx_k_placeholder), 0, 0, 1, 1},
  {&__pyx_n_s_placeholders, __pyx_k_placeholders, sizeof(__pyx_k_placeholders), 0, 0, 1, 1},
  {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
  {&__pyx_n_s_primaries, __pyx_k_primaries, sizeof(__pyx_k_primaries), 0, 0, 1, 1},
  {&__pyx_n_s_primary, __pyx_k_primary, sizeof(__pyx_k_primary), 0, 0, 1, 1},
  {&__pyx_n_s_primary_restriction, __pyx_k_primary_restriction, sizeof(__pyx_k_primary_restriction), 0, 0, 1, 1},
  {&__pyx_n_s_primary_restrictions, __pyx_k_primary_restrictions, sizeof(__pyx_k_primary_restrictions), 0, 0, 1, 1},
  {&__pyx_n_s_primary_size, __pyx_k_primary_size, sizeof(__pyx_k_primary_size), 0, 0, 1, 1},
  {&__pyx_n_s_primary_split_value, __pyx_k_primary_split_value, sizeof(__pyx_k_primary_split_value), 0, 0, 1, 1},
  {&__pyx_n_s_primary_value, __pyx_k_primary_value, sizeof(__pyx_k_primary_value), 0, 0, 1, 1},
  {&__pyx_n_s_primitives, __pyx_k_primitives, sizeof(__pyx_k_primitives), 0, 0, 1, 1},
  {&__pyx_n_s_process, __pyx_k_process, sizeof(__pyx_k_process), 0, 0, 1, 1},
  {&__pyx_n_u_process, __pyx_k_process, sizeof(__pyx_k_process), 0, 1, 0, 1},
  {&__pyx_n_s_process_batch, __pyx_k_process_batch, sizeof(__pyx_k_process_batch), 0, 0, 1, 1},
  {&__pyx_n_u_process_batch, __pyx_k_process_batch, sizeof(__pyx_k_process_batch), 0, 1, 0, 1},
  {&__pyx_n_s_process_batch_method, __pyx_k_process_batch_method, sizeof(__pyx_k_process_batch_method), 0, 0, 1, 1},
  {&__pyx_n_s_process_batch_yields_elements, __pyx_k_process_batch_yields_elements, sizeof(__pyx_k_process_batch_yields_elements), 0, 0, 1, 1},
  {&__pyx_n_s_process_invocation, __pyx_k_process_invocation, sizeof(__pyx_k_process_invocation), 0, 0, 1, 1},
  {&__pyx_n_s_process_method, __pyx_k_process_method, sizeof(__pyx_k_process_method), 0, 0, 1, 1},
  {&__pyx_n_s_process_user_timer, __pyx_k_process_user_timer, sizeof(__pyx_k_process_user_timer), 0, 0, 1, 1},
  {&__pyx_n_s_process_with_sized_restriction, __pyx_k_process_with_sized_restriction, sizeof(__pyx_k_process_with_sized_restriction), 0, 0, 1, 1},
  {&__pyx_n_s_process_yields_batches, __pyx_k_process_yields_batches, sizeof(__pyx_k_process_yields_batches), 0, 0, 1, 1},
  {&__pyx_n_s_progress, __pyx_k_progress, sizeof(__pyx_k_progress), 0, 0, 1, 1},
  {&__pyx_n_s_property, __pyx_k_property, sizeof(__pyx_k_property), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_capi, __pyx_k_pyx_capi, sizeof(__pyx_k_pyx_capi), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_DoFnContext, __pyx_k_pyx_unpickle_DoFnContext, sizeof(__pyx_k_pyx_unpickle_DoFnContext), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_DoFnInvoker, __pyx_k_pyx_unpickle_DoFnInvoker, sizeof(__pyx_k_pyx_unpickle_DoFnInvoker), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_DoFnRunner, __pyx_k_pyx_unpickle_DoFnRunner, sizeof(__pyx_k_pyx_unpickle_DoFnRunner), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_DoFnSignature, __pyx_k_pyx_unpickle_DoFnSignature, sizeof(__pyx_k_pyx_unpickle_DoFnSignature), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_MethodWrapper, __pyx_k_pyx_unpickle_MethodWrapper, sizeof(__pyx_k_pyx_unpickle_MethodWrapper), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_OutputHandler, __pyx_k_pyx_unpickle_OutputHandler, sizeof(__pyx_k_pyx_unpickle_OutputHandler), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_PerWindowInvoker, __pyx_k_pyx_unpickle_PerWindowInvoker, sizeof(__pyx_k_pyx_unpickle_PerWindowInvoker), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_Receiver, __pyx_k_pyx_unpickle_Receiver, sizeof(__pyx_k_pyx_unpickle_Receiver), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_SimpleInvoker, __pyx_k_pyx_unpickle_SimpleInvoker, sizeof(__pyx_k_pyx_unpickle_SimpleInvoker), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle__OutputHandler, __pyx_k_pyx_unpickle__OutputHandler, sizeof(__pyx_k_pyx_unpickle__OutputHandler), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
  {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
  {&__pyx_n_s_receive, __pyx_k_receive, sizeof(__pyx_k_receive), 0, 0, 1, 1},
  {&__pyx_n_s_receive_batch, __pyx_k_receive_batch, sizeof(__pyx_k_receive_batch), 0, 0, 1, 1},
  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
  {&__pyx_n_s_remaining, __pyx_k_remaining, sizeof(__pyx_k_remaining), 0, 0, 1, 1},
  {&__pyx_n_s_remaining_args_iter, __pyx_k_remaining_args_iter, sizeof(__pyx_k_remaining_args_iter), 0, 0, 1, 1},
  {&__pyx_n_s_remaining_work, __pyx_k_remaining_work, sizeof(__pyx_k_remaining_work), 0, 0, 1, 1},
  {&__pyx_n_s_repr, __pyx_k_repr, sizeof(__pyx_k_repr), 0, 0, 1, 1},
  {&__pyx_n_s_requires_batches, __pyx_k_requires_batches, sizeof(__pyx_k_requires_batches), 0, 0, 1, 1},
  {&__pyx_n_s_requires_deterministic_key_coder, __pyx_k_requires_deterministic_key_coder, sizeof(__pyx_k_requires_deterministic_key_coder), 0, 0, 1, 1},
  {&__pyx_n_s_reraise_augmented, __pyx_k_reraise_augmented, sizeof(__pyx_k_reraise_augmented), 0, 0, 1, 1},
  {&__pyx_n_s_residual, __pyx_k_residual, sizeof(__pyx_k_residual), 0, 0, 1, 1},
  {&__pyx_n_s_residual_restriction, __pyx_k_residual_restriction, sizeof(__pyx_k_residual_restriction), 0, 0, 1, 1},
  {&__pyx_n_s_residual_restrictions, __pyx_k_residual_restrictions, sizeof(__pyx_k_residual_restrictions), 0, 0, 1, 1},
  {&__pyx_n_s_residual_size, __pyx_k_residual_size, sizeof(__pyx_k_residual_size), 0, 0, 1, 1},
  {&__pyx_n_s_residual_split_value, __pyx_k_residual_split_value, sizeof(__pyx_k_residual_split_value), 0, 0, 1, 1},
  {&__pyx_n_s_residual_value, __pyx_k_residual_value, sizeof(__pyx_k_residual_value), 0, 0, 1, 1},
  {&__pyx_n_s_residuals, __pyx_k_residuals, sizeof(__pyx_k_residuals), 0, 0, 1, 1},
  {&__pyx_n_s_restriction, __pyx_k_restriction, sizeof(__pyx_k_restriction), 0, 0, 1, 1},
  {&__pyx_n_s_restriction_coder, __pyx_k_restriction_coder, sizeof(__pyx_k_restriction_coder), 0, 0, 1, 1},
  {&__pyx_n_s_restriction_provider, __pyx_k_restriction_provider, sizeof(__pyx_k_restriction_provider), 0, 0, 1, 1},
  {&__pyx_n_s_restriction_size, __pyx_k_restriction_size, sizeof(__pyx_k_restriction_size), 0, 0, 1, 1},
  {&__pyx_n_s_restriction_tracker, __pyx_k_restriction_tracker, sizeof(__pyx_k_restriction_tracker), 0, 0, 1, 1},
  {&__pyx_n_s_restriction_tracker_param, __pyx_k_restriction_tracker_param, sizeof(__pyx_k_restriction_tracker_param), 0, 0, 1, 1},
  {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1},
  {&__pyx_n_s_results, __pyx_k_results, sizeof(__pyx_k_results), 0, 0, 1, 1},
  {&__pyx_n_s_return, __pyx_k_return, sizeof(__pyx_k_return), 0, 0, 1, 1},
  {&__pyx_n_s_root_transform_ids, __pyx_k_root_transform_ids, sizeof(__pyx_k_root_transform_ids), 0, 0, 1, 1},
  {&__pyx_n_s_round, __pyx_k_round, sizeof(__pyx_k_round), 0, 0, 1, 1},
  {&__pyx_n_s_sample_exception, __pyx_k_sample_exception, sizeof(__pyx_k_sample_exception), 0, 0, 1, 1},
  {&__pyx_n_s_scale_progress, __pyx_k_scale_progress, sizeof(__pyx_k_scale_progress), 0, 0, 1, 1},
  {&__pyx_n_s_scaled_progress, __pyx_k_scaled_progress, sizeof(__pyx_k_scaled_progress), 0, 0, 1, 1},
  {&__pyx_n_s_scoped_metrics_container, __pyx_k_scoped_metrics_container, sizeof(__pyx_k_scoped_metrics_container), 0, 0, 1, 1},
  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
  {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
  {&__pyx_n_s_set_element, __pyx_k_set_element, sizeof(__pyx_k_set_element), 0, 0, 1, 1},
  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_setup, __pyx_k_setup, sizeof(__pyx_k_setup), 0, 0, 1, 1},
  {&__pyx_n_u_setup, __pyx_k_setup, sizeof(__pyx_k_setup), 0, 1, 0, 1},
  {&__pyx_n_s_should_process_window_for_sdf, __pyx_k_should_process_window_for_sdf, sizeof(__pyx_k_should_process_window_for_sdf), 0, 0, 1, 1},
  {&__pyx_n_s_si, __pyx_k_si, sizeof(__pyx_k_si), 0, 0, 1, 1},
  {&__pyx_n_s_side_inputs, __pyx_k_side_inputs, sizeof(__pyx_k_side_inputs), 0, 0, 1, 1},
  {&__pyx_n_s_sideinputs, __pyx_k_sideinputs, sizeof(__pyx_k_sideinputs), 0, 0, 1, 1},
  {&__pyx_n_s_sig, __pyx_k_sig, sizeof(__pyx_k_sig), 0, 0, 1, 1},
  {&__pyx_n_s_signature, __pyx_k_signature, sizeof(__pyx_k_signature), 0, 0, 1, 1},
  {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
  {&__pyx_n_s_spec, __pyx_k_spec, sizeof(__pyx_k_spec), 0, 0, 1, 1},
  {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
  {&__pyx_n_u_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 1, 0, 1},
  {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
  {&__pyx_n_u_start_bundle, __pyx_k_start_bundle, sizeof(__pyx_k_start_bundle), 0, 1, 0, 1},
  {&__pyx_n_s_start_bundle_outputs, __pyx_k_start_bundle_outputs, sizeof(__pyx_k_start_bundle_outputs), 0, 0, 1, 1},
  {&__pyx_n_s_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1},
  {&__pyx_n_s_state_spec, __pyx_k_state_spec, sizeof(__pyx_k_state_spec), 0, 0, 1, 1},
  {&__pyx_n_s_staticmethod, __pyx_k_staticmethod, sizeof(__pyx_k_staticmethod), 0, 0, 1, 1},
  {&__pyx_n_s_step_annotation, __pyx_k_step_annotation, sizeof(__pyx_k_step_annotation), 0, 0, 1, 1},
  {&__pyx_n_s_step_name, __pyx_k_step_name, sizeof(__pyx_k_step_name), 0, 0, 1, 1},
  {&__pyx_n_s_stop_window_index, __pyx_k_stop_window_index, sizeof(__pyx_k_stop_window_index), 0, 0, 1, 1},
  {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
  {&__pyx_n_s_strip, __pyx_k_strip, sizeof(__pyx_k_strip), 0, 0, 1, 1},
  {&__pyx_n_s_subtransforms, __pyx_k_subtransforms, sizeof(__pyx_k_subtransforms), 0, 0, 1, 1},
  {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
  {&__pyx_n_s_supports_batches, __pyx_k_supports_batches, sizeof(__pyx_k_supports_batches), 0, 0, 1, 1},
  {&__pyx_n_s_supports_elements, __pyx_k_supports_elements, sizeof(__pyx_k_supports_elements), 0, 0, 1, 1},
  {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
  {&__pyx_n_s_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 0, 1, 1},
  {&__pyx_n_s_tag, __pyx_k_tag, sizeof(__pyx_k_tag), 0, 0, 1, 1},
  {&__pyx_kp_u_tag_2, __pyx_k_tag_2, sizeof(__pyx_k_tag_2), 0, 1, 0, 0},
  {&__pyx_n_s_tagged_receivers, __pyx_k_tagged_receivers, sizeof(__pyx_k_tagged_receivers), 0, 0, 1, 1},
  {&__pyx_n_s_tagged_with_step, __pyx_k_tagged_with_step, sizeof(__pyx_k_tagged_with_step), 0, 0, 1, 1},
  {&__pyx_n_u_tagged_with_step, __pyx_k_tagged_with_step, sizeof(__pyx_k_tagged_with_step), 0, 1, 0, 1},
  {&__pyx_n_s_tb, __pyx_k_tb, sizeof(__pyx_k_tb), 0, 0, 1, 1},
  {&__pyx_n_s_teardown, __pyx_k_teardown, sizeof(__pyx_k_teardown), 0, 0, 1, 1},
  {&__pyx_n_u_teardown, __pyx_k_teardown, sizeof(__pyx_k_teardown), 0, 1, 0, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_n_s_threading, __pyx_k_threading, sizeof(__pyx_k_threading), 0, 0, 1, 1},
  {&__pyx_n_s_threadsafe_restriction_tracker, __pyx_k_threadsafe_restriction_tracker, sizeof(__pyx_k_threadsafe_restriction_tracker), 0, 0, 1, 1},
  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
  {&__pyx_n_s_timer_spec, __pyx_k_timer_spec, sizeof(__pyx_k_timer_spec), 0, 0, 1, 1},
  {&__pyx_n_s_timestamp, __pyx_k_timestamp, sizeof(__pyx_k_timestamp), 0, 0, 1, 1},
  {&__pyx_n_s_timestamp_2, __pyx_k_timestamp_2, sizeof(__pyx_k_timestamp_2), 0, 0, 1, 1},
  {&__pyx_kp_u_timestamp_not_accessible_in_this, __pyx_k_timestamp_not_accessible_in_this, sizeof(__pyx_k_timestamp_not_accessible_in_this), 0, 1, 0, 0},
  {&__pyx_n_s_timestamps, __pyx_k_timestamps, sizeof(__pyx_k_timestamps), 0, 0, 1, 1},
  {&__pyx_n_s_to_index, __pyx_k_to_index, sizeof(__pyx_k_to_index), 0, 0, 1, 1},
  {&__pyx_n_s_total_work, __pyx_k_total_work, sizeof(__pyx_k_total_work), 0, 0, 1, 1},
  {&__pyx_n_s_traceback, __pyx_k_traceback, sizeof(__pyx_k_traceback), 0, 0, 1, 1},
  {&__pyx_n_s_transform, __pyx_k_transform, sizeof(__pyx_k_transform), 0, 0, 1, 1},
  {&__pyx_n_s_transform_id, __pyx_k_transform_id, sizeof(__pyx_k_transform_id), 0, 0, 1, 1},
  {&__pyx_n_s_transform_node, __pyx_k_transform_node, sizeof(__pyx_k_transform_node), 0, 0, 1, 1},
  {&__pyx_n_s_transform_proto, __pyx_k_transform_proto, sizeof(__pyx_k_transform_proto), 0, 0, 1, 1},
  {&__pyx_n_s_transforms, __pyx_k_transforms, sizeof(__pyx_k_transforms), 0, 0, 1, 1},
  {&__pyx_n_s_try_split, __pyx_k_try_split, sizeof(__pyx_k_try_split), 0, 0, 1, 1},
  {&__pyx_n_s_try_split_2, __pyx_k_try_split_2, sizeof(__pyx_k_try_split_2), 0, 0, 1, 1},
  {&__pyx_n_s_try_split_locals_compute_whole, __pyx_k_try_split_locals_compute_whole, sizeof(__pyx_k_try_split_locals_compute_whole), 0, 0, 1, 1},
  {&__pyx_n_s_tuple_types, __pyx_k_tuple_types, sizeof(__pyx_k_tuple_types), 0, 0, 1, 1},
  {&__pyx_kp_u_type_but_got_s, __pyx_k_type_but_got_s, sizeof(__pyx_k_type_but_got_s), 0, 1, 0, 0},
  {&__pyx_n_s_typehints, __pyx_k_typehints, sizeof(__pyx_k_typehints), 0, 0, 1, 1},
  {&__pyx_n_s_typing, __pyx_k_typing, sizeof(__pyx_k_typing), 0, 0, 1, 1},
  {&__pyx_n_u_unbounded_per_element, __pyx_k_unbounded_per_element, sizeof(__pyx_k_unbounded_per_element), 0, 1, 0, 1},
  {&__pyx_n_s_unused_value, __pyx_k_unused_value, sizeof(__pyx_k_unused_value), 0, 0, 1, 1},
  {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
  {&__pyx_n_s_urn, __pyx_k_urn, sizeof(__pyx_k_urn), 0, 0, 1, 1},
  {&__pyx_n_s_use_per_window_invoker, __pyx_k_use_per_window_invoker, sizeof(__pyx_k_use_per_window_invoker), 0, 0, 1, 1},
  {&__pyx_n_s_use_setstate, __pyx_k_use_setstate, sizeof(__pyx_k_use_setstate), 0, 0, 1, 1},
  {&__pyx_n_s_user_state_context, __pyx_k_user_state_context, sizeof(__pyx_k_user_state_context), 0, 0, 1, 1},
  {&__pyx_n_s_userstate, __pyx_k_userstate, sizeof(__pyx_k_userstate), 0, 0, 1, 1},
  {&__pyx_kp_u_uses_unsupported_DoFn_param_Ele, __pyx_k_uses_unsupported_DoFn_param_Ele, sizeof(__pyx_k_uses_unsupported_DoFn_param_Ele), 0, 1, 0, 0},
  {&__pyx_n_s_util, __pyx_k_util, sizeof(__pyx_k_util), 0, 0, 1, 1},
  {&__pyx_n_s_validate, __pyx_k_validate, sizeof(__pyx_k_validate), 0, 0, 1, 1},
  {&__pyx_n_s_validate_bundle_method, __pyx_k_validate_bundle_method, sizeof(__pyx_k_validate_bundle_method), 0, 0, 1, 1},
  {&__pyx_n_s_validate_pipeline_graph, __pyx_k_validate_pipeline_graph, sizeof(__pyx_k_validate_pipeline_graph), 0, 0, 1, 1},
  {&__pyx_n_s_validate_pipeline_graph_locals_g, __pyx_k_validate_pipeline_graph_locals_g, sizeof(__pyx_k_validate_pipeline_graph_locals_g), 0, 0, 1, 1},
  {&__pyx_n_s_validate_pipeline_graph_locals_v, __pyx_k_validate_pipeline_graph_locals_v, sizeof(__pyx_k_validate_pipeline_graph_locals_v), 0, 0, 1, 1},
  {&__pyx_n_s_validate_process, __pyx_k_validate_process, sizeof(__pyx_k_validate_process), 0, 0, 1, 1},
  {&__pyx_n_s_validate_process_batch, __pyx_k_validate_process_batch, sizeof(__pyx_k_validate_process_batch), 0, 0, 1, 1},
  {&__pyx_n_s_validate_stateful_dofn, __pyx_k_validate_stateful_dofn, sizeof(__pyx_k_validate_stateful_dofn), 0, 0, 1, 1},
  {&__pyx_n_s_validate_stateful_dofn_2, __pyx_k_validate_stateful_dofn_2, sizeof(__pyx_k_validate_stateful_dofn_2), 0, 0, 1, 1},
  {&__pyx_n_s_validate_transform, __pyx_k_validate_transform, sizeof(__pyx_k_validate_transform), 0, 0, 1, 1},
  {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
  {&__pyx_n_s_value_type, __pyx_k_value_type, sizeof(__pyx_k_value_type), 0, 0, 1, 1},
  {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
  {&__pyx_n_s_visit_transform, __pyx_k_visit_transform, sizeof(__pyx_k_visit_transform), 0, 0, 1, 1},
  {&__pyx_n_s_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1},
  {&__pyx_n_s_watermark_estimator, __pyx_k_watermark_estimator, sizeof(__pyx_k_watermark_estimator), 0, 0, 1, 1},
  {&__pyx_n_s_watermark_estimator_provider, __pyx_k_watermark_estimator_provider, sizeof(__pyx_k_watermark_estimator_provider), 0, 0, 1, 1},
  {&__pyx_n_s_watermark_estimator_state, __pyx_k_watermark_estimator_state, sizeof(__pyx_k_watermark_estimator_state), 0, 0, 1, 1},
  {&__pyx_n_s_watermark_param, __pyx_k_watermark_param, sizeof(__pyx_k_watermark_param), 0, 0, 1, 1},
  {&__pyx_kp_u_while_running_s, __pyx_k_while_running_s, sizeof(__pyx_k_while_running_s), 0, 1, 0, 0},
  {&__pyx_n_s_window, __pyx_k_window, sizeof(__pyx_k_window), 0, 0, 1, 1},
  {&__pyx_n_s_window_fn, __pyx_k_window_fn, sizeof(__pyx_k_window_fn), 0, 0, 1, 1},
  {&__pyx_n_s_window_index, __pyx_k_window_index, sizeof(__pyx_k_window_index), 0, 0, 1, 1},
  {&__pyx_n_s_window_observing, __pyx_k_window_observing, sizeof(__pyx_k_window_observing), 0, 0, 1, 1},
  {&__pyx_n_s_windowed_batch, __pyx_k_windowed_batch, sizeof(__pyx_k_windowed_batch), 0, 0, 1, 1},
  {&__pyx_n_s_windowed_input_batch, __pyx_k_windowed_input_batch, sizeof(__pyx_k_windowed_input_batch), 0, 0, 1, 1},
  {&__pyx_n_s_windowed_input_element, __pyx_k_windowed_input_element, sizeof(__pyx_k_windowed_input_element), 0, 0, 1, 1},
  {&__pyx_n_s_windowed_value, __pyx_k_windowed_value, sizeof(__pyx_k_windowed_value), 0, 0, 1, 1},
  {&__pyx_n_s_windowfn, __pyx_k_windowfn, sizeof(__pyx_k_windowfn), 0, 0, 1, 1},
  {&__pyx_n_s_windowing, __pyx_k_windowing, sizeof(__pyx_k_windowing), 0, 0, 1, 1},
  {&__pyx_n_s_windows, __pyx_k_windows, sizeof(__pyx_k_windows), 0, 0, 1, 1},
  {&__pyx_kp_u_windows_not_accessible_in_this_c, __pyx_k_windows_not_accessible_in_this_c, sizeof(__pyx_k_windows_not_accessible_in_this_c), 0, 1, 0, 0},
  {&__pyx_n_s_with_traceback, __pyx_k_with_traceback, sizeof(__pyx_k_with_traceback), 0, 0, 1, 1},
  {&__pyx_n_s_with_value, __pyx_k_with_value, sizeof(__pyx_k_with_value), 0, 0, 1, 1},
  {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1},
  {&__pyx_n_s_zip, __pyx_k_zip, sizeof(__pyx_k_zip), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 88, __pyx_L1_error)
  __pyx_builtin_property = __Pyx_GetBuiltinName(__pyx_n_s_property); if (!__pyx_builtin_property) __PYX_ERR(0, 250, __pyx_L1_error)
  __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 455, __pyx_L1_error)
  __pyx_builtin_any = __Pyx_GetBuiltinName(__pyx_n_s_any); if (!__pyx_builtin_any) __PYX_ERR(0, 655, __pyx_L1_error)
  __pyx_builtin_BaseException = __Pyx_GetBuiltinName(__pyx_n_s_BaseException); if (!__pyx_builtin_BaseException) __PYX_ERR(0, 1441, __pyx_L1_error)
  __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 129, __pyx_L1_error)
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 155, __pyx_L1_error)
  __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 183, __pyx_L1_error)
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 501, __pyx_L1_error)
  __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 624, __pyx_L1_error)
  __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(0, 698, __pyx_L1_error)
  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 717, __pyx_L1_error)
  __pyx_builtin_round = __Pyx_GetBuiltinName(__pyx_n_s_round); if (!__pyx_builtin_round) __PYX_ERR(0, 1193, __pyx_L1_error)
  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 1537, __pyx_L1_error)
  __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 1841, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "apache_beam/runners/common.py":501
 *     else:
 *       if context is None:
 *         raise TypeError("Must provide context when not using SimpleInvoker")             # <<<<<<<<<<<<<<
 *       return PerWindowInvoker(
 *           output_handler,
 */
  __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_u_Must_provide_context_when_not_us); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);

  /* "apache_beam/runners/common.py":665
 *   # 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_tuple__55 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__55);
  __Pyx_GIVEREF(__pyx_tuple__55);

  /* "apache_beam/runners/common.py":666
 *   # input_args and is a placeholder for side-inputs.
 *   class ArgPlaceholder(object):
 *     def __init__(self, placeholder):             # <<<<<<<<<<<<<<
 *       self.placeholder = placeholder
 * 
 */
  __pyx_tuple__56 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_placeholder); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__56);
  __Pyx_GIVEREF(__pyx_tuple__56);
  __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_init, 666, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(0, 666, __pyx_L1_error)

  /* "apache_beam/runners/common.py":811
 *             windowed_value.value)
 * 
 *       with self.splitting_lock:             # <<<<<<<<<<<<<<
 *         self.current_windowed_value = windowed_value
 *         self.restriction = restriction
 */
  __pyx_tuple__59 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__59);
  __Pyx_GIVEREF(__pyx_tuple__59);

  /* "apache_beam/runners/common.py":906
 *         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_tuple__62 = PyTuple_Pack(1, __pyx_kp_u_DoFn_is_splittable_but_DoFn_does); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__62);
  __Pyx_GIVEREF(__pyx_tuple__62);

  /* "apache_beam/runners/common.py":1064
 *         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_tuple__66 = PyTuple_Pack(1, __pyx_kp_u_https_github_com_apache_beam_iss); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__66);
  __Pyx_GIVEREF(__pyx_tuple__66);

  /* "apache_beam/runners/common.py":1136
 *       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_tuple__68 = PyTuple_Pack(6, __pyx_n_s_to_index, __pyx_n_s_from_index, __pyx_n_s_restriction_size, __pyx_n_s_value, __pyx_n_s_primary_restriction, __pyx_n_s_residual_restriction); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 1136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__68);
  __Pyx_GIVEREF(__pyx_tuple__68);
  __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_compute_whole_window_split, 1136, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(0, 1136, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1394
 *       # 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_tuple__75 = PyTuple_Pack(1, __pyx_kp_u_per_element_output_count); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 1394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__75);
  __Pyx_GIVEREF(__pyx_tuple__75);

  /* "apache_beam/runners/common.py":1417
 * 
 *     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_tuple__76 = PyTuple_Pack(1, __pyx_kp_u_Requested_execution_of_a_statefu); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 1417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__76);
  __Pyx_GIVEREF(__pyx_tuple__76);

  /* "apache_beam/runners/common.py":1532
 *       # 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_slice__92 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__92)) __PYX_ERR(0, 1532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__92);
  __Pyx_GIVEREF(__pyx_slice__92);

  /* "apache_beam/runners/common.py":1801
 *   def timestamp(self):
 *     if self._timestamp is self.NO_VALUE:
 *       raise ValueError('No timestamp in this context.')             # <<<<<<<<<<<<<<
 *     else:
 *       return self._timestamp
 */
  __pyx_tuple__107 = PyTuple_Pack(1, __pyx_kp_u_No_timestamp_in_this_context); if (unlikely(!__pyx_tuple__107)) __PYX_ERR(0, 1801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__107);
  __Pyx_GIVEREF(__pyx_tuple__107);

  /* "apache_beam/runners/common.py":1807
 *   @property
 *   def existing_windows(self):
 *     raise ValueError('No existing_windows in this context.')             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_tuple__109 = PyTuple_Pack(1, __pyx_kp_u_No_existing_windows_in_this_cont); if (unlikely(!__pyx_tuple__109)) __PYX_ERR(0, 1807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__109);
  __Pyx_GIVEREF(__pyx_tuple__109);

  /* "apache_beam/runners/common.py":1841
 *   def element(self):
 *     if self.windowed_value is None:
 *       raise AttributeError('element not accessible in this context')             # <<<<<<<<<<<<<<
 *     else:
 *       return self.windowed_value.value
 */
  __pyx_tuple__114 = PyTuple_Pack(1, __pyx_kp_u_element_not_accessible_in_this_c); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(0, 1841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__114);
  __Pyx_GIVEREF(__pyx_tuple__114);

  /* "apache_beam/runners/common.py":1848
 *   def timestamp(self):
 *     if self.windowed_value is None:
 *       raise AttributeError('timestamp not accessible in this context')             # <<<<<<<<<<<<<<
 *     else:
 *       return self.windowed_value.timestamp
 */
  __pyx_tuple__115 = PyTuple_Pack(1, __pyx_kp_u_timestamp_not_accessible_in_this); if (unlikely(!__pyx_tuple__115)) __PYX_ERR(0, 1848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__115);
  __Pyx_GIVEREF(__pyx_tuple__115);

  /* "apache_beam/runners/common.py":1855
 *   def windows(self):
 *     if self.windowed_value is None:
 *       raise AttributeError('windows not accessible in this context')             # <<<<<<<<<<<<<<
 *     else:
 *       return self.windowed_value.windows
 */
  __pyx_tuple__116 = PyTuple_Pack(1, __pyx_kp_u_windows_not_accessible_in_this_c); if (unlikely(!__pyx_tuple__116)) __PYX_ERR(0, 1855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__116);
  __Pyx_GIVEREF(__pyx_tuple__116);

  /* "apache_beam/runners/common.py":1873
 *     we could directly replace the coder instead of mutating the element type.
 *     """
 *     def __init__(self, deterministic_key_coders=True):             # <<<<<<<<<<<<<<
 *       self.deterministic_key_coders = deterministic_key_coders
 * 
 */
  __pyx_tuple__120 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_deterministic_key_coders); if (unlikely(!__pyx_tuple__120)) __PYX_ERR(0, 1873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__120);
  __Pyx_GIVEREF(__pyx_tuple__120);
  __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__120, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_init, 1873, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) __PYX_ERR(0, 1873, __pyx_L1_error)
  __pyx_tuple__122 = PyTuple_Pack(1, ((PyObject *)Py_True)); if (unlikely(!__pyx_tuple__122)) __PYX_ERR(0, 1873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__122);
  __Pyx_GIVEREF(__pyx_tuple__122);

  /* "apache_beam/runners/common.py":1876
 *       self.deterministic_key_coders = deterministic_key_coders
 * 
 *     def enter_composite_transform(self, transform_node):             # <<<<<<<<<<<<<<
 *       self.visit_transform(transform_node)
 * 
 */
  __pyx_tuple__123 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_transform_node); if (unlikely(!__pyx_tuple__123)) __PYX_ERR(0, 1876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__123);
  __Pyx_GIVEREF(__pyx_tuple__123);
  __pyx_codeobj__124 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__123, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_enter_composite_transform, 1876, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__124)) __PYX_ERR(0, 1876, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1879
 *       self.visit_transform(transform_node)
 * 
 *     def visit_transform(self, transform_node):             # <<<<<<<<<<<<<<
 *       if isinstance(transform_node.transform, GroupByKey):
 *         pcoll = transform_node.inputs[0]
 */
  __pyx_tuple__125 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_transform_node, __pyx_n_s_pcoll, __pyx_n_s_key_type, __pyx_n_s_value_type, __pyx_n_s_key); if (unlikely(!__pyx_tuple__125)) __PYX_ERR(0, 1879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__125);
  __Pyx_GIVEREF(__pyx_tuple__125);
  __pyx_codeobj__126 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__125, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_visit_transform, 1879, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__126)) __PYX_ERR(0, 1879, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1900
 *   """Ensures this is a correctly constructed Beam pipeline.
 *   """
 *   def get_coder(pcoll_id):             # <<<<<<<<<<<<<<
 *     return pipeline_proto.components.coders[
 *         pipeline_proto.components.pcollections[pcoll_id].coder_id]
 */
  __pyx_tuple__129 = PyTuple_Pack(1, __pyx_n_s_pcoll_id); if (unlikely(!__pyx_tuple__129)) __PYX_ERR(0, 1900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__129);
  __Pyx_GIVEREF(__pyx_tuple__129);
  __pyx_codeobj__130 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__129, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_get_coder, 1900, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__130)) __PYX_ERR(0, 1900, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1904
 *         pipeline_proto.components.pcollections[pcoll_id].coder_id]
 * 
 *   def validate_transform(transform_id):             # <<<<<<<<<<<<<<
 *     transform_proto = pipeline_proto.components.transforms[transform_id]
 * 
 */
  __pyx_tuple__131 = PyTuple_Pack(6, __pyx_n_s_transform_id, __pyx_n_s_transform_proto, __pyx_n_s_input_coder, __pyx_n_s_output_coder, __pyx_n_s_output_values_coder, __pyx_n_s_t); if (unlikely(!__pyx_tuple__131)) __PYX_ERR(0, 1904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__131);
  __Pyx_GIVEREF(__pyx_tuple__131);
  __pyx_codeobj__132 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__131, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_validate_transform, 1904, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__132)) __PYX_ERR(0, 1904, __pyx_L1_error)

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 */
  __pyx_tuple__134 = PyTuple_Pack(3, __pyx_int_222419149, __pyx_int_238750788, __pyx_int_228825662); if (unlikely(!__pyx_tuple__134)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__134);
  __Pyx_GIVEREF(__pyx_tuple__134);
  __pyx_tuple__136 = PyTuple_Pack(3, __pyx_int_248758726, __pyx_int_77316345, __pyx_int_210439282); if (unlikely(!__pyx_tuple__136)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__136);
  __Pyx_GIVEREF(__pyx_tuple__136);
  __pyx_tuple__138 = PyTuple_Pack(3, __pyx_int_142278286, __pyx_int_146279351, __pyx_int_243009704); if (unlikely(!__pyx_tuple__138)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__138);
  __Pyx_GIVEREF(__pyx_tuple__138);
  __pyx_tuple__140 = PyTuple_Pack(3, __pyx_int_38742981, __pyx_int_10199973, __pyx_int_137922938); if (unlikely(!__pyx_tuple__140)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__140);
  __Pyx_GIVEREF(__pyx_tuple__140);
  __pyx_tuple__142 = PyTuple_Pack(3, __pyx_int_129859458, __pyx_int_22542117, __pyx_int_62474201); if (unlikely(!__pyx_tuple__142)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__142);
  __Pyx_GIVEREF(__pyx_tuple__142);
  __pyx_tuple__144 = PyTuple_Pack(3, __pyx_int_192761774, __pyx_int_217907439, __pyx_int_257113325); if (unlikely(!__pyx_tuple__144)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__144);
  __Pyx_GIVEREF(__pyx_tuple__144);
  __pyx_tuple__146 = PyTuple_Pack(3, __pyx_int_84108186, __pyx_int_24629412, __pyx_int_145085662); if (unlikely(!__pyx_tuple__146)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__146);
  __Pyx_GIVEREF(__pyx_tuple__146);
  __pyx_tuple__149 = PyTuple_Pack(3, __pyx_int_211894287, __pyx_int_173793943, __pyx_int_74069314); if (unlikely(!__pyx_tuple__149)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__149);
  __Pyx_GIVEREF(__pyx_tuple__149);
  __pyx_tuple__151 = PyTuple_Pack(3, __pyx_int_28652999, __pyx_int_61400015, __pyx_int_195284539); if (unlikely(!__pyx_tuple__151)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__151);
  __Pyx_GIVEREF(__pyx_tuple__151);

  /* "apache_beam/runners/common.py":83
 * 
 * ENCODED_IMPULSE_VALUE = IMPULSE_VALUE_CODER_IMPL.encode_nested(
 *     GlobalWindows.windowed_value(b''))             # <<<<<<<<<<<<<<
 * 
 * _LOGGER = logging.getLogger(__name__)
 */
  __pyx_tuple__152 = PyTuple_Pack(1, __pyx_kp_b__111); if (unlikely(!__pyx_tuple__152)) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__152);
  __Pyx_GIVEREF(__pyx_tuple__152);

  /* "apache_beam/runners/common.py":88
 * 
 * 
 * class NameContext(object):             # <<<<<<<<<<<<<<
 *   """Holds the name information for a step."""
 *   def __init__(self, step_name, transform_id=None):
 */
  __pyx_tuple__153 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__153)) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__153);
  __Pyx_GIVEREF(__pyx_tuple__153);

  /* "apache_beam/runners/common.py":90
 * class NameContext(object):
 *   """Holds the name information for a step."""
 *   def __init__(self, step_name, transform_id=None):             # <<<<<<<<<<<<<<
 *     # type: (str, Optional[str]) -> None
 * 
 */
  __pyx_tuple__154 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_step_name, __pyx_n_s_transform_id); if (unlikely(!__pyx_tuple__154)) __PYX_ERR(0, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__154);
  __Pyx_GIVEREF(__pyx_tuple__154);
  __pyx_codeobj_ = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__154, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_init, 90, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj_)) __PYX_ERR(0, 90, __pyx_L1_error)
  __pyx_tuple__155 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__155)) __PYX_ERR(0, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__155);
  __Pyx_GIVEREF(__pyx_tuple__155);

  /* "apache_beam/runners/common.py":101
 *     self.transform_id = transform_id
 * 
 *   def __eq__(self, other):             # <<<<<<<<<<<<<<
 *     return self.step_name == other.step_name
 * 
 */
  __pyx_tuple__156 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_other); if (unlikely(!__pyx_tuple__156)) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__156);
  __Pyx_GIVEREF(__pyx_tuple__156);
  __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__156, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_eq, 101, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 101, __pyx_L1_error)

  /* "apache_beam/runners/common.py":104
 *     return self.step_name == other.step_name
 * 
 *   def __repr__(self):             # <<<<<<<<<<<<<<
 *     return 'NameContext(%s)' % self.__dict__
 * 
 */
  __pyx_tuple__157 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__157)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__157);
  __Pyx_GIVEREF(__pyx_tuple__157);
  __pyx_codeobj__3 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__157, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_repr, 104, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__3)) __PYX_ERR(0, 104, __pyx_L1_error)

  /* "apache_beam/runners/common.py":107
 *     return 'NameContext(%s)' % self.__dict__
 * 
 *   def __hash__(self):             # <<<<<<<<<<<<<<
 *     return hash(self.step_name)
 * 
 */
  __pyx_tuple__158 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__158)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__158);
  __Pyx_GIVEREF(__pyx_tuple__158);
  __pyx_codeobj__4 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__158, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_hash, 107, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__4)) __PYX_ERR(0, 107, __pyx_L1_error)

  /* "apache_beam/runners/common.py":110
 *     return hash(self.step_name)
 * 
 *   def metrics_name(self):             # <<<<<<<<<<<<<<
 *     """Returns the step name used for metrics reporting."""
 *     return self.step_name
 */
  __pyx_tuple__159 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__159)) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__159);
  __Pyx_GIVEREF(__pyx_tuple__159);
  __pyx_codeobj__5 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__159, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_metrics_name, 110, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__5)) __PYX_ERR(0, 110, __pyx_L1_error)

  /* "apache_beam/runners/common.py":114
 *     return self.step_name
 * 
 *   def logging_name(self):             # <<<<<<<<<<<<<<
 *     """Returns the step name used for logging."""
 *     return self.step_name
 */
  __pyx_tuple__160 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__160)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__160);
  __Pyx_GIVEREF(__pyx_tuple__160);
  __pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__160, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_logging_name, 114, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(0, 114, __pyx_L1_error)

  /* "apache_beam/runners/common.py":127
 *   sdk and worker harnesses.
 *   """
 *   def receive(self, windowed_value):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     raise NotImplementedError
 */
  __pyx_tuple__161 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_windowed_value); if (unlikely(!__pyx_tuple__161)) __PYX_ERR(0, 127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__161);
  __Pyx_GIVEREF(__pyx_tuple__161);
  __pyx_codeobj__7 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__161, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_receive, 127, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__7)) __PYX_ERR(0, 127, __pyx_L1_error)

  /* "apache_beam/runners/common.py":131
 *     raise NotImplementedError
 * 
 *   def receive_batch(self, windowed_batch):             # <<<<<<<<<<<<<<
 *     # type: (WindowedBatch) -> None
 *     raise NotImplementedError
 */
  __pyx_tuple__162 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_windowed_batch); if (unlikely(!__pyx_tuple__162)) __PYX_ERR(0, 131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__162);
  __Pyx_GIVEREF(__pyx_tuple__162);
  __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__162, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_receive_batch, 131, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 131, __pyx_L1_error)

  /* "apache_beam/runners/common.py":135
 *     raise NotImplementedError
 * 
 *   def flush(self):             # <<<<<<<<<<<<<<
 *     raise NotImplementedError
 * 
 */
  __pyx_tuple__163 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__163)) __PYX_ERR(0, 135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__163);
  __Pyx_GIVEREF(__pyx_tuple__163);
  __pyx_codeobj__9 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__163, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_flush, 135, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__9)) __PYX_ERR(0, 135, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__164 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__164)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__164);
  __Pyx_GIVEREF(__pyx_tuple__164);
  __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__164, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Receiver, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Receiver__set_state(self, __pyx_state)
 */
  __pyx_tuple__165 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__165)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__165);
  __Pyx_GIVEREF(__pyx_tuple__165);
  __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__165, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/runners/common.py":211
 *       self.watermark_estimator_provider = NoOpWatermarkEstimatorProvider()
 * 
 *   def invoke_timer_callback(             # <<<<<<<<<<<<<<
 *       self,
 *       user_state_context,
 */
  __pyx_tuple__166 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_user_state_context, __pyx_n_s_key, __pyx_n_s_window, __pyx_n_s_timestamp, __pyx_n_s_pane_info, __pyx_n_s_dynamic_timer_tag, __pyx_n_s_kwargs, __pyx_n_s_kw, __pyx_n_s_state_spec, __pyx_n_s_timer_spec); if (unlikely(!__pyx_tuple__166)) __PYX_ERR(0, 211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__166);
  __Pyx_GIVEREF(__pyx_tuple__166);
  __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(7, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__166, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_invoke_timer_callback, 211, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 211, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__167 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__167)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__167);
  __Pyx_GIVEREF(__pyx_tuple__167);
  __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__167, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_MethodWrapper, (type(self), 0xed3c1c6, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_MethodWrapper__set_state(self, __pyx_state)
 */
  __pyx_tuple__168 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__168)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__168);
  __Pyx_GIVEREF(__pyx_tuple__168);
  __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__168, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/runners/common.py":251
 * 
 *   @property
 *   def supports_batches(self) -> bool:             # <<<<<<<<<<<<<<
 *     return self in (self.BATCH_REQUIRED, self.DO_NOT_CARE)
 * 
 */
  __pyx_tuple__169 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__169)) __PYX_ERR(0, 251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__169);
  __Pyx_GIVEREF(__pyx_tuple__169);
  __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__169, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_supports_batches, 251, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) __PYX_ERR(0, 251, __pyx_L1_error)

  /* "apache_beam/runners/common.py":255
 * 
 *   @property
 *   def supports_elements(self) -> bool:             # <<<<<<<<<<<<<<
 *     return self in (self.BATCH_FORBIDDEN, self.DO_NOT_CARE)
 * 
 */
  __pyx_tuple__170 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__170)) __PYX_ERR(0, 255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__170);
  __Pyx_GIVEREF(__pyx_tuple__170);
  __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__170, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_supports_elements, 255, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(0, 255, __pyx_L1_error)

  /* "apache_beam/runners/common.py":259
 * 
 *   @property
 *   def requires_batches(self) -> bool:             # <<<<<<<<<<<<<<
 *     return self == self.BATCH_REQUIRED
 * 
 */
  __pyx_tuple__171 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__171)) __PYX_ERR(0, 259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__171);
  __Pyx_GIVEREF(__pyx_tuple__171);
  __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__171, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_requires_batches, 259, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) __PYX_ERR(0, 259, __pyx_L1_error)

  /* "apache_beam/runners/common.py":315
 *         self.timer_methods[timer_spec] = MethodWrapper(do_fn, method.__name__)
 * 
 *   def get_restriction_provider(self):             # <<<<<<<<<<<<<<
 *     # type: () -> RestrictionProvider
 *     return self.process_method.restriction_provider
 */
  __pyx_tuple__172 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__172)) __PYX_ERR(0, 315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__172);
  __Pyx_GIVEREF(__pyx_tuple__172);
  __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__172, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_get_restriction_provider, 315, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(0, 315, __pyx_L1_error)

  /* "apache_beam/runners/common.py":319
 *     return self.process_method.restriction_provider
 * 
 *   def get_watermark_estimator_provider(self):             # <<<<<<<<<<<<<<
 *     # type: () -> WatermarkEstimatorProvider
 *     return self.process_method.watermark_estimator_provider
 */
  __pyx_tuple__173 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__173)) __PYX_ERR(0, 319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__173);
  __Pyx_GIVEREF(__pyx_tuple__173);
  __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__173, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_get_watermark_estimator_provider, 319, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(0, 319, __pyx_L1_error)

  /* "apache_beam/runners/common.py":323
 *     return self.process_method.watermark_estimator_provider
 * 
 *   def is_unbounded_per_element(self):             # <<<<<<<<<<<<<<
 *     return self.process_method.unbounded_per_element
 * 
 */
  __pyx_tuple__174 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__174)) __PYX_ERR(0, 323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__174);
  __Pyx_GIVEREF(__pyx_tuple__174);
  __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__174, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_is_unbounded_per_element, 323, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 323, __pyx_L1_error)

  /* "apache_beam/runners/common.py":326
 *     return self.process_method.unbounded_per_element
 * 
 *   def _validate(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     self._validate_process()
 */
  __pyx_tuple__175 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__175)) __PYX_ERR(0, 326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__175);
  __Pyx_GIVEREF(__pyx_tuple__175);
  __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__175, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_validate, 326, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(0, 326, __pyx_L1_error)

  /* "apache_beam/runners/common.py":334
 *     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_tuple__176 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_method, __pyx_n_s_param_ids, __pyx_n_s_d); if (unlikely(!__pyx_tuple__176)) __PYX_ERR(0, 334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__176);
  __Pyx_GIVEREF(__pyx_tuple__176);
  __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__176, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_check_duplicate_dofn_params, 334, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 334, __pyx_L1_error)

  /* "apache_beam/runners/common.py":343
 *           (self.do_fn, method.method_name, param_ids))
 * 
 *   def _validate_process(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 * 
 */
  __pyx_tuple__177 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__177)) __PYX_ERR(0, 343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__177);
  __Pyx_GIVEREF(__pyx_tuple__177);
  __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__177, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_validate_process, 343, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 343, __pyx_L1_error)

  /* "apache_beam/runners/common.py":350
 *     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_tuple__178 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_d); if (unlikely(!__pyx_tuple__178)) __PYX_ERR(0, 350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__178);
  __Pyx_GIVEREF(__pyx_tuple__178);
  __pyx_codeobj__25 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_validate_process_batch, 350, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__25)) __PYX_ERR(0, 350, __pyx_L1_error)

  /* "apache_beam/runners/common.py":379
 *             f"method parameter {d}")
 * 
 *   def _validate_bundle_method(self, method_wrapper):             # <<<<<<<<<<<<<<
 *     """Validate that none of the DoFnParameters are used in the function
 *     """
 */
  __pyx_tuple__179 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_method_wrapper, __pyx_n_s_param); if (unlikely(!__pyx_tuple__179)) __PYX_ERR(0, 379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__179);
  __Pyx_GIVEREF(__pyx_tuple__179);
  __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__179, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_validate_bundle_method, 379, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 379, __pyx_L1_error)

  /* "apache_beam/runners/common.py":388
 *             (param, method_wrapper))
 * 
 *   def _validate_stateful_dofn(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     userstate.validate_stateful_dofn(self.do_fn)
 */
  __pyx_tuple__180 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__180)) __PYX_ERR(0, 388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__180);
  __Pyx_GIVEREF(__pyx_tuple__180);
  __pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__180, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_validate_stateful_dofn, 388, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__27)) __PYX_ERR(0, 388, __pyx_L1_error)

  /* "apache_beam/runners/common.py":392
 *     userstate.validate_stateful_dofn(self.do_fn)
 * 
 *   def is_splittable_dofn(self):             # <<<<<<<<<<<<<<
 *     # type: () -> bool
 *     return self.get_restriction_provider() is not None
 */
  __pyx_tuple__181 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__181)) __PYX_ERR(0, 392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__181);
  __Pyx_GIVEREF(__pyx_tuple__181);
  __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__181, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_is_splittable_dofn, 392, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 392, __pyx_L1_error)

  /* "apache_beam/runners/common.py":396
 *     return self.get_restriction_provider() is not None
 * 
 *   def get_restriction_coder(self):             # <<<<<<<<<<<<<<
 *     # type: () -> Optional[TupleCoder]
 * 
 */
  __pyx_tuple__182 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__182)) __PYX_ERR(0, 396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__182);
  __Pyx_GIVEREF(__pyx_tuple__182);
  __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__182, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_get_restriction_coder, 396, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 396, __pyx_L1_error)

  /* "apache_beam/runners/common.py":408
 *       return None
 * 
 *   def is_stateful_dofn(self):             # <<<<<<<<<<<<<<
 *     # type: () -> bool
 *     return self._is_stateful_dofn
 */
  __pyx_tuple__183 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__183)) __PYX_ERR(0, 408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__183);
  __Pyx_GIVEREF(__pyx_tuple__183);
  __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__183, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_is_stateful_dofn, 408, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 408, __pyx_L1_error)

  /* "apache_beam/runners/common.py":412
 *     return self._is_stateful_dofn
 * 
 *   def has_timers(self):             # <<<<<<<<<<<<<<
 *     # type: () -> bool
 *     _, all_timer_specs = userstate.get_dofn_specs(self.do_fn)
 */
  __pyx_tuple__185 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s__184, __pyx_n_s_all_timer_specs); if (unlikely(!__pyx_tuple__185)) __PYX_ERR(0, 412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__185);
  __Pyx_GIVEREF(__pyx_tuple__185);
  __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__185, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_has_timers, 412, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(0, 412, __pyx_L1_error)

  /* "apache_beam/runners/common.py":417
 *     return bool(all_timer_specs)
 * 
 *   def has_bundle_finalization(self):             # <<<<<<<<<<<<<<
 *     for sig in (self.start_bundle_method,
 *                 self.process_method,
 */
  __pyx_tuple__186 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_sig, __pyx_n_s_d); if (unlikely(!__pyx_tuple__186)) __PYX_ERR(0, 417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__186);
  __Pyx_GIVEREF(__pyx_tuple__186);
  __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__186, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_has_bundle_finalization, 417, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(0, 417, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__187 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__187)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__187);
  __Pyx_GIVEREF(__pyx_tuple__187);
  __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__187, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DoFnSignature, (type(self), 0x87afe8e, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DoFnSignature__set_state(self, __pyx_state)
 */
  __pyx_tuple__188 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__188)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__188);
  __Pyx_GIVEREF(__pyx_tuple__188);
  __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__188, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/runners/common.py":456
 * 
 *   @staticmethod
 *   def create_invoker(             # <<<<<<<<<<<<<<
 *       signature,  # type: DoFnSignature
 *       output_handler,  # type: OutputHandler
 */
  __pyx_tuple__189 = PyTuple_Pack(10, __pyx_n_s_signature, __pyx_n_s_output_handler, __pyx_n_s_context, __pyx_n_s_side_inputs, __pyx_n_s_input_args, __pyx_n_s_input_kwargs, __pyx_n_s_process_invocation, __pyx_n_s_user_state_context, __pyx_n_s_bundle_finalizer_param, __pyx_n_s_use_per_window_invoker); if (unlikely(!__pyx_tuple__189)) __PYX_ERR(0, 456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__189);
  __Pyx_GIVEREF(__pyx_tuple__189);
  __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(9, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__189, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_create_invoker, 456, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 456, __pyx_L1_error)

  /* "apache_beam/runners/common.py":512
 *           bundle_finalizer_param)
 * 
 *   def invoke_process(self,             # <<<<<<<<<<<<<<
 *                      windowed_value,  # type: WindowedValue
 *                      restriction=None,
 */
  __pyx_tuple__190 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_windowed_value, __pyx_n_s_restriction, __pyx_n_s_watermark_estimator_state, __pyx_n_s_additional_args, __pyx_n_s_additional_kwargs); if (unlikely(!__pyx_tuple__190)) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__190);
  __Pyx_GIVEREF(__pyx_tuple__190);
  __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__190, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_invoke_process, 512, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 512, __pyx_L1_error)

  /* "apache_beam/runners/common.py":539
 *     raise NotImplementedError
 * 
 *   def invoke_process_batch(self,             # <<<<<<<<<<<<<<
 *                      windowed_batch,  # type: WindowedBatch
 *                      additional_args=None,
 */
  __pyx_tuple__191 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_windowed_batch, __pyx_n_s_additional_args, __pyx_n_s_additional_kwargs); if (unlikely(!__pyx_tuple__191)) __PYX_ERR(0, 539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__191);
  __Pyx_GIVEREF(__pyx_tuple__191);
  __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__191, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_invoke_process_batch, 539, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 539, __pyx_L1_error)

  /* "apache_beam/runners/common.py":559
 *     raise NotImplementedError
 * 
 *   def invoke_setup(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 * 
 */
  __pyx_tuple__192 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__192)) __PYX_ERR(0, 559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__192);
  __Pyx_GIVEREF(__pyx_tuple__192);
  __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__192, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_invoke_setup, 559, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 559, __pyx_L1_error)

  /* "apache_beam/runners/common.py":566
 *     self.signature.setup_lifecycle_method.method_value()
 * 
 *   def invoke_start_bundle(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 * 
 */
  __pyx_tuple__193 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__193)) __PYX_ERR(0, 566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__193);
  __Pyx_GIVEREF(__pyx_tuple__193);
  __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__193, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_invoke_start_bundle, 566, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 566, __pyx_L1_error)

  /* "apache_beam/runners/common.py":574
 *         self.signature.start_bundle_method.method_value())
 * 
 *   def invoke_finish_bundle(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 * 
 */
  __pyx_tuple__194 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__194)) __PYX_ERR(0, 574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__194);
  __Pyx_GIVEREF(__pyx_tuple__194);
  __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__194, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_invoke_finish_bundle, 574, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 574, __pyx_L1_error)

  /* "apache_beam/runners/common.py":582
 *         self.signature.finish_bundle_method.method_value())
 * 
 *   def invoke_teardown(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 * 
 */
  __pyx_tuple__195 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__195)) __PYX_ERR(0, 582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__195);
  __Pyx_GIVEREF(__pyx_tuple__195);
  __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__195, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_invoke_teardown, 582, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 582, __pyx_L1_error)

  /* "apache_beam/runners/common.py":589
 *     self.signature.teardown_lifecycle_method.method_value()
 * 
 *   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_tuple__196 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_timer_spec, __pyx_n_s_key, __pyx_n_s_window, __pyx_n_s_timestamp, __pyx_n_s_pane_info, __pyx_n_s_dynamic_timer_tag); if (unlikely(!__pyx_tuple__196)) __PYX_ERR(0, 589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__196);
  __Pyx_GIVEREF(__pyx_tuple__196);
  __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(7, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__196, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_invoke_user_timer, 589, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 589, __pyx_L1_error)

  /* "apache_beam/runners/common.py":602
 *             dynamic_timer_tag))
 * 
 *   def invoke_create_watermark_estimator(self, estimator_state):             # <<<<<<<<<<<<<<
 *     return self.signature.create_watermark_estimator_method.method_value(
 *         estimator_state)
 */
  __pyx_tuple__197 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_estimator_state); if (unlikely(!__pyx_tuple__197)) __PYX_ERR(0, 602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__197);
  __Pyx_GIVEREF(__pyx_tuple__197);
  __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__197, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_invoke_create_watermark_estimato, 602, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 602, __pyx_L1_error)

  /* "apache_beam/runners/common.py":606
 *         estimator_state)
 * 
 *   def invoke_split(self, element, restriction):             # <<<<<<<<<<<<<<
 *     return self.signature.split_method.method_value(element, restriction)
 * 
 */
  __pyx_tuple__198 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_element, __pyx_n_s_restriction); if (unlikely(!__pyx_tuple__198)) __PYX_ERR(0, 606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__198);
  __Pyx_GIVEREF(__pyx_tuple__198);
  __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__198, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_invoke_split, 606, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 606, __pyx_L1_error)

  /* "apache_beam/runners/common.py":609
 *     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_tuple__199 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_element); if (unlikely(!__pyx_tuple__199)) __PYX_ERR(0, 609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__199);
  __Pyx_GIVEREF(__pyx_tuple__199);
  __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__199, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_invoke_initial_restriction, 609, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 609, __pyx_L1_error)

  /* "apache_beam/runners/common.py":612
 *     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_tuple__200 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_restriction); if (unlikely(!__pyx_tuple__200)) __PYX_ERR(0, 612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__200);
  __Pyx_GIVEREF(__pyx_tuple__200);
  __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__200, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_invoke_create_tracker, 612, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(0, 612, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__201 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__201)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__201);
  __Pyx_GIVEREF(__pyx_tuple__201);
  __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__201, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DoFnInvoker, (type(self), 0x24f2bc5, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DoFnInvoker__set_state(self, __pyx_state)
 */
  __pyx_tuple__202 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__202)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__202);
  __Pyx_GIVEREF(__pyx_tuple__202);
  __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__202, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/runners/common.py":628
 *     self.process_batch_method = signature.process_batch_method.method_value
 * 
 *   def invoke_process(self,             # <<<<<<<<<<<<<<
 *                      windowed_value,  # type: WindowedValue
 *                      restriction=None,
 */
  __pyx_tuple__203 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_windowed_value, __pyx_n_s_restriction, __pyx_n_s_watermark_estimator_state, __pyx_n_s_additional_args, __pyx_n_s_additional_kwargs); if (unlikely(!__pyx_tuple__203)) __PYX_ERR(0, 628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__203);
  __Pyx_GIVEREF(__pyx_tuple__203);
  __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__203, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_invoke_process, 628, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(0, 628, __pyx_L1_error)

  /* "apache_beam/runners/common.py":640
 *     return []
 * 
 *   def invoke_process_batch(self,             # <<<<<<<<<<<<<<
 *                      windowed_batch,  # type: WindowedBatch
 *                      restriction=None,
 */
  __pyx_tuple__204 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_windowed_batch, __pyx_n_s_restriction, __pyx_n_s_watermark_estimator_state, __pyx_n_s_additional_args, __pyx_n_s_additional_kwargs); if (unlikely(!__pyx_tuple__204)) __PYX_ERR(0, 640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__204);
  __Pyx_GIVEREF(__pyx_tuple__204);
  __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__204, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_invoke_process_batch, 640, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(0, 640, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__205 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__205)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__205);
  __Pyx_GIVEREF(__pyx_tuple__205);
  __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__205, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_SimpleInvoker, (type(self), 0x7bd7f82, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_SimpleInvoker__set_state(self, __pyx_state)
 */
  __pyx_tuple__206 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__206)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__206);
  __Pyx_GIVEREF(__pyx_tuple__206);
  __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__206, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/runners/common.py":652
 * 
 * 
 * def _get_arg_placeholders(             # <<<<<<<<<<<<<<
 *     method: MethodWrapper,
 *     input_args: Optional[List[Any]],
 */
  __pyx_tuple__207 = PyTuple_Pack(16, __pyx_n_s_method, __pyx_n_s_input_args, __pyx_n_s_input_kwargs, __pyx_n_s_arg_names, __pyx_n_s_default_arg_values, __pyx_n_s_ArgPlaceholder, __pyx_n_s_args_to_pick, __pyx_n_s_args_with_placeholders, __pyx_n_s_remaining_args_iter, __pyx_n_s_a, __pyx_n_s_d, __pyx_n_s_placeholders, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_i, __pyx_n_s_x); if (unlikely(!__pyx_tuple__207)) __PYX_ERR(0, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__207);
  __Pyx_GIVEREF(__pyx_tuple__207);
  __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(3, 0, 16, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__207, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_get_arg_placeholders, 652, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 652, __pyx_L1_error)

  /* "apache_beam/runners/common.py":783
 *             signature.process_batch_method, input_args, input_kwargs)
 * 
 *   def invoke_process(self,             # <<<<<<<<<<<<<<
 *                      windowed_value,  # type: WindowedValue
 *                      restriction=None,
 */
  __pyx_tuple__208 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_windowed_value, __pyx_n_s_restriction, __pyx_n_s_watermark_estimator_state, __pyx_n_s_additional_args, __pyx_n_s_additional_kwargs); if (unlikely(!__pyx_tuple__208)) __PYX_ERR(0, 783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__208);
  __Pyx_GIVEREF(__pyx_tuple__208);
  __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__208, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_invoke_process, 783, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 783, __pyx_L1_error)

  /* "apache_beam/runners/common.py":855
 *     return residuals
 * 
 *   def invoke_process_batch(self,             # <<<<<<<<<<<<<<
 *                      windowed_batch,  # type: WindowedBatch
 *                      additional_args=None,
 */
  __pyx_tuple__209 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_windowed_batch, __pyx_n_s_additional_args, __pyx_n_s_additional_kwargs, __pyx_n_s_w); if (unlikely(!__pyx_tuple__209)) __PYX_ERR(0, 855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__209);
  __Pyx_GIVEREF(__pyx_tuple__209);
  __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__209, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_invoke_process_batch, 855, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 855, __pyx_L1_error)

  /* "apache_beam/runners/common.py":882
 *           windowed_batch, additional_args, additional_kwargs)
 * 
 *   def _should_process_window_for_sdf(             # <<<<<<<<<<<<<<
 *       self,
 *       windowed_value, # type: WindowedValue
 */
  __pyx_tuple__210 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_windowed_value, __pyx_n_s_additional_kwargs, __pyx_n_s_window_index, __pyx_n_s_restriction_tracker, __pyx_n_s_watermark_estimator, __pyx_n_s_restriction_tracker_param, __pyx_n_s_watermark_param); if (unlikely(!__pyx_tuple__210)) __PYX_ERR(0, 882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__210);
  __Pyx_GIVEREF(__pyx_tuple__210);
  __pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__210, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_should_process_window_for_sdf, 882, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(0, 882, __pyx_L1_error)

  /* "apache_beam/runners/common.py":919
 *     return True
 * 
 *   def _invoke_process_per_window(self,             # <<<<<<<<<<<<<<
 *                                  windowed_value,  # type: WindowedValue
 *                                  additional_args,
 */
  __pyx_tuple__211 = PyTuple_Pack(23, __pyx_n_s_self, __pyx_n_s_windowed_value, __pyx_n_s_additional_args, __pyx_n_s_additional_kwargs, __pyx_n_s_window, __pyx_n_s_side_inputs, __pyx_n_s_args_for_process, __pyx_n_s_kwargs_for_process, __pyx_n_s_global_window, __pyx_n_s_key, __pyx_n_s_unused_value, __pyx_n_s_i, __pyx_n_s_p, __pyx_n_s_deferred_status, __pyx_n_s_deferred_restriction, __pyx_n_s_deferred_timestamp, __pyx_n_s_element, __pyx_n_s_size, __pyx_n_s_current_watermark, __pyx_n_s_estimator_state, __pyx_n_s_residual_value, __pyx_n_s_si, __pyx_n_s_si); if (unlikely(!__pyx_tuple__211)) __PYX_ERR(0, 919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__211);
  __Pyx_GIVEREF(__pyx_tuple__211);
  __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(4, 0, 23, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__211, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_invoke_process_per_window, 919, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(0, 919, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1023
 *     return None
 * 
 *   def _invoke_process_batch_per_window(             # <<<<<<<<<<<<<<
 *       self,
 *       windowed_batch: WindowedBatch,
 */
  __pyx_tuple__212 = PyTuple_Pack(13, __pyx_n_s_self, __pyx_n_s_windowed_batch, __pyx_n_s_additional_args, __pyx_n_s_additional_kwargs, __pyx_n_s_window, __pyx_n_s_side_inputs, __pyx_n_s_args_for_process_batch, __pyx_n_s_kwargs_for_process_batch, __pyx_n_s_global_window, __pyx_n_s_i, __pyx_n_s_p, __pyx_n_s_si, __pyx_n_s_si); if (unlikely(!__pyx_tuple__212)) __PYX_ERR(0, 1023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__212);
  __Pyx_GIVEREF(__pyx_tuple__212);
  __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__212, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_invoke_process_batch_per_window, 1023, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(0, 1023, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1092
 * 
 *   @staticmethod
 *   def _try_split(fraction,             # <<<<<<<<<<<<<<
 *       window_index, # type: Optional[int]
 *       stop_window_index, # type: Optional[int]
 */
  __pyx_tuple__213 = PyTuple_Pack(30, __pyx_n_s_fraction, __pyx_n_s_window_index, __pyx_n_s_stop_window_index, __pyx_n_s_windowed_value, __pyx_n_s_restriction, __pyx_n_s_watermark_estimator_state, __pyx_n_s_restriction_provider, __pyx_n_s_restriction_tracker, __pyx_n_s_watermark_estimator, __pyx_n_s_compute_whole_window_split, __pyx_n_s_compute_whole_window_split, __pyx_n_s_primary_restrictions, __pyx_n_s_residual_restrictions, __pyx_n_s_window_observing, __pyx_n_s_progress, __pyx_n_s_RestrictionProgress, __pyx_n_s_scaled_progress, __pyx_n_s_fraction_of_remainder, __pyx_n_s_new_stop_window_index, __pyx_n_s_primary, __pyx_n_s_residual, __pyx_n_s_current_watermark, __pyx_n_s_current_estimator_state, __pyx_n_s_split, __pyx_n_s_element, __pyx_n_s_primary_size, __pyx_n_s_residual_size, __pyx_n_s_primary_split_value, __pyx_n_s_residual_split_value, __pyx_n_s_windows); if (unlikely(!__pyx_tuple__213)) __PYX_ERR(0, 1092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__213);
  __Pyx_GIVEREF(__pyx_tuple__213);
  __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(9, 0, 30, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__213, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_try_split_2, 1092, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 1092, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1273
 *       return None
 * 
 *   def try_split(self, fraction):             # <<<<<<<<<<<<<<
 *     # type: (...) -> Optional[Tuple[Iterable[SplitResultPrimary], Iterable[SplitResultResidual]]]
 *     if not self.is_splittable:
 */
  __pyx_tuple__214 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_fraction, __pyx_n_s_result, __pyx_n_s_residuals, __pyx_n_s_primaries); if (unlikely(!__pyx_tuple__214)) __PYX_ERR(0, 1273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__214);
  __Pyx_GIVEREF(__pyx_tuple__214);
  __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__214, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_try_split, 1273, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(0, 1273, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1302
 * 
 *   @staticmethod
 *   def _scale_progress(progress, window_index, stop_window_index):             # <<<<<<<<<<<<<<
 *     # We scale progress based upon the amount of work we will do for one
 *     # window and have it apply for all windows.
 */
  __pyx_tuple__215 = PyTuple_Pack(6, __pyx_n_s_progress, __pyx_n_s_window_index, __pyx_n_s_stop_window_index, __pyx_n_s_completed, __pyx_n_s_remaining, __pyx_n_s_RestrictionProgress); if (unlikely(!__pyx_tuple__215)) __PYX_ERR(0, 1302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__215);
  __Pyx_GIVEREF(__pyx_tuple__215);
  __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__215, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_scale_progress, 1302, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(0, 1302, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1312
 *     return RestrictionProgress(completed=completed, remaining=remaining)
 * 
 *   def current_element_progress(self):             # <<<<<<<<<<<<<<
 *     # type: () -> Optional[RestrictionProgress]
 *     if not self.is_splittable:
 */
  __pyx_tuple__216 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_current_window_index, __pyx_n_s_stop_window_index, __pyx_n_s_threadsafe_restriction_tracker, __pyx_n_s_progress); if (unlikely(!__pyx_tuple__216)) __PYX_ERR(0, 1312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__216);
  __Pyx_GIVEREF(__pyx_tuple__216);
  __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__216, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_current_element_progress, 1312, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(0, 1312, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__217 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__217)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__217);
  __Pyx_GIVEREF(__pyx_tuple__217);
  __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__217, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_PerWindowInvoker, (type(self), 0xb7d4fae, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_PerWindowInvoker__set_state(self, __pyx_state)
 */
  __pyx_tuple__218 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__218)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__218);
  __Pyx_GIVEREF(__pyx_tuple__218);
  __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__218, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1432
 *         bundle_finalizer_param=self.bundle_finalizer_param)
 * 
 *   def process(self, windowed_value):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> Iterable[SplitResultResidual]
 *     try:
 */
  __pyx_tuple__219 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_windowed_value); if (unlikely(!__pyx_tuple__219)) __PYX_ERR(0, 1432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__219);
  __Pyx_GIVEREF(__pyx_tuple__219);
  __pyx_codeobj__77 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__219, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_process, 1432, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__77)) __PYX_ERR(0, 1432, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1440
 *       return []
 * 
 *   def _maybe_sample_exception(             # <<<<<<<<<<<<<<
 *       self, exn: BaseException,
 *       windowed_value: Optional[WindowedValue]) -> None:
 */
  __pyx_tuple__220 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_exn, __pyx_n_s_windowed_value, __pyx_n_s_output_sampler); if (unlikely(!__pyx_tuple__220)) __PYX_ERR(0, 1440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__220);
  __Pyx_GIVEREF(__pyx_tuple__220);
  __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__220, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_maybe_sample_exception, 1440, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(0, 1440, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1457
 *         self.execution_context.instruction_id)
 * 
 *   def process_batch(self, windowed_batch):             # <<<<<<<<<<<<<<
 *     # type: (WindowedBatch) -> None
 *     try:
 */
  __pyx_tuple__221 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_windowed_batch, __pyx_n_s_exn); if (unlikely(!__pyx_tuple__221)) __PYX_ERR(0, 1457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__221);
  __Pyx_GIVEREF(__pyx_tuple__221);
  __pyx_codeobj__79 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__221, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_process_batch, 1457, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__79)) __PYX_ERR(0, 1457, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1464
 *       self._reraise_augmented(exn)
 * 
 *   def process_with_sized_restriction(self, windowed_value):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> Iterable[SplitResultResidual]
 *     (element, (restriction, estimator_state)), _ = windowed_value.value
 */
  __pyx_tuple__222 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_windowed_value, __pyx_n_s_element, __pyx_n_s_restriction, __pyx_n_s_estimator_state, __pyx_n_s__184); if (unlikely(!__pyx_tuple__222)) __PYX_ERR(0, 1464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__222);
  __Pyx_GIVEREF(__pyx_tuple__222);
  __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__222, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_process_with_sized_restriction, 1464, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 1464, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1472
 *         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_tuple__223 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_fraction); if (unlikely(!__pyx_tuple__223)) __PYX_ERR(0, 1472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__223);
  __Pyx_GIVEREF(__pyx_tuple__223);
  __pyx_codeobj__81 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__223, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_try_split, 1472, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__81)) __PYX_ERR(0, 1472, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1477
 *     return self.do_fn_invoker.try_split(fraction)
 * 
 *   def current_element_progress(self):             # <<<<<<<<<<<<<<
 *     # type: () -> Optional[RestrictionProgress]
 *     assert isinstance(self.do_fn_invoker, PerWindowInvoker)
 */
  __pyx_tuple__224 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__224)) __PYX_ERR(0, 1477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__224);
  __Pyx_GIVEREF(__pyx_tuple__224);
  __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__224, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_current_element_progress, 1477, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(0, 1477, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1482
 *     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_tuple__225 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_timer_spec, __pyx_n_s_key, __pyx_n_s_window, __pyx_n_s_timestamp, __pyx_n_s_pane_info, __pyx_n_s_dynamic_timer_tag, __pyx_n_s_exn); if (unlikely(!__pyx_tuple__225)) __PYX_ERR(0, 1482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__225);
  __Pyx_GIVEREF(__pyx_tuple__225);
  __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(7, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__225, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_process_user_timer, 1482, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) __PYX_ERR(0, 1482, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1490
 *       self._reraise_augmented(exn)
 * 
 *   def _invoke_bundle_method(self, bundle_method):             # <<<<<<<<<<<<<<
 *     try:
 *       self.context.set_element(None)
 */
  __pyx_tuple__226 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_bundle_method, __pyx_n_s_exn); if (unlikely(!__pyx_tuple__226)) __PYX_ERR(0, 1490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__226);
  __Pyx_GIVEREF(__pyx_tuple__226);
  __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__226, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_invoke_bundle_method, 1490, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(0, 1490, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1497
 *       self._reraise_augmented(exn)
 * 
 *   def _invoke_lifecycle_method(self, lifecycle_method):             # <<<<<<<<<<<<<<
 *     try:
 *       self.context.set_element(None)
 */
  __pyx_tuple__227 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_lifecycle_method, __pyx_n_s_exn); if (unlikely(!__pyx_tuple__227)) __PYX_ERR(0, 1497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__227);
  __Pyx_GIVEREF(__pyx_tuple__227);
  __pyx_codeobj__85 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__227, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_invoke_lifecycle_method, 1497, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__85)) __PYX_ERR(0, 1497, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1504
 *       self._reraise_augmented(exn)
 * 
 *   def setup(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     self._invoke_lifecycle_method(self.do_fn_invoker.invoke_setup)
 */
  __pyx_tuple__228 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__228)) __PYX_ERR(0, 1504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__228);
  __Pyx_GIVEREF(__pyx_tuple__228);
  __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__228, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_setup, 1504, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(0, 1504, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1508
 *     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_tuple__229 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__229)) __PYX_ERR(0, 1508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__229);
  __Pyx_GIVEREF(__pyx_tuple__229);
  __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__229, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_start, 1508, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(0, 1508, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1512
 *     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_tuple__230 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__230)) __PYX_ERR(0, 1512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__230);
  __Pyx_GIVEREF(__pyx_tuple__230);
  __pyx_codeobj__88 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__230, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_finish, 1512, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__88)) __PYX_ERR(0, 1512, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1516
 *     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_tuple__231 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__231)) __PYX_ERR(0, 1516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__231);
  __Pyx_GIVEREF(__pyx_tuple__231);
  __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__231, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_teardown, 1516, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(0, 1516, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1520
 *     self._invoke_lifecycle_method(self.do_fn_invoker.invoke_teardown)
 * 
 *   def finalize(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     self.bundle_finalizer_param.finalize_bundle()
 */
  __pyx_tuple__232 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__232)) __PYX_ERR(0, 1520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__232);
  __Pyx_GIVEREF(__pyx_tuple__232);
  __pyx_codeobj__90 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__232, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_finalize, 1520, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__90)) __PYX_ERR(0, 1520, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1524
 *     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_tuple__233 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_exn, __pyx_n_s_windowed_value, __pyx_n_s_step_annotation, __pyx_n_s_new_exn, __pyx_n_s_exc_info, __pyx_n_s__184, __pyx_n_s_tb); if (unlikely(!__pyx_tuple__233)) __PYX_ERR(0, 1524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__233);
  __Pyx_GIVEREF(__pyx_tuple__233);
  __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__233, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_reraise_augmented, 1524, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) __PYX_ERR(0, 1524, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__234 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__234)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__234);
  __Pyx_GIVEREF(__pyx_tuple__234);
  __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__234, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DoFnRunner, (type(self), 0x503639a, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DoFnRunner__set_state(self, __pyx_state)
 */
  __pyx_tuple__235 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__235)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__235);
  __Pyx_GIVEREF(__pyx_tuple__235);
  __pyx_codeobj__94 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__235, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__94)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1551
 * 
 * class OutputHandler(object):
 *   def handle_process_outputs(             # <<<<<<<<<<<<<<
 *       self, windowed_input_element, results, watermark_estimator=None):
 *     # type: (WindowedValue, Iterable[Any], Optional[WatermarkEstimator]) -> None
 */
  __pyx_tuple__236 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_windowed_input_element, __pyx_n_s_results, __pyx_n_s_watermark_estimator); if (unlikely(!__pyx_tuple__236)) __PYX_ERR(0, 1551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__236);
  __Pyx_GIVEREF(__pyx_tuple__236);
  __pyx_codeobj__95 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__236, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_handle_process_outputs, 1551, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__95)) __PYX_ERR(0, 1551, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1556
 *     raise NotImplementedError
 * 
 *   def handle_process_batch_outputs(             # <<<<<<<<<<<<<<
 *       self, windowed_input_element, results, watermark_estimator=None):
 *     # type: (WindowedBatch, Iterable[Any], Optional[WatermarkEstimator]) -> None
 */
  __pyx_tuple__237 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_windowed_input_element, __pyx_n_s_results, __pyx_n_s_watermark_estimator); if (unlikely(!__pyx_tuple__237)) __PYX_ERR(0, 1556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__237);
  __Pyx_GIVEREF(__pyx_tuple__237);
  __pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__237, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_handle_process_batch_outputs, 1556, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) __PYX_ERR(0, 1556, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__238 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__238)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__238);
  __Pyx_GIVEREF(__pyx_tuple__238);
  __pyx_codeobj__97 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__238, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_OutputHandler, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_OutputHandler__set_state(self, __pyx_state)
 */
  __pyx_tuple__239 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__239)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__239);
  __Pyx_GIVEREF(__pyx_tuple__239);
  __pyx_codeobj__98 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__239, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__98)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1595
 *     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_tuple__240 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_windowed_input_element, __pyx_n_s_results, __pyx_n_s_watermark_estimator); if (unlikely(!__pyx_tuple__240)) __PYX_ERR(0, 1595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__240);
  __Pyx_GIVEREF(__pyx_tuple__240);
  __pyx_codeobj__99 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__240, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_handle_process_outputs, 1595, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__99)) __PYX_ERR(0, 1595, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1648
 *       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_tuple__241 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_windowed_input_batch, __pyx_n_s_results, __pyx_n_s_watermark_estimator); if (unlikely(!__pyx_tuple__241)) __PYX_ERR(0, 1648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__241);
  __Pyx_GIVEREF(__pyx_tuple__241);
  __pyx_codeobj__100 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_handle_process_batch_outputs, 1648, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__100)) __PYX_ERR(0, 1648, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1754
 *           "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_tuple__242 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_results); if (unlikely(!__pyx_tuple__242)) __PYX_ERR(0, 1754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__242);
  __Pyx_GIVEREF(__pyx_tuple__242);
  __pyx_codeobj__101 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__242, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_start_bundle_outputs, 1754, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__101)) __PYX_ERR(0, 1754, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1761
 *         '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_tuple__243 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_results, __pyx_n_s_result, __pyx_n_s_tag, __pyx_n_s_windowed_value); if (unlikely(!__pyx_tuple__243)) __PYX_ERR(0, 1761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__243);
  __Pyx_GIVEREF(__pyx_tuple__243);
  __pyx_codeobj__102 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__243, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_finish_bundle_outputs, 1761, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__102)) __PYX_ERR(0, 1761, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__244 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__244)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__244);
  __Pyx_GIVEREF(__pyx_tuple__244);
  __pyx_codeobj__103 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__244, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__103)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__OutputHandler, (type(self), 0xca1400f, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__OutputHandler__set_state(self, __pyx_state)
 */
  __pyx_tuple__245 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__245)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__245);
  __Pyx_GIVEREF(__pyx_tuple__245);
  __pyx_codeobj__104 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__245, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__104)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1794
 *   NO_VALUE = object()
 * 
 *   def __init__(self, value, timestamp=NO_VALUE):             # <<<<<<<<<<<<<<
 *     self.value = value
 *     self._timestamp = timestamp
 */
  __pyx_tuple__246 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_timestamp); if (unlikely(!__pyx_tuple__246)) __PYX_ERR(0, 1794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__246);
  __Pyx_GIVEREF(__pyx_tuple__246);
  __pyx_codeobj__105 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__246, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_init, 1794, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__105)) __PYX_ERR(0, 1794, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1799
 * 
 *   @property
 *   def timestamp(self):             # <<<<<<<<<<<<<<
 *     if self._timestamp is self.NO_VALUE:
 *       raise ValueError('No timestamp in this context.')
 */
  __pyx_tuple__247 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__247)) __PYX_ERR(0, 1799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__247);
  __Pyx_GIVEREF(__pyx_tuple__247);
  __pyx_codeobj__106 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__247, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_timestamp, 1799, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__106)) __PYX_ERR(0, 1799, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1806
 * 
 *   @property
 *   def existing_windows(self):             # <<<<<<<<<<<<<<
 *     raise ValueError('No existing_windows in this context.')
 * 
 */
  __pyx_tuple__248 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__248)) __PYX_ERR(0, 1806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__248);
  __Pyx_GIVEREF(__pyx_tuple__248);
  __pyx_codeobj__108 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__248, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_existing_windows, 1806, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__108)) __PYX_ERR(0, 1806, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1810
 * 
 * 
 * class DoFnState(object):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees.
 * 
 */
  __pyx_tuple__249 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__249)) __PYX_ERR(0, 1810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__249);
  __Pyx_GIVEREF(__pyx_tuple__249);

  /* "apache_beam/runners/common.py":1815
 *   Keeps track of state that DoFns want, currently, user counters.
 *   """
 *   def __init__(self, counter_factory):             # <<<<<<<<<<<<<<
 *     self.step_name = ''
 *     self._counter_factory = counter_factory
 */
  __pyx_tuple__250 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_counter_factory_2); if (unlikely(!__pyx_tuple__250)) __PYX_ERR(0, 1815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__250);
  __Pyx_GIVEREF(__pyx_tuple__250);
  __pyx_codeobj__110 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__250, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_init, 1815, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__110)) __PYX_ERR(0, 1815, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1819
 *     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_tuple__251 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_aggregator); if (unlikely(!__pyx_tuple__251)) __PYX_ERR(0, 1819, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__251);
  __Pyx_GIVEREF(__pyx_tuple__251);
  __pyx_codeobj__112 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__251, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_counter_for, 1819, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__112)) __PYX_ERR(0, 1819, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1834
 *       self.set_element(element)
 * 
 *   def set_element(self, windowed_value):             # <<<<<<<<<<<<<<
 *     # type: (Optional[WindowedValue]) -> None
 *     self.windowed_value = windowed_value
 */
  __pyx_tuple__252 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_windowed_value); if (unlikely(!__pyx_tuple__252)) __PYX_ERR(0, 1834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__252);
  __Pyx_GIVEREF(__pyx_tuple__252);
  __pyx_codeobj__113 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__252, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_set_element, 1834, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__113)) __PYX_ERR(0, 1834, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__253 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__253)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__253);
  __Pyx_GIVEREF(__pyx_tuple__253);
  __pyx_codeobj__117 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__253, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__117)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DoFnContext, (type(self), 0x1b535c7, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DoFnContext__set_state(self, __pyx_state)
 */
  __pyx_tuple__254 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__254)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__254);
  __Pyx_GIVEREF(__pyx_tuple__254);
  __pyx_codeobj__118 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__254, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__118)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1860
 * 
 * 
 * def group_by_key_input_visitor(deterministic_key_coders=True):             # <<<<<<<<<<<<<<
 *   # Importing here to avoid a circular dependency
 *   # pylint: disable=wrong-import-order, wrong-import-position
 */
  __pyx_tuple__255 = PyTuple_Pack(4, __pyx_n_s_deterministic_key_coders, __pyx_n_s_PipelineVisitor, __pyx_n_s_GroupByKey, __pyx_n_s_GroupByKeyInputVisitor); if (unlikely(!__pyx_tuple__255)) __PYX_ERR(0, 1860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__255);
  __Pyx_GIVEREF(__pyx_tuple__255);
  __pyx_codeobj__119 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__255, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_group_by_key_input_visitor, 1860, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__119)) __PYX_ERR(0, 1860, __pyx_L1_error)
  __pyx_tuple__256 = PyTuple_Pack(1, ((PyObject *)Py_True)); if (unlikely(!__pyx_tuple__256)) __PYX_ERR(0, 1860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__256);
  __Pyx_GIVEREF(__pyx_tuple__256);

  /* "apache_beam/runners/common.py":1897
 * 
 * 
 * def validate_pipeline_graph(pipeline_proto):             # <<<<<<<<<<<<<<
 *   """Ensures this is a correctly constructed Beam pipeline.
 *   """
 */
  __pyx_tuple__257 = PyTuple_Pack(6, __pyx_n_s_pipeline_proto, __pyx_n_s_get_coder, __pyx_n_s_get_coder, __pyx_n_s_validate_transform, __pyx_n_s_validate_transform, __pyx_n_s_t); if (unlikely(!__pyx_tuple__257)) __PYX_ERR(0, 1897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__257);
  __Pyx_GIVEREF(__pyx_tuple__257);
  __pyx_codeobj__128 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__257, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_common_py, __pyx_n_s_validate_pipeline_graph, 1897, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__128)) __PYX_ERR(0, 1897, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __pyx_unpickle_Receiver(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_tuple__258 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__258)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__258);
  __Pyx_GIVEREF(__pyx_tuple__258);
  __pyx_codeobj__133 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__258, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Receiver, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__133)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__259 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__259)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__259);
  __Pyx_GIVEREF(__pyx_tuple__259);
  __pyx_codeobj__135 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__259, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_MethodWrapper, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__135)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__260 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__260)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__260);
  __Pyx_GIVEREF(__pyx_tuple__260);
  __pyx_codeobj__137 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__260, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DoFnSignature, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__137)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__261 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__261)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__261);
  __Pyx_GIVEREF(__pyx_tuple__261);
  __pyx_codeobj__139 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__261, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DoFnInvoker, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__139)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__262 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__262)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__262);
  __Pyx_GIVEREF(__pyx_tuple__262);
  __pyx_codeobj__141 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__262, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_SimpleInvoker, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__141)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__263 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__263)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__263);
  __Pyx_GIVEREF(__pyx_tuple__263);
  __pyx_codeobj__143 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__263, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_PerWindowInvoker, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__143)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__264 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__264)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__264);
  __Pyx_GIVEREF(__pyx_tuple__264);
  __pyx_codeobj__145 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__264, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DoFnRunner, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__145)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__265 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__265)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__265);
  __Pyx_GIVEREF(__pyx_tuple__265);
  __pyx_codeobj__147 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__265, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_OutputHandler, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__147)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__266 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__266)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__266);
  __Pyx_GIVEREF(__pyx_tuple__266);
  __pyx_codeobj__148 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__266, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle__OutputHandler, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__148)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__267 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__267)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__267);
  __Pyx_GIVEREF(__pyx_tuple__267);
  __pyx_codeobj__150 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__267, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DoFnContext, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__150)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  /* AssertionsEnabled.init */
  __Pyx_init_assertions_enabled();

if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_10199973 = PyInt_FromLong(10199973L); if (unlikely(!__pyx_int_10199973)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_22542117 = PyInt_FromLong(22542117L); if (unlikely(!__pyx_int_22542117)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_24629412 = PyInt_FromLong(24629412L); if (unlikely(!__pyx_int_24629412)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_28652999 = PyInt_FromLong(28652999L); if (unlikely(!__pyx_int_28652999)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_38742981 = PyInt_FromLong(38742981L); if (unlikely(!__pyx_int_38742981)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_61400015 = PyInt_FromLong(61400015L); if (unlikely(!__pyx_int_61400015)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_62474201 = PyInt_FromLong(62474201L); if (unlikely(!__pyx_int_62474201)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_74069314 = PyInt_FromLong(74069314L); if (unlikely(!__pyx_int_74069314)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_77316345 = PyInt_FromLong(77316345L); if (unlikely(!__pyx_int_77316345)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_84108186 = PyInt_FromLong(84108186L); if (unlikely(!__pyx_int_84108186)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_129859458 = PyInt_FromLong(129859458L); if (unlikely(!__pyx_int_129859458)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_137922938 = PyInt_FromLong(137922938L); if (unlikely(!__pyx_int_137922938)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_142278286 = PyInt_FromLong(142278286L); if (unlikely(!__pyx_int_142278286)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_145085662 = PyInt_FromLong(145085662L); if (unlikely(!__pyx_int_145085662)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_146279351 = PyInt_FromLong(146279351L); if (unlikely(!__pyx_int_146279351)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_173793943 = PyInt_FromLong(173793943L); if (unlikely(!__pyx_int_173793943)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_192761774 = PyInt_FromLong(192761774L); if (unlikely(!__pyx_int_192761774)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_195284539 = PyInt_FromLong(195284539L); if (unlikely(!__pyx_int_195284539)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_210439282 = PyInt_FromLong(210439282L); if (unlikely(!__pyx_int_210439282)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_211894287 = PyInt_FromLong(211894287L); if (unlikely(!__pyx_int_211894287)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_217907439 = PyInt_FromLong(217907439L); if (unlikely(!__pyx_int_217907439)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_222419149 = PyInt_FromLong(222419149L); if (unlikely(!__pyx_int_222419149)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_228825662 = PyInt_FromLong(228825662L); if (unlikely(!__pyx_int_228825662)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_238750788 = PyInt_FromLong(238750788L); if (unlikely(!__pyx_int_238750788)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_243009704 = PyInt_FromLong(243009704L); if (unlikely(!__pyx_int_243009704)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_248758726 = PyInt_FromLong(248758726L); if (unlikely(!__pyx_int_248758726)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_257113325 = PyInt_FromLong(257113325L); if (unlikely(!__pyx_int_257113325)) __PYX_ERR(0, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/

static int __Pyx_modinit_global_init_code(void) {
  __Pyx_RefNannyDeclarations
  __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(void) {
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  if (__Pyx_ExportVoidPtr(__pyx_n_s_TaggedOutput, (void *)&__pyx_v_11apache_beam_7runners_6common_TaggedOutput, "PyTypeObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_TimestampedValue, (void *)&__pyx_v_11apache_beam_7runners_6common_TimestampedValue, "PyTypeObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_function_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_init_code(void) {
  __Pyx_RefNannyDeclarations
  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 (PyType_Ready(&__pyx_type_11apache_beam_7runners_6common_Receiver) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_7runners_6common_Receiver.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_7runners_6common_Receiver.tp_dictoffset && __pyx_type_11apache_beam_7runners_6common_Receiver.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_7runners_6common_Receiver.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_7runners_6common_Receiver.tp_dict, __pyx_vtabptr_11apache_beam_7runners_6common_Receiver) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Receiver, (PyObject *)&__pyx_type_11apache_beam_7runners_6common_Receiver) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_7runners_6common_Receiver) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6common_Receiver = &__pyx_type_11apache_beam_7runners_6common_Receiver;
  if (PyType_Ready(&__pyx_type_11apache_beam_7runners_6common_MethodWrapper) < 0) __PYX_ERR(0, 139, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_7runners_6common_MethodWrapper.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_7runners_6common_MethodWrapper.tp_dictoffset && __pyx_type_11apache_beam_7runners_6common_MethodWrapper.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_7runners_6common_MethodWrapper.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_11apache_beam_7runners_6common_MethodWrapper, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 139, __pyx_L1_error)
    if (Py_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_n_s_MethodWrapper, (PyObject *)&__pyx_type_11apache_beam_7runners_6common_MethodWrapper) < 0) __PYX_ERR(0, 139, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_7runners_6common_MethodWrapper) < 0) __PYX_ERR(0, 139, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6common_MethodWrapper = &__pyx_type_11apache_beam_7runners_6common_MethodWrapper;
  if (PyType_Ready(&__pyx_type_11apache_beam_7runners_6common_DoFnSignature) < 0) __PYX_ERR(0, 263, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_7runners_6common_DoFnSignature.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_7runners_6common_DoFnSignature.tp_dictoffset && __pyx_type_11apache_beam_7runners_6common_DoFnSignature.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_7runners_6common_DoFnSignature.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DoFnSignature, (PyObject *)&__pyx_type_11apache_beam_7runners_6common_DoFnSignature) < 0) __PYX_ERR(0, 263, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_7runners_6common_DoFnSignature) < 0) __PYX_ERR(0, 263, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6common_DoFnSignature = &__pyx_type_11apache_beam_7runners_6common_DoFnSignature;
  __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 (PyType_Ready(&__pyx_type_11apache_beam_7runners_6common_DoFnInvoker) < 0) __PYX_ERR(0, 431, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_7runners_6common_DoFnInvoker.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_7runners_6common_DoFnInvoker.tp_dictoffset && __pyx_type_11apache_beam_7runners_6common_DoFnInvoker.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_7runners_6common_DoFnInvoker.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_11apache_beam_7runners_6common_DoFnInvoker, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 431, __pyx_L1_error)
    if (Py_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_type_11apache_beam_7runners_6common_DoFnInvoker.tp_dict, __pyx_vtabptr_11apache_beam_7runners_6common_DoFnInvoker) < 0) __PYX_ERR(0, 431, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DoFnInvoker, (PyObject *)&__pyx_type_11apache_beam_7runners_6common_DoFnInvoker) < 0) __PYX_ERR(0, 431, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_7runners_6common_DoFnInvoker) < 0) __PYX_ERR(0, 431, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker = &__pyx_type_11apache_beam_7runners_6common_DoFnInvoker;
  __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;
  __pyx_type_11apache_beam_7runners_6common_SimpleInvoker.tp_base = __pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker;
  if (PyType_Ready(&__pyx_type_11apache_beam_7runners_6common_SimpleInvoker) < 0) __PYX_ERR(0, 616, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_7runners_6common_SimpleInvoker.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_7runners_6common_SimpleInvoker.tp_dictoffset && __pyx_type_11apache_beam_7runners_6common_SimpleInvoker.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_7runners_6common_SimpleInvoker.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_7runners_6common_SimpleInvoker.tp_dict, __pyx_vtabptr_11apache_beam_7runners_6common_SimpleInvoker) < 0) __PYX_ERR(0, 616, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SimpleInvoker, (PyObject *)&__pyx_type_11apache_beam_7runners_6common_SimpleInvoker) < 0) __PYX_ERR(0, 616, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_7runners_6common_SimpleInvoker) < 0) __PYX_ERR(0, 616, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker = &__pyx_type_11apache_beam_7runners_6common_SimpleInvoker;
  __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;
  __pyx_type_11apache_beam_7runners_6common_PerWindowInvoker.tp_base = __pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker;
  if (PyType_Ready(&__pyx_type_11apache_beam_7runners_6common_PerWindowInvoker) < 0) __PYX_ERR(0, 723, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_7runners_6common_PerWindowInvoker.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_7runners_6common_PerWindowInvoker.tp_dictoffset && __pyx_type_11apache_beam_7runners_6common_PerWindowInvoker.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_7runners_6common_PerWindowInvoker.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_7runners_6common_PerWindowInvoker.tp_dict, __pyx_vtabptr_11apache_beam_7runners_6common_PerWindowInvoker) < 0) __PYX_ERR(0, 723, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PerWindowInvoker, (PyObject *)&__pyx_type_11apache_beam_7runners_6common_PerWindowInvoker) < 0) __PYX_ERR(0, 723, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_7runners_6common_PerWindowInvoker) < 0) __PYX_ERR(0, 723, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker = &__pyx_type_11apache_beam_7runners_6common_PerWindowInvoker;
  __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 (PyType_Ready(&__pyx_type_11apache_beam_7runners_6common_DoFnRunner) < 0) __PYX_ERR(0, 1336, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_7runners_6common_DoFnRunner.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_7runners_6common_DoFnRunner.tp_dictoffset && __pyx_type_11apache_beam_7runners_6common_DoFnRunner.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_7runners_6common_DoFnRunner.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_11apache_beam_7runners_6common_DoFnRunner, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1336, __pyx_L1_error)
    if (Py_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_type_11apache_beam_7runners_6common_DoFnRunner.tp_dict, __pyx_vtabptr_11apache_beam_7runners_6common_DoFnRunner) < 0) __PYX_ERR(0, 1336, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DoFnRunner, (PyObject *)&__pyx_type_11apache_beam_7runners_6common_DoFnRunner) < 0) __PYX_ERR(0, 1336, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_7runners_6common_DoFnRunner) < 0) __PYX_ERR(0, 1336, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6common_DoFnRunner = &__pyx_type_11apache_beam_7runners_6common_DoFnRunner;
  __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 (PyType_Ready(&__pyx_type_11apache_beam_7runners_6common_OutputHandler) < 0) __PYX_ERR(0, 1550, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_7runners_6common_OutputHandler.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_7runners_6common_OutputHandler.tp_dictoffset && __pyx_type_11apache_beam_7runners_6common_OutputHandler.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_7runners_6common_OutputHandler.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_7runners_6common_OutputHandler.tp_dict, __pyx_vtabptr_11apache_beam_7runners_6common_OutputHandler) < 0) __PYX_ERR(0, 1550, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_OutputHandler, (PyObject *)&__pyx_type_11apache_beam_7runners_6common_OutputHandler) < 0) __PYX_ERR(0, 1550, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_7runners_6common_OutputHandler) < 0) __PYX_ERR(0, 1550, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6common_OutputHandler = &__pyx_type_11apache_beam_7runners_6common_OutputHandler;
  __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;
  __pyx_type_11apache_beam_7runners_6common__OutputHandler.tp_base = __pyx_ptype_11apache_beam_7runners_6common_OutputHandler;
  if (PyType_Ready(&__pyx_type_11apache_beam_7runners_6common__OutputHandler) < 0) __PYX_ERR(0, 1562, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_7runners_6common__OutputHandler.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_7runners_6common__OutputHandler.tp_dictoffset && __pyx_type_11apache_beam_7runners_6common__OutputHandler.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_7runners_6common__OutputHandler.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_11apache_beam_7runners_6common__OutputHandler, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1562, __pyx_L1_error)
    if (Py_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_type_11apache_beam_7runners_6common__OutputHandler.tp_dict, __pyx_vtabptr_11apache_beam_7runners_6common__OutputHandler) < 0) __PYX_ERR(0, 1562, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_OutputHandler_2, (PyObject *)&__pyx_type_11apache_beam_7runners_6common__OutputHandler) < 0) __PYX_ERR(0, 1562, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_7runners_6common__OutputHandler) < 0) __PYX_ERR(0, 1562, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6common__OutputHandler = &__pyx_type_11apache_beam_7runners_6common__OutputHandler;
  __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 (PyType_Ready(&__pyx_type_11apache_beam_7runners_6common_DoFnContext) < 0) __PYX_ERR(0, 1826, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_7runners_6common_DoFnContext.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_7runners_6common_DoFnContext.tp_dictoffset && __pyx_type_11apache_beam_7runners_6common_DoFnContext.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_7runners_6common_DoFnContext.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_7runners_6common_DoFnContext.tp_dict, __pyx_vtabptr_11apache_beam_7runners_6common_DoFnContext) < 0) __PYX_ERR(0, 1826, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DoFnContext, (PyObject *)&__pyx_type_11apache_beam_7runners_6common_DoFnContext) < 0) __PYX_ERR(0, 1826, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_7runners_6common_DoFnContext) < 0) __PYX_ERR(0, 1826, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6common_DoFnContext = &__pyx_type_11apache_beam_7runners_6common_DoFnContext;
  __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;
  __pyx_type_11apache_beam_7runners_6common__ReceiverAdapter.tp_base = __pyx_ptype_11apache_beam_7runners_6common_Receiver;
  if (PyType_Ready(&__pyx_type_11apache_beam_7runners_6common__ReceiverAdapter) < 0) __PYX_ERR(2, 178, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_7runners_6common__ReceiverAdapter.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_7runners_6common__ReceiverAdapter.tp_dictoffset && __pyx_type_11apache_beam_7runners_6common__ReceiverAdapter.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_7runners_6common__ReceiverAdapter.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_7runners_6common__ReceiverAdapter.tp_dict, __pyx_vtabptr_11apache_beam_7runners_6common__ReceiverAdapter) < 0) __PYX_ERR(2, 178, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ReceiverAdapter, (PyObject *)&__pyx_type_11apache_beam_7runners_6common__ReceiverAdapter) < 0) __PYX_ERR(2, 178, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6common__ReceiverAdapter = &__pyx_type_11apache_beam_7runners_6common__ReceiverAdapter;
  if (PyType_Ready(&__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders) < 0) __PYX_ERR(0, 652, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders.tp_dictoffset && __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders = &__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct___get_arg_placeholders;
  if (PyType_Ready(&__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_1_genexpr) < 0) __PYX_ERR(0, 669, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_1_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_1_genexpr.tp_dictoffset && __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_1_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_1_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_1_genexpr = &__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_1_genexpr;
  if (PyType_Ready(&__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_2___init__) < 0) __PYX_ERR(0, 726, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_2___init__.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_2___init__.tp_dictoffset && __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_2___init__.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_2___init__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_2___init__ = &__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_2___init__;
  if (PyType_Ready(&__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr) < 0) __PYX_ERR(0, 742, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr.tp_dictoffset && __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr = &__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr;
  if (PyType_Ready(&__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr) < 0) __PYX_ERR(0, 743, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr.tp_dictoffset && __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr = &__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr;
  if (PyType_Ready(&__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr) < 0) __PYX_ERR(0, 745, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr.tp_dictoffset && __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr = &__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr;
  if (PyType_Ready(&__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr) < 0) __PYX_ERR(0, 751, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr.tp_dictoffset && __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr = &__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr;
  if (PyType_Ready(&__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split) < 0) __PYX_ERR(0, 1092, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split.tp_dictoffset && __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split = &__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split;
  if (PyType_Ready(&__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor) < 0) __PYX_ERR(0, 1860, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor.tp_dictoffset && __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor = &__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_8_group_by_key_input_visitor;
  if (PyType_Ready(&__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph) < 0) __PYX_ERR(0, 1897, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph.tp_dictoffset && __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph = &__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_9_validate_pipeline_graph;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  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, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.utils.windowed_value", "PaneInfo", sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo) __PYX_ERR(3, 28, __pyx_L1_error)
  __pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.utils.windowed_value", "WindowedValue", sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue) __PYX_ERR(3, 37, __pyx_L1_error)
  __pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedValue = (struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedValue*)__Pyx_GetVtable(__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue->tp_dict); if (unlikely(!__pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedValue)) __PYX_ERR(3, 37, __pyx_L1_error)
  __pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.utils.windowed_value", "WindowedBatch", sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__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_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch->tp_dict); if (unlikely(!__pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedBatch)) __PYX_ERR(3, 46, __pyx_L1_error)
  __pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.utils.windowed_value", "HomogeneousWindowedBatch", sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__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_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch->tp_dict); if (unlikely(!__pyx_vtabptr_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch)) __PYX_ERR(3, 49, __pyx_L1_error)
  __pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.utils.windowed_value", "_IntervalWindowBase", sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__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, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.transforms.cy_dataflow_distribution_counter", "DataflowDistributionCounter", sizeof(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter) __PYX_ERR(4, 33, __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_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter->tp_dict); if (unlikely(!__pyx_vtabptr_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter)) __PYX_ERR(4, 33, __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(void) {
  __Pyx_RefNannyDeclarations
  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 (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_ImportVoidPtr_0_29_36(__pyx_t_1, "Timestamp", (void **)&__pyx_vp_11apache_beam_5utils_14windowed_value_Timestamp, "PyTypeObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportVoidPtr_0_29_36(__pyx_t_1, "_BYTE_TO_PANE_INFO", (void **)&__pyx_vp_11apache_beam_5utils_14windowed_value__BYTE_TO_PANE_INFO, "PyObject *") < 0) __PYX_ERR(0, 1, __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_function_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}


#ifndef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#elif PY_MAJOR_VERSION < 3
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" void
#else
#define __Pyx_PyMODINIT_FUNC void
#endif
#else
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
#else
#define __Pyx_PyMODINIT_FUNC PyObject *
#endif
#endif


#if PY_MAJOR_VERSION < 3
__Pyx_PyMODINIT_FUNC initcommon(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC initcommon(void)
#else
__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);
}
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
    #if PY_VERSION_HEX >= 0x030700A1
    static PY_INT64_T main_interpreter_id = -1;
    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
    if (main_interpreter_id == -1) {
        main_interpreter_id = current_id;
        return (unlikely(current_id == -1)) ? -1 : 0;
    } else if (unlikely(main_interpreter_id != current_id))
    #else
    static PyInterpreterState *main_interpreter = NULL;
    PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
    if (!main_interpreter) {
        main_interpreter = current_interpreter;
    } else if (unlikely(main_interpreter != current_interpreter))
    #endif
    {
        PyErr_SetString(
            PyExc_ImportError,
            "Interpreter change detected - this module can only be loaded into one interpreter per process.");
        return -1;
    }
    return 0;
}
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, CYTHON_UNUSED PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    if (__Pyx_check_single_interpreter())
        return NULL;
    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
#endif
{
  __Pyx_TraceDeclarations
  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;
  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;
  }
  #elif PY_MAJOR_VERSION >= 3
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  #endif
  #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("__Pyx_PyMODINIT_FUNC PyInit_common(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pxy_PyFrame_Initialize_Offsets
  __Pxy_PyFrame_Initialize_Offsets();
  #endif
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  PyEval_InitThreads();
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_m = __pyx_pyinit_module;
  Py_INCREF(__pyx_m);
  #else
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("common", __pyx_methods, __pyx_k_Worker_operations_executor_For_i, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_b);
  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_cython_runtime);
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_apache_beam__runners__common) {
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    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)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code();
  if (unlikely(__Pyx_modinit_variable_export_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  (void)__Pyx_modinit_function_export_code();
  if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely(__Pyx_modinit_variable_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  (void)__Pyx_modinit_function_import_code();
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  __Pyx_TraceCall("__Pyx_PyMODINIT_FUNC PyInit_common(void)", __pyx_f[0], 1, 0, __PYX_ERR(0, 1, __pyx_L1_error));

  /* "apache_beam/runners/common.py":27
 * # pytype: skip-file
 * 
 * import logging             # <<<<<<<<<<<<<<
 * import sys
 * import threading
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_logging, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_logging, __pyx_t_1) < 0) __PYX_ERR(0, 27, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":28
 * 
 * import logging
 * import sys             # <<<<<<<<<<<<<<
 * import threading
 * import traceback
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":29
 * import logging
 * import sys
 * import threading             # <<<<<<<<<<<<<<
 * import traceback
 * from enum import Enum
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_threading, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_threading, __pyx_t_1) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":30
 * import sys
 * import threading
 * import traceback             # <<<<<<<<<<<<<<
 * from enum import Enum
 * from typing import TYPE_CHECKING
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_traceback, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_traceback, __pyx_t_1) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":31
 * import threading
 * import traceback
 * from enum import Enum             # <<<<<<<<<<<<<<
 * from typing import TYPE_CHECKING
 * from typing import Any
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_Enum);
  __Pyx_GIVEREF(__pyx_n_s_Enum);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Enum);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_enum, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Enum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Enum, __pyx_t_1) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":32
 * import traceback
 * from enum import Enum
 * from typing import TYPE_CHECKING             # <<<<<<<<<<<<<<
 * from typing import Any
 * from typing import Dict
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_TYPE_CHECKING);
  __Pyx_GIVEREF(__pyx_n_s_TYPE_CHECKING);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_TYPE_CHECKING);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_typing, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_TYPE_CHECKING); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TYPE_CHECKING, __pyx_t_2) < 0) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":33
 * from enum import Enum
 * from typing import TYPE_CHECKING
 * from typing import Any             # <<<<<<<<<<<<<<
 * from typing import Dict
 * from typing import Iterable
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_Any);
  __Pyx_GIVEREF(__pyx_n_s_Any);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Any);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_typing, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Any); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Any, __pyx_t_1) < 0) __PYX_ERR(0, 33, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":34
 * from typing import TYPE_CHECKING
 * from typing import Any
 * from typing import Dict             # <<<<<<<<<<<<<<
 * from typing import Iterable
 * from typing import List
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_Dict);
  __Pyx_GIVEREF(__pyx_n_s_Dict);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Dict);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_typing, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Dict, __pyx_t_2) < 0) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":35
 * from typing import Any
 * from typing import Dict
 * from typing import Iterable             # <<<<<<<<<<<<<<
 * from typing import List
 * from typing import Mapping
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_Iterable);
  __Pyx_GIVEREF(__pyx_n_s_Iterable);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Iterable);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_typing, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Iterable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Iterable, __pyx_t_1) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":36
 * from typing import Dict
 * from typing import Iterable
 * from typing import List             # <<<<<<<<<<<<<<
 * from typing import Mapping
 * from typing import Optional
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_List);
  __Pyx_GIVEREF(__pyx_n_s_List);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_List);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_typing, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_List); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_List, __pyx_t_2) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":37
 * from typing import Iterable
 * from typing import List
 * from typing import Mapping             # <<<<<<<<<<<<<<
 * from typing import Optional
 * from typing import Tuple
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_Mapping);
  __Pyx_GIVEREF(__pyx_n_s_Mapping);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Mapping);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_typing, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Mapping); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Mapping, __pyx_t_1) < 0) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":38
 * from typing import List
 * from typing import Mapping
 * from typing import Optional             # <<<<<<<<<<<<<<
 * from typing import Tuple
 * 
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_Optional);
  __Pyx_GIVEREF(__pyx_n_s_Optional);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Optional);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_typing, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Optional); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Optional, __pyx_t_2) < 0) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":39
 * from typing import Mapping
 * from typing import Optional
 * from typing import Tuple             # <<<<<<<<<<<<<<
 * 
 * from apache_beam.coders import TupleCoder
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_Tuple);
  __Pyx_GIVEREF(__pyx_n_s_Tuple);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Tuple);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_typing, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Tuple, __pyx_t_1) < 0) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":41
 * from typing import Tuple
 * 
 * from apache_beam.coders import TupleCoder             # <<<<<<<<<<<<<<
 * from apache_beam.coders import coders
 * from apache_beam.internal import util
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_TupleCoder);
  __Pyx_GIVEREF(__pyx_n_s_TupleCoder);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_TupleCoder);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_coders, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_TupleCoder); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TupleCoder, __pyx_t_2) < 0) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":42
 * 
 * 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
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_coders);
  __Pyx_GIVEREF(__pyx_n_s_coders);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_coders);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_coders, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_coders); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_coders, __pyx_t_1) < 0) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":43
 * 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.portability import common_urns
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_util);
  __Pyx_GIVEREF(__pyx_n_s_util);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_util);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_internal, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_util); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_util, __pyx_t_2) < 0) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":44
 * from apache_beam.coders import coders
 * from apache_beam.internal import util
 * from apache_beam.options.value_provider import RuntimeValueProvider             # <<<<<<<<<<<<<<
 * from apache_beam.portability import common_urns
 * from apache_beam.pvalue import TaggedOutput
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_RuntimeValueProvider);
  __Pyx_GIVEREF(__pyx_n_s_RuntimeValueProvider);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_RuntimeValueProvider);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_options_value_provid, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_RuntimeValueProvider); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_RuntimeValueProvider, __pyx_t_1) < 0) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":45
 * from apache_beam.internal import util
 * from apache_beam.options.value_provider import RuntimeValueProvider
 * from apache_beam.portability import common_urns             # <<<<<<<<<<<<<<
 * from apache_beam.pvalue import TaggedOutput
 * from apache_beam.runners.sdf_utils import NoOpWatermarkEstimatorProvider
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_common_urns);
  __Pyx_GIVEREF(__pyx_n_s_common_urns);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_common_urns);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_portability, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_common_urns); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_common_urns, __pyx_t_2) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":46
 * from apache_beam.options.value_provider import RuntimeValueProvider
 * from apache_beam.portability import common_urns
 * from apache_beam.pvalue import TaggedOutput             # <<<<<<<<<<<<<<
 * from apache_beam.runners.sdf_utils import NoOpWatermarkEstimatorProvider
 * from apache_beam.runners.sdf_utils import RestrictionTrackerView
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_TaggedOutput);
  __Pyx_GIVEREF(__pyx_n_s_TaggedOutput);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_TaggedOutput);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_pvalue, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_TaggedOutput); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyType_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "type", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_XGOTREF(((PyObject *)__pyx_v_11apache_beam_7runners_6common_TaggedOutput));
  __Pyx_DECREF_SET(__pyx_v_11apache_beam_7runners_6common_TaggedOutput, ((PyTypeObject*)__pyx_t_1));
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":47
 * from apache_beam.portability import common_urns
 * 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
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_NoOpWatermarkEstimatorProvider);
  __Pyx_GIVEREF(__pyx_n_s_NoOpWatermarkEstimatorProvider);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_NoOpWatermarkEstimatorProvider);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_runners_sdf_utils, __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_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_NoOpWatermarkEstimatorProvider); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NoOpWatermarkEstimatorProvider, __pyx_t_2) < 0) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":48
 * 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
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_RestrictionTrackerView);
  __Pyx_GIVEREF(__pyx_n_s_RestrictionTrackerView);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_RestrictionTrackerView);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_runners_sdf_utils, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_RestrictionTrackerView); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_RestrictionTrackerView, __pyx_t_1) < 0) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":49
 * 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
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_SplitResultPrimary);
  __Pyx_GIVEREF(__pyx_n_s_SplitResultPrimary);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_SplitResultPrimary);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_runners_sdf_utils, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_SplitResultPrimary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SplitResultPrimary, __pyx_t_2) < 0) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":50
 * 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
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_SplitResultResidual);
  __Pyx_GIVEREF(__pyx_n_s_SplitResultResidual);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_SplitResultResidual);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_runners_sdf_utils, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_SplitResultResidual); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SplitResultResidual, __pyx_t_1) < 0) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":51
 * 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
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_ThreadsafeRestrictionTracker);
  __Pyx_GIVEREF(__pyx_n_s_ThreadsafeRestrictionTracker);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_ThreadsafeRestrictionTracker);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_runners_sdf_utils, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_ThreadsafeRestrictionTracker); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ThreadsafeRestrictionTracker, __pyx_t_2) < 0) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":52
 * 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
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_ThreadsafeWatermarkEstimator);
  __Pyx_GIVEREF(__pyx_n_s_ThreadsafeWatermarkEstimator);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_ThreadsafeWatermarkEstimator);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_runners_sdf_utils, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_ThreadsafeWatermarkEstimator); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ThreadsafeWatermarkEstimator, __pyx_t_1) < 0) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":53
 * 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
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_DoFn);
  __Pyx_GIVEREF(__pyx_n_s_DoFn);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_DoFn);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_transforms, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_DoFn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DoFn, __pyx_t_2) < 0) __PYX_ERR(0, 53, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":54
 * 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
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 54, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_core);
  __Pyx_GIVEREF(__pyx_n_s_core);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_core);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_transforms, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 54, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_core); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 54, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_core, __pyx_t_1) < 0) __PYX_ERR(0, 54, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":55
 * 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
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_userstate);
  __Pyx_GIVEREF(__pyx_n_s_userstate);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_userstate);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_transforms, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_userstate); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_userstate, __pyx_t_2) < 0) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":56
 * 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
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_RestrictionProvider);
  __Pyx_GIVEREF(__pyx_n_s_RestrictionProvider);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_RestrictionProvider);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_transforms_core, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_RestrictionProvider); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_RestrictionProvider, __pyx_t_1) < 0) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":57
 * 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
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_WatermarkEstimatorProvider);
  __Pyx_GIVEREF(__pyx_n_s_WatermarkEstimatorProvider);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_WatermarkEstimatorProvider);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_transforms_core, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_WatermarkEstimatorProvider); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_WatermarkEstimatorProvider, __pyx_t_2) < 0) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":58
 * 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
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_GlobalWindow);
  __Pyx_GIVEREF(__pyx_n_s_GlobalWindow);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_GlobalWindow);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_transforms_window, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_GlobalWindow); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_GlobalWindow, __pyx_t_1) < 0) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":59
 * 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
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_GlobalWindows);
  __Pyx_GIVEREF(__pyx_n_s_GlobalWindows);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_GlobalWindows);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_transforms_window, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_GlobalWindows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_GlobalWindows, __pyx_t_2) < 0) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":60
 * 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 import typehints
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_TimestampedValue);
  __Pyx_GIVEREF(__pyx_n_s_TimestampedValue);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_TimestampedValue);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_transforms_window, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_TimestampedValue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyType_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "type", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 60, __pyx_L1_error)
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_XGOTREF(((PyObject *)__pyx_v_11apache_beam_7runners_6common_TimestampedValue));
  __Pyx_DECREF_SET(__pyx_v_11apache_beam_7runners_6common_TimestampedValue, ((PyTypeObject*)__pyx_t_1));
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":61
 * 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 import typehints
 * from apache_beam.typehints.batch import BatchConverter
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_WindowFn);
  __Pyx_GIVEREF(__pyx_n_s_WindowFn);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_WindowFn);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_transforms_window, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_WindowFn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_WindowFn, __pyx_t_2) < 0) __PYX_ERR(0, 61, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":62
 * from apache_beam.transforms.window import TimestampedValue
 * from apache_beam.transforms.window import WindowFn
 * from apache_beam.typehints import typehints             # <<<<<<<<<<<<<<
 * from apache_beam.typehints.batch import BatchConverter
 * from apache_beam.utils.counters import Counter
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_typehints);
  __Pyx_GIVEREF(__pyx_n_s_typehints);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_typehints);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_typehints, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_typehints); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_typehints, __pyx_t_1) < 0) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":63
 * from apache_beam.transforms.window import WindowFn
 * from apache_beam.typehints import typehints
 * from apache_beam.typehints.batch import BatchConverter             # <<<<<<<<<<<<<<
 * from apache_beam.utils.counters import Counter
 * from apache_beam.utils.counters import CounterName
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_BatchConverter);
  __Pyx_GIVEREF(__pyx_n_s_BatchConverter);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_BatchConverter);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_typehints_batch, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_BatchConverter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BatchConverter, __pyx_t_2) < 0) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":64
 * from apache_beam.typehints import typehints
 * 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
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_Counter);
  __Pyx_GIVEREF(__pyx_n_s_Counter);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Counter);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_utils_counters, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Counter, __pyx_t_1) < 0) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":65
 * 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
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_CounterName);
  __Pyx_GIVEREF(__pyx_n_s_CounterName);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_CounterName);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_utils_counters, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_CounterName); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CounterName, __pyx_t_2) < 0) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":66
 * 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
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_Timestamp);
  __Pyx_GIVEREF(__pyx_n_s_Timestamp);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Timestamp);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_utils_timestamp, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Timestamp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Timestamp, __pyx_t_1) < 0) __PYX_ERR(0, 66, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":67
 * 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
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_HomogeneousWindowedBatch);
  __Pyx_GIVEREF(__pyx_n_s_HomogeneousWindowedBatch);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_HomogeneousWindowedBatch);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_utils_windowed_value, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_HomogeneousWindowedBatch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_HomogeneousWindowedBatch, __pyx_t_2) < 0) __PYX_ERR(0, 67, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":68
 * 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
 * 
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_WindowedBatch);
  __Pyx_GIVEREF(__pyx_n_s_WindowedBatch);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_WindowedBatch);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_utils_windowed_value, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __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/common.py":69
 * 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:
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_WindowedValue);
  __Pyx_GIVEREF(__pyx_n_s_WindowedValue);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_WindowedValue);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_utils_windowed_value, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __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/common.py":71
 * from apache_beam.utils.windowed_value import WindowedValue
 * 
 * if TYPE_CHECKING:             # <<<<<<<<<<<<<<
 *   from apache_beam.runners.worker.bundle_processor import ExecutionContext
 *   from apache_beam.transforms import sideinputs
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_TYPE_CHECKING); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __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, 71, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "apache_beam/runners/common.py":72
 * 
 * if TYPE_CHECKING:
 *   from apache_beam.runners.worker.bundle_processor import ExecutionContext             # <<<<<<<<<<<<<<
 *   from apache_beam.transforms import sideinputs
 *   from apache_beam.transforms.core import TimerSpec
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_ExecutionContext);
    __Pyx_GIVEREF(__pyx_n_s_ExecutionContext);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_ExecutionContext);
    __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_runners_worker_bundl, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_ExecutionContext); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_ExecutionContext, __pyx_t_1) < 0) __PYX_ERR(0, 72, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/runners/common.py":73
 * if TYPE_CHECKING:
 *   from apache_beam.runners.worker.bundle_processor import ExecutionContext
 *   from apache_beam.transforms import sideinputs             # <<<<<<<<<<<<<<
 *   from apache_beam.transforms.core import TimerSpec
 *   from apache_beam.io.iobase import RestrictionProgress
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_sideinputs);
    __Pyx_GIVEREF(__pyx_n_s_sideinputs);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_sideinputs);
    __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_transforms, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_sideinputs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_sideinputs, __pyx_t_2) < 0) __PYX_ERR(0, 73, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/runners/common.py":74
 *   from apache_beam.runners.worker.bundle_processor import ExecutionContext
 *   from apache_beam.transforms import sideinputs
 *   from apache_beam.transforms.core import TimerSpec             # <<<<<<<<<<<<<<
 *   from apache_beam.io.iobase import RestrictionProgress
 *   from apache_beam.iobase import RestrictionTracker
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_TimerSpec);
    __Pyx_GIVEREF(__pyx_n_s_TimerSpec);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_TimerSpec);
    __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_transforms_core, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 74, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_TimerSpec); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_TimerSpec, __pyx_t_1) < 0) __PYX_ERR(0, 74, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/runners/common.py":75
 *   from apache_beam.transforms import sideinputs
 *   from apache_beam.transforms.core import TimerSpec
 *   from apache_beam.io.iobase import RestrictionProgress             # <<<<<<<<<<<<<<
 *   from apache_beam.iobase import RestrictionTracker
 *   from apache_beam.iobase import WatermarkEstimator
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 75, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_RestrictionProgress);
    __Pyx_GIVEREF(__pyx_n_s_RestrictionProgress);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_RestrictionProgress);
    __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_io_iobase, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 75, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_RestrictionProgress); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 75, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_RestrictionProgress, __pyx_t_2) < 0) __PYX_ERR(0, 75, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/runners/common.py":76
 *   from apache_beam.transforms.core import TimerSpec
 *   from apache_beam.io.iobase import RestrictionProgress
 *   from apache_beam.iobase import RestrictionTracker             # <<<<<<<<<<<<<<
 *   from apache_beam.iobase import WatermarkEstimator
 * 
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_RestrictionTracker);
    __Pyx_GIVEREF(__pyx_n_s_RestrictionTracker);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_RestrictionTracker);
    __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_iobase, __pyx_t_1, 0); 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_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_RestrictionTracker); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_RestrictionTracker, __pyx_t_1) < 0) __PYX_ERR(0, 76, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/runners/common.py":77
 *   from apache_beam.io.iobase import RestrictionProgress
 *   from apache_beam.iobase import RestrictionTracker
 *   from apache_beam.iobase import WatermarkEstimator             # <<<<<<<<<<<<<<
 * 
 * IMPULSE_VALUE_CODER_IMPL = coders.WindowedValueCoder(
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_WatermarkEstimator);
    __Pyx_GIVEREF(__pyx_n_s_WatermarkEstimator);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_WatermarkEstimator);
    __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_iobase, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_WatermarkEstimator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_WatermarkEstimator, __pyx_t_2) < 0) __PYX_ERR(0, 77, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/runners/common.py":71
 * from apache_beam.utils.windowed_value import WindowedValue
 * 
 * if TYPE_CHECKING:             # <<<<<<<<<<<<<<
 *   from apache_beam.runners.worker.bundle_processor import ExecutionContext
 *   from apache_beam.transforms import sideinputs
 */
  }

  /* "apache_beam/runners/common.py":79
 *   from apache_beam.iobase import WatermarkEstimator
 * 
 * IMPULSE_VALUE_CODER_IMPL = coders.WindowedValueCoder(             # <<<<<<<<<<<<<<
 *     coders.BytesCoder(), coders.GlobalWindowCoder()).get_impl()
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_coders); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 79, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_WindowedValueCoder); 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;

  /* "apache_beam/runners/common.py":80
 * 
 * IMPULSE_VALUE_CODER_IMPL = coders.WindowedValueCoder(
 *     coders.BytesCoder(), coders.GlobalWindowCoder()).get_impl()             # <<<<<<<<<<<<<<
 * 
 * ENCODED_IMPULSE_VALUE = IMPULSE_VALUE_CODER_IMPL.encode_nested(
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_coders); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_BytesCoder); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_coders); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_GlobalWindowCoder); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "apache_beam/runners/common.py":79
 *   from apache_beam.iobase import WatermarkEstimator
 * 
 * IMPULSE_VALUE_CODER_IMPL = coders.WindowedValueCoder(             # <<<<<<<<<<<<<<
 *     coders.BytesCoder(), coders.GlobalWindowCoder()).get_impl()
 * 
 */
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 79, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
  __pyx_t_1 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 79, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "apache_beam/runners/common.py":80
 * 
 * IMPULSE_VALUE_CODER_IMPL = coders.WindowedValueCoder(
 *     coders.BytesCoder(), coders.GlobalWindowCoder()).get_impl()             # <<<<<<<<<<<<<<
 * 
 * ENCODED_IMPULSE_VALUE = IMPULSE_VALUE_CODER_IMPL.encode_nested(
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get_impl); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_IMPULSE_VALUE_CODER_IMPL, __pyx_t_4) < 0) __PYX_ERR(0, 79, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "apache_beam/runners/common.py":82
 *     coders.BytesCoder(), coders.GlobalWindowCoder()).get_impl()
 * 
 * ENCODED_IMPULSE_VALUE = IMPULSE_VALUE_CODER_IMPL.encode_nested(             # <<<<<<<<<<<<<<
 *     GlobalWindows.windowed_value(b''))
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_IMPULSE_VALUE_CODER_IMPL); 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_n_s_encode_nested); 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;

  /* "apache_beam/runners/common.py":83
 * 
 * ENCODED_IMPULSE_VALUE = IMPULSE_VALUE_CODER_IMPL.encode_nested(
 *     GlobalWindows.windowed_value(b''))             # <<<<<<<<<<<<<<
 * 
 * _LOGGER = logging.getLogger(__name__)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_GlobalWindows); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_windowed_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __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_tuple__152, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":82
 *     coders.BytesCoder(), coders.GlobalWindowCoder()).get_impl()
 * 
 * ENCODED_IMPULSE_VALUE = IMPULSE_VALUE_CODER_IMPL.encode_nested(             # <<<<<<<<<<<<<<
 *     GlobalWindows.windowed_value(b''))
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ENCODED_IMPULSE_VALUE, __pyx_t_2) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/common.py":85
 *     GlobalWindows.windowed_value(b''))
 * 
 * _LOGGER = logging.getLogger(__name__)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_logging); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 85, __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 (PyDict_SetItem(__pyx_d, __pyx_n_s_LOGGER, __pyx_t_5) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "apache_beam/runners/common.py":88
 * 
 * 
 * class NameContext(object):             # <<<<<<<<<<<<<<
 *   """Holds the name information for a step."""
 *   def __init__(self, step_name, transform_id=None):
 */
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__153); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_tuple__153, __pyx_n_s_NameContext, __pyx_n_s_NameContext, (PyObject *) NULL, __pyx_n_s_apache_beam_runners_common, __pyx_kp_s_Holds_the_name_information_for_a); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "apache_beam/runners/common.py":90
 * 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_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11NameContext_1__init__, 0, __pyx_n_s_NameContext___init, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj_)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__155);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 90, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "apache_beam/runners/common.py":101
 *     self.transform_id = transform_id
 * 
 *   def __eq__(self, other):             # <<<<<<<<<<<<<<
 *     return self.step_name == other.step_name
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11NameContext_3__eq__, 0, __pyx_n_s_NameContext___eq, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__2)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_eq, __pyx_t_4) < 0) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "apache_beam/runners/common.py":104
 *     return self.step_name == other.step_name
 * 
 *   def __repr__(self):             # <<<<<<<<<<<<<<
 *     return 'NameContext(%s)' % self.__dict__
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11NameContext_5__repr__, 0, __pyx_n_s_NameContext___repr, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__3)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_repr, __pyx_t_4) < 0) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "apache_beam/runners/common.py":107
 *     return 'NameContext(%s)' % self.__dict__
 * 
 *   def __hash__(self):             # <<<<<<<<<<<<<<
 *     return hash(self.step_name)
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11NameContext_7__hash__, 0, __pyx_n_s_NameContext___hash, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__4)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_hash, __pyx_t_4) < 0) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "apache_beam/runners/common.py":110
 *     return hash(self.step_name)
 * 
 *   def metrics_name(self):             # <<<<<<<<<<<<<<
 *     """Returns the step name used for metrics reporting."""
 *     return self.step_name
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11NameContext_9metrics_name, 0, __pyx_n_s_NameContext_metrics_name, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__5)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_metrics_name, __pyx_t_4) < 0) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "apache_beam/runners/common.py":114
 *     return self.step_name
 * 
 *   def logging_name(self):             # <<<<<<<<<<<<<<
 *     """Returns the step name used for logging."""
 *     return self.step_name
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11NameContext_11logging_name, 0, __pyx_n_s_NameContext_logging_name, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__6)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_logging_name, __pyx_t_4) < 0) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "apache_beam/runners/common.py":88
 * 
 * 
 * class NameContext(object):             # <<<<<<<<<<<<<<
 *   """Holds the name information for a step."""
 *   def __init__(self, step_name, transform_id=None):
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_NameContext, __pyx_tuple__153, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NameContext, __pyx_t_4) < 0) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "apache_beam/runners/common.py":127
 *   sdk and worker harnesses.
 *   """
 *   def receive(self, windowed_value):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     raise NotImplementedError
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_8Receiver_1receive, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Receiver_receive, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__7)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_Receiver->tp_dict, __pyx_n_s_receive, __pyx_t_5) < 0) __PYX_ERR(0, 127, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_Receiver);

  /* "apache_beam/runners/common.py":131
 *     raise NotImplementedError
 * 
 *   def receive_batch(self, windowed_batch):             # <<<<<<<<<<<<<<
 *     # type: (WindowedBatch) -> None
 *     raise NotImplementedError
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_8Receiver_3receive_batch, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Receiver_receive_batch, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__8)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_Receiver->tp_dict, __pyx_n_s_receive_batch, __pyx_t_5) < 0) __PYX_ERR(0, 131, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_Receiver);

  /* "apache_beam/runners/common.py":135
 *     raise NotImplementedError
 * 
 *   def flush(self):             # <<<<<<<<<<<<<<
 *     raise NotImplementedError
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_8Receiver_5flush, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Receiver_flush, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__9)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_Receiver->tp_dict, __pyx_n_s_flush, __pyx_t_5) < 0) __PYX_ERR(0, 135, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_Receiver);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_8Receiver_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Receiver___reduce_cython, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__10)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_Receiver->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_5) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_Receiver);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Receiver, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Receiver__set_state(self, __pyx_state)
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_8Receiver_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Receiver___setstate_cython, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__11)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_Receiver->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_5) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_Receiver);

  /* "apache_beam/runners/common.py":211
 *       self.watermark_estimator_provider = NoOpWatermarkEstimatorProvider()
 * 
 *   def invoke_timer_callback(             # <<<<<<<<<<<<<<
 *       self,
 *       user_state_context,
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13MethodWrapper_3invoke_timer_callback, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MethodWrapper_invoke_timer_callb, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__12)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper->tp_dict, __pyx_n_s_invoke_timer_callback, __pyx_t_5) < 0) __PYX_ERR(0, 211, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13MethodWrapper_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MethodWrapper___reduce_cython, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__13)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_5) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_MethodWrapper, (type(self), 0xed3c1c6, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_MethodWrapper__set_state(self, __pyx_state)
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13MethodWrapper_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MethodWrapper___setstate_cython, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__14)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_5) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper);

  /* "apache_beam/runners/common.py":243
 * 
 * 
 * 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_5, __pyx_n_s_Enum); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_2, __pyx_n_s_BatchingPreference, __pyx_n_s_BatchingPreference, (PyObject *) NULL, __pyx_n_s_apache_beam_runners_common, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "apache_beam/runners/common.py":244
 * 
 * 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_4, __pyx_n_s_DO_NOT_CARE, __pyx_int_1) < 0) __PYX_ERR(0, 244, __pyx_L1_error)

  /* "apache_beam/runners/common.py":246
 *   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_4, __pyx_n_s_BATCH_REQUIRED, __pyx_int_2) < 0) __PYX_ERR(0, 246, __pyx_L1_error)

  /* "apache_beam/runners/common.py":247
 *   # 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_4, __pyx_n_s_BATCH_FORBIDDEN, __pyx_int_3) < 0) __PYX_ERR(0, 247, __pyx_L1_error)

  /* "apache_beam/runners/common.py":251
 * 
 *   @property
 *   def supports_batches(self) -> bool:             # <<<<<<<<<<<<<<
 *     return self in (self.BATCH_REQUIRED, self.DO_NOT_CARE)
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_return, ((PyObject*)&PyBool_Type)) < 0) __PYX_ERR(0, 251, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_18BatchingPreference_1supports_batches, 0, __pyx_n_s_BatchingPreference_supports_batc, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__15)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":250
 *   # 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_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_supports_batches, __pyx_t_1) < 0) __PYX_ERR(0, 251, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":255
 * 
 *   @property
 *   def supports_elements(self) -> bool:             # <<<<<<<<<<<<<<
 *     return self in (self.BATCH_FORBIDDEN, self.DO_NOT_CARE)
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_return, ((PyObject*)&PyBool_Type)) < 0) __PYX_ERR(0, 255, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_18BatchingPreference_3supports_elements, 0, __pyx_n_s_BatchingPreference_supports_elem, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__16)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":254
 *     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_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_supports_elements, __pyx_t_1) < 0) __PYX_ERR(0, 255, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":259
 * 
 *   @property
 *   def requires_batches(self) -> bool:             # <<<<<<<<<<<<<<
 *     return self == self.BATCH_REQUIRED
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_return, ((PyObject*)&PyBool_Type)) < 0) __PYX_ERR(0, 259, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_18BatchingPreference_5requires_batches, 0, __pyx_n_s_BatchingPreference_requires_batc, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__17)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":258
 *     return self in (self.BATCH_FORBIDDEN, self.DO_NOT_CARE)
 * 
 *   @property             # <<<<<<<<<<<<<<
 *   def requires_batches(self) -> bool:
 *     return self == self.BATCH_REQUIRED
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_requires_batches, __pyx_t_1) < 0) __PYX_ERR(0, 259, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":243
 * 
 * 
 * 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_1 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_BatchingPreference, __pyx_t_2, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BatchingPreference, __pyx_t_1) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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":315
 *         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_n_s_DoFnSignature_get_restriction_pr, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__18)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature->tp_dict, __pyx_n_s_get_restriction_provider, __pyx_t_2) < 0) __PYX_ERR(0, 315, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature);

  /* "apache_beam/runners/common.py":319
 *     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_n_s_DoFnSignature_get_watermark_esti, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__19)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature->tp_dict, __pyx_n_s_get_watermark_estimator_provider, __pyx_t_2) < 0) __PYX_ERR(0, 319, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature);

  /* "apache_beam/runners/common.py":323
 *     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_n_s_DoFnSignature_is_unbounded_per_e, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__20)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature->tp_dict, __pyx_n_s_is_unbounded_per_element, __pyx_t_2) < 0) __PYX_ERR(0, 323, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature);

  /* "apache_beam/runners/common.py":326
 *     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_n_s_DoFnSignature__validate, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__21)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature->tp_dict, __pyx_n_s_validate, __pyx_t_2) < 0) __PYX_ERR(0, 326, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature);

  /* "apache_beam/runners/common.py":334
 *     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, 334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_method, __pyx_n_u_MethodWrapper) < 0) __PYX_ERR(0, 334, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_11_check_duplicate_dofn_params, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnSignature__check_duplicate_d, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__22)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature->tp_dict, __pyx_n_s_check_duplicate_dofn_params, __pyx_t_5) < 0) __PYX_ERR(0, 334, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature);

  /* "apache_beam/runners/common.py":343
 *           (self.do_fn, method.method_name, param_ids))
 * 
 *   def _validate_process(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_13_validate_process, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnSignature__validate_process, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__24)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature->tp_dict, __pyx_n_s_validate_process, __pyx_t_5) < 0) __PYX_ERR(0, 343, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature);

  /* "apache_beam/runners/common.py":350
 *     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_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_15_validate_process_batch, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnSignature__validate_process_2, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__25)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature->tp_dict, __pyx_n_s_validate_process_batch, __pyx_t_5) < 0) __PYX_ERR(0, 350, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature);

  /* "apache_beam/runners/common.py":379
 *             f"method parameter {d}")
 * 
 *   def _validate_bundle_method(self, method_wrapper):             # <<<<<<<<<<<<<<
 *     """Validate that none of the DoFnParameters are used in the function
 *     """
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_17_validate_bundle_method, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnSignature__validate_bundle_m, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__26)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature->tp_dict, __pyx_n_s_validate_bundle_method, __pyx_t_5) < 0) __PYX_ERR(0, 379, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature);

  /* "apache_beam/runners/common.py":388
 *             (param, method_wrapper))
 * 
 *   def _validate_stateful_dofn(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     userstate.validate_stateful_dofn(self.do_fn)
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_19_validate_stateful_dofn, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnSignature__validate_stateful, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__27)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature->tp_dict, __pyx_n_s_validate_stateful_dofn, __pyx_t_5) < 0) __PYX_ERR(0, 388, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature);

  /* "apache_beam/runners/common.py":392
 *     userstate.validate_stateful_dofn(self.do_fn)
 * 
 *   def is_splittable_dofn(self):             # <<<<<<<<<<<<<<
 *     # type: () -> bool
 *     return self.get_restriction_provider() is not None
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_21is_splittable_dofn, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnSignature_is_splittable_dofn, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature->tp_dict, __pyx_n_s_is_splittable_dofn, __pyx_t_5) < 0) __PYX_ERR(0, 392, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature);

  /* "apache_beam/runners/common.py":396
 *     return self.get_restriction_provider() is not None
 * 
 *   def get_restriction_coder(self):             # <<<<<<<<<<<<<<
 *     # type: () -> Optional[TupleCoder]
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_23get_restriction_coder, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnSignature_get_restriction_co, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature->tp_dict, __pyx_n_s_get_restriction_coder, __pyx_t_5) < 0) __PYX_ERR(0, 396, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature);

  /* "apache_beam/runners/common.py":408
 *       return None
 * 
 *   def is_stateful_dofn(self):             # <<<<<<<<<<<<<<
 *     # type: () -> bool
 *     return self._is_stateful_dofn
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_25is_stateful_dofn, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnSignature_is_stateful_dofn, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature->tp_dict, __pyx_n_s_is_stateful_dofn, __pyx_t_5) < 0) __PYX_ERR(0, 408, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature);

  /* "apache_beam/runners/common.py":412
 *     return self._is_stateful_dofn
 * 
 *   def has_timers(self):             # <<<<<<<<<<<<<<
 *     # type: () -> bool
 *     _, all_timer_specs = userstate.get_dofn_specs(self.do_fn)
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_27has_timers, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnSignature_has_timers, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature->tp_dict, __pyx_n_s_has_timers, __pyx_t_5) < 0) __PYX_ERR(0, 412, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature);

  /* "apache_beam/runners/common.py":417
 *     return bool(all_timer_specs)
 * 
 *   def has_bundle_finalization(self):             # <<<<<<<<<<<<<<
 *     for sig in (self.start_bundle_method,
 *                 self.process_method,
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_29has_bundle_finalization, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnSignature_has_bundle_finaliz, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__32)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature->tp_dict, __pyx_n_s_has_bundle_finalization, __pyx_t_5) < 0) __PYX_ERR(0, 417, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_31__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnSignature___reduce_cython, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_5) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DoFnSignature, (type(self), 0x87afe8e, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DoFnSignature__set_state(self, __pyx_state)
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_33__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnSignature___setstate_cython, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__34)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_5) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature);

  /* "apache_beam/runners/common.py":456
 * 
 *   @staticmethod
 *   def create_invoker(             # <<<<<<<<<<<<<<
 *       signature,  # type: DoFnSignature
 *       output_handler,  # type: OutputHandler
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_3create_invoker, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnInvoker_create_invoker, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker->tp_dict, __pyx_n_s_create_invoker, __pyx_t_5) < 0) __PYX_ERR(0, 456, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker);

  /* "apache_beam/runners/common.py":455
 *     self.bundle_finalizer_param = None  # type: Optional[core._BundleFinalizerParam]
 * 
 *   @staticmethod             # <<<<<<<<<<<<<<
 *   def create_invoker(
 *       signature,  # type: DoFnSignature
 */
  __Pyx_GetNameInClass(__pyx_t_5, (PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker, __pyx_n_s_create_invoker); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker->tp_dict, __pyx_n_s_create_invoker, __pyx_t_2) < 0) __PYX_ERR(0, 456, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker);

  /* "apache_beam/runners/common.py":512
 *           bundle_finalizer_param)
 * 
 *   def invoke_process(self,             # <<<<<<<<<<<<<<
 *                      windowed_value,  # type: WindowedValue
 *                      restriction=None,
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_5invoke_process, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnInvoker_invoke_process, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker->tp_dict, __pyx_n_s_invoke_process, __pyx_t_2) < 0) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker);

  /* "apache_beam/runners/common.py":539
 *     raise NotImplementedError
 * 
 *   def invoke_process_batch(self,             # <<<<<<<<<<<<<<
 *                      windowed_batch,  # type: WindowedBatch
 *                      additional_args=None,
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_7invoke_process_batch, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnInvoker_invoke_process_batch, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__38)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker->tp_dict, __pyx_n_s_invoke_process_batch, __pyx_t_2) < 0) __PYX_ERR(0, 539, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker);

  /* "apache_beam/runners/common.py":559
 *     raise NotImplementedError
 * 
 *   def invoke_setup(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_9invoke_setup, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnInvoker_invoke_setup, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker->tp_dict, __pyx_n_s_invoke_setup, __pyx_t_2) < 0) __PYX_ERR(0, 559, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker);

  /* "apache_beam/runners/common.py":566
 *     self.signature.setup_lifecycle_method.method_value()
 * 
 *   def invoke_start_bundle(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_11invoke_start_bundle, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnInvoker_invoke_start_bundle, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker->tp_dict, __pyx_n_s_invoke_start_bundle, __pyx_t_2) < 0) __PYX_ERR(0, 566, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker);

  /* "apache_beam/runners/common.py":574
 *         self.signature.start_bundle_method.method_value())
 * 
 *   def invoke_finish_bundle(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_13invoke_finish_bundle, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnInvoker_invoke_finish_bundle, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__41)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker->tp_dict, __pyx_n_s_invoke_finish_bundle, __pyx_t_2) < 0) __PYX_ERR(0, 574, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker);

  /* "apache_beam/runners/common.py":582
 *         self.signature.finish_bundle_method.method_value())
 * 
 *   def invoke_teardown(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_15invoke_teardown, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnInvoker_invoke_teardown, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__42)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker->tp_dict, __pyx_n_s_invoke_teardown, __pyx_t_2) < 0) __PYX_ERR(0, 582, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker);

  /* "apache_beam/runners/common.py":589
 *     self.signature.teardown_lifecycle_method.method_value()
 * 
 *   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_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_17invoke_user_timer, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnInvoker_invoke_user_timer, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker->tp_dict, __pyx_n_s_invoke_user_timer, __pyx_t_2) < 0) __PYX_ERR(0, 589, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker);

  /* "apache_beam/runners/common.py":602
 *             dynamic_timer_tag))
 * 
 *   def invoke_create_watermark_estimator(self, estimator_state):             # <<<<<<<<<<<<<<
 *     return self.signature.create_watermark_estimator_method.method_value(
 *         estimator_state)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_19invoke_create_watermark_estimator, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnInvoker_invoke_create_waterm, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker->tp_dict, __pyx_n_s_invoke_create_watermark_estimato, __pyx_t_2) < 0) __PYX_ERR(0, 602, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker);

  /* "apache_beam/runners/common.py":606
 *         estimator_state)
 * 
 *   def invoke_split(self, element, restriction):             # <<<<<<<<<<<<<<
 *     return self.signature.split_method.method_value(element, restriction)
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_21invoke_split, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnInvoker_invoke_split, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker->tp_dict, __pyx_n_s_invoke_split, __pyx_t_2) < 0) __PYX_ERR(0, 606, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker);

  /* "apache_beam/runners/common.py":609
 *     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_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_23invoke_initial_restriction, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnInvoker_invoke_initial_restr, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker->tp_dict, __pyx_n_s_invoke_initial_restriction, __pyx_t_2) < 0) __PYX_ERR(0, 609, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker);

  /* "apache_beam/runners/common.py":612
 *     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_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_25invoke_create_tracker, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnInvoker_invoke_create_tracke, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__47)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker->tp_dict, __pyx_n_s_invoke_create_tracker, __pyx_t_2) < 0) __PYX_ERR(0, 612, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker);

  /* "(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_11DoFnInvoker_27__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnInvoker___reduce_cython, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__48)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DoFnInvoker, (type(self), 0x24f2bc5, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DoFnInvoker__set_state(self, __pyx_state)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_29__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnInvoker___setstate_cython, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__49)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker);

  /* "apache_beam/runners/common.py":628
 *     self.process_batch_method = signature.process_batch_method.method_value
 * 
 *   def invoke_process(self,             # <<<<<<<<<<<<<<
 *                      windowed_value,  # type: WindowedValue
 *                      restriction=None,
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13SimpleInvoker_3invoke_process, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SimpleInvoker_invoke_process, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__50)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker->tp_dict, __pyx_n_s_invoke_process, __pyx_t_2) < 0) __PYX_ERR(0, 628, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker);

  /* "apache_beam/runners/common.py":640
 *     return []
 * 
 *   def invoke_process_batch(self,             # <<<<<<<<<<<<<<
 *                      windowed_batch,  # type: WindowedBatch
 *                      restriction=None,
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13SimpleInvoker_5invoke_process_batch, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SimpleInvoker_invoke_process_bat, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__51)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker->tp_dict, __pyx_n_s_invoke_process_batch, __pyx_t_2) < 0) __PYX_ERR(0, 640, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker);

  /* "(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_13SimpleInvoker_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SimpleInvoker___reduce_cython, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__52)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_SimpleInvoker, (type(self), 0x7bd7f82, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_SimpleInvoker__set_state(self, __pyx_state)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13SimpleInvoker_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SimpleInvoker___setstate_cython, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__53)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker);

  /* "apache_beam/runners/common.py":652
 * 
 * 
 * def _get_arg_placeholders(             # <<<<<<<<<<<<<<
 *     method: MethodWrapper,
 *     input_args: Optional[List[Any]],
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_method, __pyx_n_u_MethodWrapper) < 0) __PYX_ERR(0, 652, __pyx_L1_error)

  /* "apache_beam/runners/common.py":654
 * def _get_arg_placeholders(
 *     method: MethodWrapper,
 *     input_args: Optional[List[Any]],             # <<<<<<<<<<<<<<
 *     input_kwargs: Optional[Dict[str, any]]):
 *   input_args = input_args if input_args else []
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Optional); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_List); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Any); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_input_args, __pyx_t_1) < 0) __PYX_ERR(0, 652, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":655
 *     method: MethodWrapper,
 *     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 {}
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Optional); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(((PyObject *)(&PyUnicode_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyUnicode_Type)));
  PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)(&PyUnicode_Type)));
  __Pyx_INCREF(__pyx_builtin_any);
  __Pyx_GIVEREF(__pyx_builtin_any);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_builtin_any);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_input_kwargs, __pyx_t_5) < 0) __PYX_ERR(0, 652, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "apache_beam/runners/common.py":652
 * 
 * 
 * def _get_arg_placeholders(             # <<<<<<<<<<<<<<
 *     method: MethodWrapper,
 *     input_args: Optional[List[Any]],
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_1_get_arg_placeholders, 0, __pyx_n_s_get_arg_placeholders, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__54)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_arg_placeholders, __pyx_t_5) < 0) __PYX_ERR(0, 652, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "apache_beam/runners/common.py":783
 *             signature.process_batch_method, input_args, input_kwargs)
 * 
 *   def invoke_process(self,             # <<<<<<<<<<<<<<
 *                      windowed_value,  # type: WindowedValue
 *                      restriction=None,
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_3invoke_process, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PerWindowInvoker_invoke_process, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker->tp_dict, __pyx_n_s_invoke_process, __pyx_t_5) < 0) __PYX_ERR(0, 783, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker);

  /* "apache_beam/runners/common.py":855
 *     return residuals
 * 
 *   def invoke_process_batch(self,             # <<<<<<<<<<<<<<
 *                      windowed_batch,  # type: WindowedBatch
 *                      additional_args=None,
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_5invoke_process_batch, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PerWindowInvoker_invoke_process_2, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker->tp_dict, __pyx_n_s_invoke_process_batch, __pyx_t_5) < 0) __PYX_ERR(0, 855, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker);

  /* "apache_beam/runners/common.py":882
 *           windowed_batch, additional_args, additional_kwargs)
 * 
 *   def _should_process_window_for_sdf(             # <<<<<<<<<<<<<<
 *       self,
 *       windowed_value, # type: WindowedValue
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_7_should_process_window_for_sdf, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PerWindowInvoker__should_process, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__61)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker->tp_dict, __pyx_n_s_should_process_window_for_sdf, __pyx_t_5) < 0) __PYX_ERR(0, 882, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker);

  /* "apache_beam/runners/common.py":919
 *     return True
 * 
 *   def _invoke_process_per_window(self,             # <<<<<<<<<<<<<<
 *                                  windowed_value,  # type: WindowedValue
 *                                  additional_args,
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_9_invoke_process_per_window, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PerWindowInvoker__invoke_process, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__63)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker->tp_dict, __pyx_n_s_invoke_process_per_window, __pyx_t_5) < 0) __PYX_ERR(0, 919, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker);

  /* "apache_beam/runners/common.py":1023
 *     return None
 * 
 *   def _invoke_process_batch_per_window(             # <<<<<<<<<<<<<<
 *       self,
 *       windowed_batch: WindowedBatch,
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_windowed_batch, __pyx_n_u_WindowedBatch) < 0) __PYX_ERR(0, 1023, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_11_invoke_process_batch_per_window, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PerWindowInvoker__invoke_process_2, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__65)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker->tp_dict, __pyx_n_s_invoke_process_batch_per_window, __pyx_t_2) < 0) __PYX_ERR(0, 1023, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker);

  /* "apache_beam/runners/common.py":1092
 * 
 *   @staticmethod
 *   def _try_split(fraction,             # <<<<<<<<<<<<<<
 *       window_index, # type: Optional[int]
 *       stop_window_index, # type: Optional[int]
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_13_try_split, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PerWindowInvoker__try_split, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker->tp_dict, __pyx_n_s_try_split_2, __pyx_t_2) < 0) __PYX_ERR(0, 1092, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker);

  /* "apache_beam/runners/common.py":1091
 *         self.threadsafe_watermark_estimator)
 * 
 *   @staticmethod             # <<<<<<<<<<<<<<
 *   def _try_split(fraction,
 *       window_index, # type: Optional[int]
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker, __pyx_n_s_try_split_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1091, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker->tp_dict, __pyx_n_s_try_split_2, __pyx_t_5) < 0) __PYX_ERR(0, 1092, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker);

  /* "apache_beam/runners/common.py":1273
 *       return None
 * 
 *   def try_split(self, fraction):             # <<<<<<<<<<<<<<
 *     # type: (...) -> Optional[Tuple[Iterable[SplitResultPrimary], Iterable[SplitResultResidual]]]
 *     if not self.is_splittable:
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_15try_split, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PerWindowInvoker_try_split, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__70)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker->tp_dict, __pyx_n_s_try_split, __pyx_t_5) < 0) __PYX_ERR(0, 1273, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker);

  /* "apache_beam/runners/common.py":1302
 * 
 *   @staticmethod
 *   def _scale_progress(progress, window_index, stop_window_index):             # <<<<<<<<<<<<<<
 *     # We scale progress based upon the amount of work we will do for one
 *     # window and have it apply for all windows.
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_17_scale_progress, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PerWindowInvoker__scale_progress, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__71)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker->tp_dict, __pyx_n_s_scale_progress, __pyx_t_5) < 0) __PYX_ERR(0, 1302, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker);

  /* "apache_beam/runners/common.py":1301
 *       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_GetNameInClass(__pyx_t_5, (PyObject *)__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker, __pyx_n_s_scale_progress); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker->tp_dict, __pyx_n_s_scale_progress, __pyx_t_2) < 0) __PYX_ERR(0, 1302, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker);

  /* "apache_beam/runners/common.py":1312
 *     return RestrictionProgress(completed=completed, remaining=remaining)
 * 
 *   def current_element_progress(self):             # <<<<<<<<<<<<<<
 *     # type: () -> Optional[RestrictionProgress]
 *     if not self.is_splittable:
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_19current_element_progress, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PerWindowInvoker_current_element, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__72)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker->tp_dict, __pyx_n_s_current_element_progress, __pyx_t_2) < 0) __PYX_ERR(0, 1312, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker);

  /* "(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_16PerWindowInvoker_21__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PerWindowInvoker___reduce_cython, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__73)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_PerWindowInvoker, (type(self), 0xb7d4fae, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_PerWindowInvoker__set_state(self, __pyx_state)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_23__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PerWindowInvoker___setstate_cyth, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__74)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker);

  /* "apache_beam/runners/common.py":1432
 *         bundle_finalizer_param=self.bundle_finalizer_param)
 * 
 *   def process(self, windowed_value):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> Iterable[SplitResultResidual]
 *     try:
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_3process, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnRunner_process, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__77)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner->tp_dict, __pyx_n_s_process, __pyx_t_2) < 0) __PYX_ERR(0, 1432, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner);

  /* "apache_beam/runners/common.py":1440
 *       return []
 * 
 *   def _maybe_sample_exception(             # <<<<<<<<<<<<<<
 *       self, exn: BaseException,
 *       windowed_value: Optional[WindowedValue]) -> None:
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "apache_beam/runners/common.py":1441
 * 
 *   def _maybe_sample_exception(
 *       self, exn: BaseException,             # <<<<<<<<<<<<<<
 *       windowed_value: Optional[WindowedValue]) -> None:
 * 
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_exn, __pyx_builtin_BaseException) < 0) __PYX_ERR(0, 1440, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1442
 *   def _maybe_sample_exception(
 *       self, exn: BaseException,
 *       windowed_value: Optional[WindowedValue]) -> None:             # <<<<<<<<<<<<<<
 * 
 *     if self.execution_context is None:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Optional); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_5, ((PyObject *)__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_windowed_value, __pyx_t_4) < 0) __PYX_ERR(0, 1440, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_return, Py_None) < 0) __PYX_ERR(0, 1440, __pyx_L1_error)

  /* "apache_beam/runners/common.py":1440
 *       return []
 * 
 *   def _maybe_sample_exception(             # <<<<<<<<<<<<<<
 *       self, exn: BaseException,
 *       windowed_value: Optional[WindowedValue]) -> None:
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_5_maybe_sample_exception, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnRunner__maybe_sample_excepti, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__78)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner->tp_dict, __pyx_n_s_maybe_sample_exception, __pyx_t_4) < 0) __PYX_ERR(0, 1440, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner);

  /* "apache_beam/runners/common.py":1457
 *         self.execution_context.instruction_id)
 * 
 *   def process_batch(self, windowed_batch):             # <<<<<<<<<<<<<<
 *     # type: (WindowedBatch) -> None
 *     try:
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_7process_batch, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnRunner_process_batch, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__79)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner->tp_dict, __pyx_n_s_process_batch, __pyx_t_4) < 0) __PYX_ERR(0, 1457, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner);

  /* "apache_beam/runners/common.py":1464
 *       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_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_9process_with_sized_restriction, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnRunner_process_with_sized_re, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner->tp_dict, __pyx_n_s_process_with_sized_restriction, __pyx_t_4) < 0) __PYX_ERR(0, 1464, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner);

  /* "apache_beam/runners/common.py":1472
 *         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_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_11try_split, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnRunner_try_split, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__81)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner->tp_dict, __pyx_n_s_try_split, __pyx_t_4) < 0) __PYX_ERR(0, 1472, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner);

  /* "apache_beam/runners/common.py":1477
 *     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_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_13current_element_progress, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnRunner_current_element_progr, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner->tp_dict, __pyx_n_s_current_element_progress, __pyx_t_4) < 0) __PYX_ERR(0, 1477, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner);

  /* "apache_beam/runners/common.py":1482
 *     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_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_15process_user_timer, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnRunner_process_user_timer, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__83)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner->tp_dict, __pyx_n_s_process_user_timer, __pyx_t_4) < 0) __PYX_ERR(0, 1482, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner);

  /* "apache_beam/runners/common.py":1490
 *       self._reraise_augmented(exn)
 * 
 *   def _invoke_bundle_method(self, bundle_method):             # <<<<<<<<<<<<<<
 *     try:
 *       self.context.set_element(None)
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_17_invoke_bundle_method, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnRunner__invoke_bundle_method, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__84)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner->tp_dict, __pyx_n_s_invoke_bundle_method, __pyx_t_4) < 0) __PYX_ERR(0, 1490, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner);

  /* "apache_beam/runners/common.py":1497
 *       self._reraise_augmented(exn)
 * 
 *   def _invoke_lifecycle_method(self, lifecycle_method):             # <<<<<<<<<<<<<<
 *     try:
 *       self.context.set_element(None)
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_19_invoke_lifecycle_method, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnRunner__invoke_lifecycle_met, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__85)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner->tp_dict, __pyx_n_s_invoke_lifecycle_method, __pyx_t_4) < 0) __PYX_ERR(0, 1497, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner);

  /* "apache_beam/runners/common.py":1504
 *       self._reraise_augmented(exn)
 * 
 *   def setup(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     self._invoke_lifecycle_method(self.do_fn_invoker.invoke_setup)
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_21setup, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnRunner_setup, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__86)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner->tp_dict, __pyx_n_s_setup, __pyx_t_4) < 0) __PYX_ERR(0, 1504, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner);

  /* "apache_beam/runners/common.py":1508
 *     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_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_23start, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnRunner_start, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__87)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner->tp_dict, __pyx_n_s_start, __pyx_t_4) < 0) __PYX_ERR(0, 1508, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner);

  /* "apache_beam/runners/common.py":1512
 *     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_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_25finish, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnRunner_finish, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__88)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner->tp_dict, __pyx_n_s_finish, __pyx_t_4) < 0) __PYX_ERR(0, 1512, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner);

  /* "apache_beam/runners/common.py":1516
 *     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_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_27teardown, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnRunner_teardown, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__89)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner->tp_dict, __pyx_n_s_teardown, __pyx_t_4) < 0) __PYX_ERR(0, 1516, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner);

  /* "apache_beam/runners/common.py":1520
 *     self._invoke_lifecycle_method(self.do_fn_invoker.invoke_teardown)
 * 
 *   def finalize(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     self.bundle_finalizer_param.finalize_bundle()
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_29finalize, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnRunner_finalize, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__90)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner->tp_dict, __pyx_n_s_finalize, __pyx_t_4) < 0) __PYX_ERR(0, 1520, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner);

  /* "apache_beam/runners/common.py":1524
 *     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_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_31_reraise_augmented, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnRunner__reraise_augmented, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__91)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner->tp_dict, __pyx_n_s_reraise_augmented, __pyx_t_4) < 0) __PYX_ERR(0, 1524, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner);

  /* "(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_10DoFnRunner_33__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnRunner___reduce_cython, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__93)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DoFnRunner, (type(self), 0x503639a, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DoFnRunner__set_state(self, __pyx_state)
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_35__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoFnRunner___setstate_cython, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__94)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_4) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner);

  /* "apache_beam/runners/common.py":1551
 * 
 * class OutputHandler(object):
 *   def handle_process_outputs(             # <<<<<<<<<<<<<<
 *       self, windowed_input_element, results, watermark_estimator=None):
 *     # type: (WindowedValue, Iterable[Any], Optional[WatermarkEstimator]) -> None
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13OutputHandler_1handle_process_outputs, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_OutputHandler_handle_process_out, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__95)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_OutputHandler->tp_dict, __pyx_n_s_handle_process_outputs, __pyx_t_4) < 0) __PYX_ERR(0, 1551, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_OutputHandler);

  /* "apache_beam/runners/common.py":1556
 *     raise NotImplementedError
 * 
 *   def handle_process_batch_outputs(             # <<<<<<<<<<<<<<
 *       self, windowed_input_element, results, watermark_estimator=None):
 *     # type: (WindowedBatch, Iterable[Any], Optional[WatermarkEstimator]) -> None
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13OutputHandler_3handle_process_batch_outputs, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_OutputHandler_handle_process_bat, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__96)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_OutputHandler->tp_dict, __pyx_n_s_handle_process_batch_outputs, __pyx_t_4) < 0) __PYX_ERR(0, 1556, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_OutputHandler);

  /* "(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_13OutputHandler_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_OutputHandler___reduce_cython, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__97)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_OutputHandler->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_OutputHandler);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_OutputHandler, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_OutputHandler__set_state(self, __pyx_state)
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13OutputHandler_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_OutputHandler___setstate_cython, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__98)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_OutputHandler->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_4) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_OutputHandler);

  /* "apache_beam/runners/common.py":1595
 *     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_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_14_OutputHandler_3handle_process_outputs, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_OutputHandler_handle_process_ou, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__99)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common__OutputHandler->tp_dict, __pyx_n_s_handle_process_outputs, __pyx_t_4) < 0) __PYX_ERR(0, 1595, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common__OutputHandler);

  /* "apache_beam/runners/common.py":1648
 *       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_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_14_OutputHandler_5handle_process_batch_outputs, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_OutputHandler_handle_process_ba, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__100)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common__OutputHandler->tp_dict, __pyx_n_s_handle_process_batch_outputs, __pyx_t_4) < 0) __PYX_ERR(0, 1648, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common__OutputHandler);

  /* "apache_beam/runners/common.py":1754
 *           "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_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_14_OutputHandler_7start_bundle_outputs, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_OutputHandler_start_bundle_outp, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__101)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common__OutputHandler->tp_dict, __pyx_n_s_start_bundle_outputs, __pyx_t_4) < 0) __PYX_ERR(0, 1754, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common__OutputHandler);

  /* "apache_beam/runners/common.py":1761
 *         '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_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_14_OutputHandler_9finish_bundle_outputs, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_OutputHandler_finish_bundle_out, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__102)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common__OutputHandler->tp_dict, __pyx_n_s_finish_bundle_outputs, __pyx_t_4) < 0) __PYX_ERR(0, 1761, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common__OutputHandler);

  /* "(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_14_OutputHandler_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_OutputHandler___reduce_cython_2, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__103)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common__OutputHandler->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common__OutputHandler);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__OutputHandler, (type(self), 0xca1400f, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__OutputHandler__set_state(self, __pyx_state)
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_14_OutputHandler_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_OutputHandler___setstate_cython_2, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__104)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common__OutputHandler->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_4) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common__OutputHandler);

  /* "apache_beam/runners/common.py":1790
 * 
 * 
 * class _NoContext(WindowFn.AssignContext):             # <<<<<<<<<<<<<<
 *   """An uninspectable WindowFn.AssignContext."""
 *   NO_VALUE = object()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_WindowFn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_AssignContext); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_4, __pyx_n_s_NoContext, __pyx_n_s_NoContext, (PyObject *) NULL, __pyx_n_s_apache_beam_runners_common, __pyx_kp_s_An_uninspectable_WindowFn_Assign); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "apache_beam/runners/common.py":1792
 * class _NoContext(WindowFn.AssignContext):
 *   """An uninspectable WindowFn.AssignContext."""
 *   NO_VALUE = object()             # <<<<<<<<<<<<<<
 * 
 *   def __init__(self, value, timestamp=NO_VALUE):
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_object); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_NO_VALUE, __pyx_t_1) < 0) __PYX_ERR(0, 1792, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":1794
 *   NO_VALUE = object()
 * 
 *   def __init__(self, value, timestamp=NO_VALUE):             # <<<<<<<<<<<<<<
 *     self.value = value
 *     self._timestamp = timestamp
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_10_NoContext_1__init__, 0, __pyx_n_s_NoContext___init, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__105)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_1, sizeof(__pyx_defaults), 1)) __PYX_ERR(0, 1794, __pyx_L1_error)
  __pyx_t_6 = PyObject_GetItem(__pyx_t_5, __pyx_n_s_NO_VALUE);
  if (unlikely(!__pyx_t_6)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_NO_VALUE);
  }
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_1)->__pyx_arg_timestamp = __pyx_t_6;
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_1, __pyx_pf_11apache_beam_7runners_6common_26__defaults__);
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 1794, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":1799
 * 
 *   @property
 *   def timestamp(self):             # <<<<<<<<<<<<<<
 *     if self._timestamp is self.NO_VALUE:
 *       raise ValueError('No timestamp in this context.')
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_10_NoContext_3timestamp, 0, __pyx_n_s_NoContext_timestamp, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__106)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "apache_beam/runners/common.py":1798
 *     self._timestamp = timestamp
 * 
 *   @property             # <<<<<<<<<<<<<<
 *   def timestamp(self):
 *     if self._timestamp is self.NO_VALUE:
 */
  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_timestamp, __pyx_t_6) < 0) __PYX_ERR(0, 1799, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "apache_beam/runners/common.py":1806
 * 
 *   @property
 *   def existing_windows(self):             # <<<<<<<<<<<<<<
 *     raise ValueError('No existing_windows in this context.')
 * 
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_10_NoContext_5existing_windows, 0, __pyx_n_s_NoContext_existing_windows, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__108)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "apache_beam/runners/common.py":1805
 *       return self._timestamp
 * 
 *   @property             # <<<<<<<<<<<<<<
 *   def existing_windows(self):
 *     raise ValueError('No existing_windows in this context.')
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_existing_windows, __pyx_t_1) < 0) __PYX_ERR(0, 1806, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/common.py":1790
 * 
 * 
 * class _NoContext(WindowFn.AssignContext):             # <<<<<<<<<<<<<<
 *   """An uninspectable WindowFn.AssignContext."""
 *   NO_VALUE = object()
 */
  __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_NoContext, __pyx_t_4, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NoContext, __pyx_t_1) < 0) __PYX_ERR(0, 1790, __pyx_L1_error)
  __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_4); __pyx_t_4 = 0;

  /* "apache_beam/runners/common.py":1810
 * 
 * 
 * class DoFnState(object):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees.
 * 
 */
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__249); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_tuple__249, __pyx_n_s_DoFnState, __pyx_n_s_DoFnState, (PyObject *) NULL, __pyx_n_s_apache_beam_runners_common, __pyx_kp_s_For_internal_use_only_no_backwar); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "apache_beam/runners/common.py":1815
 *   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_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_9DoFnState_1__init__, 0, __pyx_n_s_DoFnState___init, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__110)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 1815, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "apache_beam/runners/common.py":1819
 *     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_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_9DoFnState_3counter_for, 0, __pyx_n_s_DoFnState_counter_for, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__112)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1819, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_counter_for, __pyx_t_5) < 0) __PYX_ERR(0, 1819, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "apache_beam/runners/common.py":1810
 * 
 * 
 * class DoFnState(object):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees.
 * 
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_DoFnState, __pyx_tuple__249, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DoFnState, __pyx_t_5) < 0) __PYX_ERR(0, 1810, __pyx_L1_error)
  __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":1834
 *       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_n_s_DoFnContext_set_element, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__113)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnContext->tp_dict, __pyx_n_s_set_element, __pyx_t_4) < 0) __PYX_ERR(0, 1834, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnContext);

  /* "(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_n_s_DoFnContext___reduce_cython, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__117)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnContext->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnContext);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DoFnContext, (type(self), 0x1b535c7, 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_n_s_DoFnContext___setstate_cython, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__118)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_DoFnContext->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_4) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6common_DoFnContext);

  /* "apache_beam/runners/common.py":1860
 * 
 * 
 * def group_by_key_input_visitor(deterministic_key_coders=True):             # <<<<<<<<<<<<<<
 *   # Importing here to avoid a circular dependency
 *   # pylint: disable=wrong-import-order, wrong-import-position
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_3group_by_key_input_visitor, 0, __pyx_n_s_group_by_key_input_visitor, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__119)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__256);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_by_key_input_visitor, __pyx_t_4) < 0) __PYX_ERR(0, 1860, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "apache_beam/runners/common.py":1897
 * 
 * 
 * def validate_pipeline_graph(pipeline_proto):             # <<<<<<<<<<<<<<
 *   """Ensures this is a correctly constructed Beam pipeline.
 *   """
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_5validate_pipeline_graph, 0, __pyx_n_s_validate_pipeline_graph, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__128)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_validate_pipeline_graph, __pyx_t_4) < 0) __PYX_ERR(0, 1897, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_Receiver(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_7__pyx_unpickle_Receiver, 0, __pyx_n_s_pyx_unpickle_Receiver, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__133)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Receiver, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_Receiver__set_state(<Receiver> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Receiver__set_state(Receiver __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_9__pyx_unpickle_MethodWrapper, 0, __pyx_n_s_pyx_unpickle_MethodWrapper, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__135)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_MethodWrapper, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_DoFnSignature(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11__pyx_unpickle_DoFnSignature, 0, __pyx_n_s_pyx_unpickle_DoFnSignature, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__137)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_DoFnSignature, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_DoFnSignature__set_state(<DoFnSignature> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DoFnSignature__set_state(DoFnSignature __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __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]
 *     if len(__pyx_state) > 14 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13__pyx_unpickle_DoFnInvoker, 0, __pyx_n_s_pyx_unpickle_DoFnInvoker, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__139)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_DoFnInvoker, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_SimpleInvoker(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_15__pyx_unpickle_SimpleInvoker, 0, __pyx_n_s_pyx_unpickle_SimpleInvoker, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__141)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_SimpleInvoker, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_SimpleInvoker__set_state(<SimpleInvoker> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_SimpleInvoker__set_state(SimpleInvoker __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.bundle_finalizer_param = __pyx_state[0]; __pyx_result.output_handler = __pyx_state[1]; __pyx_result.process_batch_method = __pyx_state[2]; __pyx_result.process_method = __pyx_state[3]; __pyx_result.signature = __pyx_state[4]; __pyx_result.user_state_context = __pyx_state[5]
 *     if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_17__pyx_unpickle_PerWindowInvoker, 0, __pyx_n_s_pyx_unpickle_PerWindowInvoker, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__143)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_PerWindowInvoker, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_DoFnRunner(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_19__pyx_unpickle_DoFnRunner, 0, __pyx_n_s_pyx_unpickle_DoFnRunner, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__145)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_DoFnRunner, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_DoFnRunner__set_state(<DoFnRunner> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DoFnRunner__set_state(DoFnRunner __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __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]
 *     if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_21__pyx_unpickle_OutputHandler, 0, __pyx_n_s_pyx_unpickle_OutputHandler, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__147)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_OutputHandler, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle__OutputHandler(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_23__pyx_unpickle__OutputHandler, 0, __pyx_n_s_pyx_unpickle__OutputHandler, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__148)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle__OutputHandler, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(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, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __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]
 *     if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_25__pyx_unpickle_DoFnContext, 0, __pyx_n_s_pyx_unpickle_DoFnContext, NULL, __pyx_n_s_apache_beam_runners_common, __pyx_d, ((PyObject *)__pyx_codeobj__150)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_DoFnContext, __pyx_t_4) < 0) __PYX_ERR(1, 1, __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_d, __pyx_n_s_test, __pyx_t_4) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_TraceReturn(Py_None, 0);

  /*--- Wrapped vars code ---*/

  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);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init apache_beam.runners.common", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    Py_CLEAR(__pyx_m);
  } 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;
  #elif PY_MAJOR_VERSION >= 3
  return __pyx_m;
  #else
  return;
  #endif
}

/* --- 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

/* PyObjectGetAttrStr */
#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);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
    if (unlikely(!result)) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

/* 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);
}

/* RaiseDoubleKeywords */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

/* ParseKeywords */
static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (**name == key) ? 0 :
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key);
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    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;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

/* PyErrFetchRestore */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    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);
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    *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

/* Profile */
#if CYTHON_PROFILE
static int __Pyx_TraceSetupAndCall(PyCodeObject** code,
                                   PyFrameObject** frame,
                                   PyThreadState* tstate,
                                   const char *funcname,
                                   const char *srcfile,
                                   int firstlineno) {
    PyObject *type, *value, *traceback;
    int retval;
    if (*frame == NULL || !CYTHON_PROFILE_REUSE_FRAME) {
        if (*code == NULL) {
            *code = __Pyx_createFrameCodeObject(funcname, srcfile, firstlineno);
            if (*code == NULL) return 0;
        }
        *frame = PyFrame_New(
            tstate,                          /*PyThreadState *tstate*/
            *code,                           /*PyCodeObject *code*/
            __pyx_d,                  /*PyObject *globals*/
            0                                /*PyObject *locals*/
        );
        if (*frame == NULL) return 0;
        if (CYTHON_TRACE && (*frame)->f_trace == NULL) {
            Py_INCREF(Py_None);
            (*frame)->f_trace = Py_None;
        }
#if PY_VERSION_HEX < 0x030400B1
    } else {
        (*frame)->f_tstate = tstate;
#endif
    }
    __Pyx_PyFrame_SetLineNumber(*frame, firstlineno);
    retval = 1;
    __Pyx_EnterTracing(tstate);
    __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
    #if CYTHON_TRACE
    if (tstate->c_tracefunc)
        retval = tstate->c_tracefunc(tstate->c_traceobj, *frame, PyTrace_CALL, NULL) == 0;
    if (retval && tstate->c_profilefunc)
    #endif
        retval = tstate->c_profilefunc(tstate->c_profileobj, *frame, PyTrace_CALL, NULL) == 0;
    __Pyx_LeaveTracing(tstate);
    if (retval) {
        __Pyx_ErrRestoreInState(tstate, type, value, traceback);
        return __Pyx_IsTracing(tstate, 0, 0) && retval;
    } else {
        Py_XDECREF(type);
        Py_XDECREF(value);
        Py_XDECREF(traceback);
        return -1;
    }
}
static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno) {
    PyCodeObject *py_code = 0;
#if PY_MAJOR_VERSION >= 3
    py_code = PyCode_NewEmpty(srcfile, funcname, firstlineno);
    if (likely(py_code)) {
        py_code->co_flags |= CO_OPTIMIZED | CO_NEWLOCALS;
    }
#else
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    py_funcname = PyString_FromString(funcname);
    if (unlikely(!py_funcname)) goto bad;
    py_srcfile = PyString_FromString(srcfile);
    if (unlikely(!py_srcfile)) goto bad;
    py_code = PyCode_New(
        0,
        0,
        0,
        CO_OPTIMIZED | CO_NEWLOCALS,
        __pyx_empty_bytes,     /*PyObject *code,*/
        __pyx_empty_tuple,     /*PyObject *consts,*/
        __pyx_empty_tuple,     /*PyObject *names,*/
        __pyx_empty_tuple,     /*PyObject *varnames,*/
        __pyx_empty_tuple,     /*PyObject *freevars,*/
        __pyx_empty_tuple,     /*PyObject *cellvars,*/
        py_srcfile,       /*PyObject *filename,*/
        py_funcname,      /*PyObject *name,*/
        firstlineno,
        __pyx_empty_bytes      /*PyObject *lnotab*/
    );
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
#endif
    return py_code;
}
#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);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_setattr))
        return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
#endif
    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

/* PyCFunctionFastCall */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
    PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
    PyObject *self = PyCFunction_GET_SELF(func);
    int flags = PyCFunction_GET_FLAGS(func);
    assert(PyCFunction_Check(func));
    assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
    assert(nargs >= 0);
    assert(nargs == 0 || args != NULL);
    /* _PyCFunction_FastCallDict() must not be called with an exception set,
       because it may clear it (directly or indirectly) and so the
       caller loses its exception */
    assert(!PyErr_Occurred());
    if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
        return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
    } else {
        return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
    }
}
#endif

/* PyFunctionFastCall */
#if CYTHON_FAST_PYCALL
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
                                               PyObject *globals) {
    PyFrameObject *f;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject **fastlocals;
    Py_ssize_t i;
    PyObject *result;
    assert(globals != NULL);
    /* XXX Perhaps we should create a specialized
       PyFrame_New() that doesn't take locals, but does
       take builtins without sanity checking them.
       */
    assert(tstate != NULL);
    f = PyFrame_New(tstate, co, globals, NULL);
    if (f == NULL) {
        return NULL;
    }
    fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
    for (i = 0; i < na; i++) {
        Py_INCREF(*args);
        fastlocals[i] = *args++;
    }
    result = PyEval_EvalFrameEx(f,0);
    ++tstate->recursion_depth;
    Py_DECREF(f);
    --tstate->recursion_depth;
    return result;
}
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
    PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
    PyObject *globals = PyFunction_GET_GLOBALS(func);
    PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
    PyObject *closure;
#if PY_MAJOR_VERSION >= 3
    PyObject *kwdefs;
#endif
    PyObject *kwtuple, **k;
    PyObject **d;
    Py_ssize_t nd;
    Py_ssize_t nk;
    PyObject *result;
    assert(kwargs == NULL || PyDict_Check(kwargs));
    nk = kwargs ? PyDict_Size(kwargs) : 0;
    if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
        return NULL;
    }
    if (
#if PY_MAJOR_VERSION >= 3
            co->co_kwonlyargcount == 0 &&
#endif
            likely(kwargs == NULL || nk == 0) &&
            co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
        if (argdefs == NULL && co->co_argcount == nargs) {
            result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
            goto done;
        }
        else if (nargs == 0 && argdefs != NULL
                 && co->co_argcount == Py_SIZE(argdefs)) {
            /* function called with no arguments, but all parameters have
               a default value: use default values as arguments .*/
            args = &PyTuple_GET_ITEM(argdefs, 0);
            result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
            goto done;
        }
    }
    if (kwargs != NULL) {
        Py_ssize_t pos, i;
        kwtuple = PyTuple_New(2 * nk);
        if (kwtuple == NULL) {
            result = NULL;
            goto done;
        }
        k = &PyTuple_GET_ITEM(kwtuple, 0);
        pos = i = 0;
        while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
            Py_INCREF(k[i]);
            Py_INCREF(k[i+1]);
            i += 2;
        }
        nk = i / 2;
    }
    else {
        kwtuple = NULL;
        k = NULL;
    }
    closure = PyFunction_GET_CLOSURE(func);
#if PY_MAJOR_VERSION >= 3
    kwdefs = PyFunction_GET_KW_DEFAULTS(func);
#endif
    if (argdefs != NULL) {
        d = &PyTuple_GET_ITEM(argdefs, 0);
        nd = Py_SIZE(argdefs);
    }
    else {
        d = NULL;
        nd = 0;
    }
#if PY_MAJOR_VERSION >= 3
    result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif
#endif

/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = Py_TYPE(func)->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall((char*)" 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

/* PyObjectCall2Args */
static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
    PyObject *args, *result = NULL;
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyFunction_FastCall(function, args, 2);
    }
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyCFunction_FastCall(function, args, 2);
    }
    #endif
    args = PyTuple_New(2);
    if (unlikely(!args)) goto done;
    Py_INCREF(arg1);
    PyTuple_SET_ITEM(args, 0, arg1);
    Py_INCREF(arg2);
    PyTuple_SET_ITEM(args, 1, arg2);
    Py_INCREF(function);
    result = __Pyx_PyObject_Call(function, args, NULL);
    Py_DECREF(args);
    Py_DECREF(function);
done:
    return result;
}

/* PyObjectCallMethO */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" 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

/* PyObjectCallOneArg */
#if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_New(1);
    if (unlikely(!args)) return NULL;
    Py_INCREF(arg);
    PyTuple_SET_ITEM(args, 0, arg);
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, &arg, 1);
    }
#endif
    if (likely(PyCFunction_Check(func))) {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
            return __Pyx_PyObject_CallMethO(func, arg);
#if CYTHON_FAST_PYCCALL
        } else if (__Pyx_PyFastCFunction_Check(func)) {
            return __Pyx_PyCFunction_FastCall(func, &arg, 1);
#endif
        }
    }
    return __Pyx__PyObject_CallOneArg(func, arg);
}
#else
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_Pack(1, arg);
    if (unlikely(!args)) return NULL;
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
#endif

/* RaiseException */
#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    __Pyx_PyThreadState_declare
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    if (PyType_Check(type)) {
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        type = (PyObject*) Py_TYPE(type);
        Py_INCREF(type);
        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: exception class must be a subclass of BaseException");
            goto raise_error;
        }
    }
    __Pyx_PyThreadState_assign
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else
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 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;
}
#endif

/* ArgTypeTest */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
{
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    else if (exact) {
        #if PY_MAJOR_VERSION == 2
        if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
        #endif
    }
    else {
        if (likely(__Pyx_TypeCheck(obj, type))) return 1;
    }
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
        name, type->tp_name, Py_TYPE(obj)->tp_name);
    return 0;
}

/* PyObjectCallNoArg */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, NULL, 0);
    }
#endif
#if defined(__Pyx_CyFunction_USED) && defined(NDEBUG)
    if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
#else
    if (likely(PyCFunction_Check(func)))
#endif
    {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
            return __Pyx_PyObject_CallMethO(func, NULL);
        }
    }
    return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
}
#endif

/* PyErrExceptionMatches */
#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);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    PyObject *exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
    if (unlikely(PyTuple_Check(err)))
        return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
}
#endif

/* GetAttr */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
#if CYTHON_USE_TYPE_SLOTS
#if PY_MAJOR_VERSION >= 3
    if (likely(PyUnicode_Check(n)))
#else
    if (likely(PyString_Check(n)))
#endif
        return __Pyx_PyObject_GetAttrStr(o, n);
#endif
    return PyObject_GetAttr(o, n);
}

/* GetAttr3 */
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;
}
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
    PyObject *r = __Pyx_GetAttr(o, n);
    return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
}

/* 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_AVOID_BORROWED_REFS
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
    result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    } else if (unlikely(PyErr_Occurred())) {
        return NULL;
    }
#else
    result = PyDict_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
#endif
#else
    result = PyObject_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__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");
}

/* IterFinish */
static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_FAST_THREAD_STATE
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
            PyObject *exc_value, *exc_tb;
            exc_value = tstate->curexc_value;
            exc_tb = tstate->curexc_traceback;
            tstate->curexc_type = 0;
            tstate->curexc_value = 0;
            tstate->curexc_traceback = 0;
            Py_DECREF(exc_type);
            Py_XDECREF(exc_value);
            Py_XDECREF(exc_tb);
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#else
    if (unlikely(PyErr_Occurred())) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#endif
}

/* 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();
}

/* HasAttr */
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
    PyObject *r;
    if (unlikely(!__Pyx_PyBaseString_Check(n))) {
        PyErr_SetString(PyExc_TypeError,
                        "hasattr(): attribute name must be string");
        return -1;
    }
    r = __Pyx_GetAttr(o, n);
    if (unlikely(!r)) {
        PyErr_Clear();
        return 0;
    } else {
        Py_DECREF(r);
        return 1;
    }
}

/* 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) {
#if CYTHON_USE_TYPE_SLOTS
    PyMappingMethods* mp;
#if PY_MAJOR_VERSION < 3
    PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
    if (likely(ms && ms->sq_slice)) {
        if (!has_cstart) {
            if (_py_start && (*_py_start != Py_None)) {
                cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
                if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstart = 0;
        }
        if (!has_cstop) {
            if (_py_stop && (*_py_stop != Py_None)) {
                cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
                if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstop = PY_SSIZE_T_MAX;
        }
        if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
            Py_ssize_t l = ms->sq_length(obj);
            if (likely(l >= 0)) {
                if (cstop < 0) {
                    cstop += l;
                    if (cstop < 0) cstop = 0;
                }
                if (cstart < 0) {
                    cstart += l;
                    if (cstart < 0) cstart = 0;
                }
            } else {
                if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                    goto bad;
                PyErr_Clear();
            }
        }
        return ms->sq_slice(obj, cstart, cstop);
    }
#endif
    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 = PyInt_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 = PyInt_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;
    }
    PyErr_Format(PyExc_TypeError,
        "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
bad:
    return NULL;
}

/* PyObjectGetMethod */
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
    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 PY_MAJOR_VERSION >= 3
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
        #endif
#else
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr)))
        #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 (descr != NULL) {
        *method = descr;
        return 0;
    }
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'%.50s' object has no attribute '%U'",
                 tp->tp_name, name);
#else
                 "'%.50s' object has no attribute '%.400s'",
                 tp->tp_name, PyString_AS_STRING(name));
#endif
    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;
}

/* PyObjectCallMethod0 */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
    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;
}

/* RaiseNoneIterError */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

/* UnpackTupleError */
static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
    if (t == Py_None) {
      __Pyx_RaiseNoneNotIterableError();
    } else if (PyTuple_GET_SIZE(t) < index) {
      __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t));
    } else {
      __Pyx_RaiseTooManyValuesError(index);
    }
}

/* UnpackTuple2 */
static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
        PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) {
    PyObject *value1 = NULL, *value2 = NULL;
#if CYTHON_COMPILING_IN_PYPY
    value1 = PySequence_ITEM(tuple, 0);  if (unlikely(!value1)) goto bad;
    value2 = 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_COMPILING_IN_PYPY
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 = Py_TYPE(iter)->tp_iternext;
    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 */
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;
#elif PY_MAJOR_VERSION >= 3
        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);
}
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_COMPILING_IN_PYPY
    if (source_is_dict) {
        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);
            PyTuple_SET_ITEM(tuple, 0, key);
            PyTuple_SET_ITEM(tuple, 1, value);
            *pitem = tuple;
        } else {
            if (pkey) {
                Py_INCREF(key);
                *pkey = key;
            }
            if (pvalue) {
                Py_INCREF(value);
                *pvalue = value;
            }
        }
        return 1;
    } else if (PyTuple_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyTuple_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else if (PyList_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyList_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } 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;
}

/* PyObjectFormatAndDecref */
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) {
    if (unlikely(!s)) return NULL;
    if (likely(PyUnicode_CheckExact(s))) return s;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyString_CheckExact(s))) {
        PyObject *result = PyUnicode_FromEncodedObject(s, NULL, "strict");
        Py_DECREF(s);
        return result;
    }
    #endif
    return __Pyx_PyObject_FormatAndDecref(s, f);
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) {
    PyObject *result = PyObject_Format(s, f);
    Py_DECREF(s);
    return result;
}

/* JoinPyUnicode */
static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
                                      CYTHON_UNUSED Py_UCS4 max_char) {
#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    PyObject *result_uval;
    int result_ukind;
    Py_ssize_t i, char_pos;
    void *result_udata;
#if CYTHON_PEP393_ENABLED
    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;
    result_udata = PyUnicode_DATA(result_uval);
#else
    result_uval = PyUnicode_FromUnicode(NULL, result_ulength);
    if (unlikely(!result_uval)) return NULL;
    result_ukind = sizeof(Py_UNICODE);
    result_udata = PyUnicode_AS_UNICODE(result_uval);
#endif
    char_pos = 0;
    for (i=0; i < value_count; i++) {
        int ukind;
        Py_ssize_t ulength;
        void *udata;
        PyObject *uval = PyTuple_GET_ITEM(value_tuple, i);
        if (unlikely(__Pyx_PyUnicode_READY(uval)))
            goto bad;
        ulength = __Pyx_PyUnicode_GET_LENGTH(uval);
        if (unlikely(!ulength))
            continue;
        if (unlikely(char_pos + ulength < 0))
            goto overflow;
        ukind = __Pyx_PyUnicode_KIND(uval);
        udata = __Pyx_PyUnicode_DATA(uval);
        if (!CYTHON_PEP393_ENABLED || ukind == result_ukind) {
            memcpy((char *)result_udata + char_pos * result_ukind, udata, (size_t) (ulength * result_ukind));
        } else {
            #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || 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
    result_ulength++;
    value_count++;
    return PyUnicode_Join(__pyx_empty_unicode, value_tuple);
#endif
}

/* GetTopmostException */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_type == NULL || exc_info->exc_type == 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
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    *type = exc_info->exc_type;
    *value = exc_info->exc_value;
    *tb = exc_info->exc_traceback;
    #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    #endif
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    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

/* ExtTypeTest */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (likely(__Pyx_TypeCheck(obj, type)))
        return 1;
    PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
                 Py_TYPE(obj)->tp_name, type->tp_name);
    return 0;
}

/* GetItemInt */
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (!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,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyList_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if 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)))) {
        PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     CYTHON_NCP_UNUSED int wraparound,
                                                     CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else 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)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return NULL;
                    PyErr_Clear();
                }
            }
            return m->sq_item(o, i);
        }
    }
#else
    if (is_list || PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_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;
    PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;
    if (unlikely(!(m && m->sq_item))) {
        PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);
        return NULL;
    }
    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);
    }
    if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
        PyErr_Clear();
        PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);
    }
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
    PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;
    if (likely(m && m->mp_subscript)) {
        return m->mp_subscript(obj, key);
    }
    return __Pyx_PyObject_GetIndex(obj, key);
}
#endif

/* None */
static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
}

/* CalculateMetaclass */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
    Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
    for (i=0; i < nbases; i++) {
        PyTypeObject *tmptype;
        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
        tmptype = Py_TYPE(tmp);
#if PY_MAJOR_VERSION < 3
        if (tmptype == &PyClass_Type)
            continue;
#endif
        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) {
#if PY_MAJOR_VERSION < 3
        metaclass = &PyClass_Type;
#else
        metaclass = &PyType_Type;
#endif
    }
    Py_INCREF((PyObject*) metaclass);
    return (PyObject*) metaclass;
}

/* FetchCommonType */
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
    PyObject* fake_module;
    PyTypeObject* cached_type = NULL;
    fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
    if (!fake_module) return NULL;
    Py_INCREF(fake_module);
    cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
    if (cached_type) {
        if (!PyType_Check((PyObject*)cached_type)) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s is not a type object",
                type->tp_name);
            goto bad;
        }
        if (cached_type->tp_basicsize != type->tp_basicsize) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s has the wrong size, try recompiling",
                type->tp_name);
            goto bad;
        }
    } else {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
        PyErr_Clear();
        if (PyType_Ready(type) < 0) goto bad;
        if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
            goto bad;
        Py_INCREF(type);
        cached_type = type;
    }
done:
    Py_DECREF(fake_module);
    return cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}

/* CythonFunctionShared */
#include <structmember.h>
static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
{
    if (unlikely(op->func_doc == NULL)) {
        if (op->func.m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3
            op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
#else
            op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
#endif
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp = op->func_doc;
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    op->func_doc = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    if (unlikely(op->func_name == NULL)) {
#if PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = op->func_name;
    Py_INCREF(value);
    op->func_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = op->func_qualname;
    Py_INCREF(value);
    op->func_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
{
    PyObject *self;
    self = m->func_closure;
    if (self == NULL)
        self = Py_None;
    Py_INCREF(self);
    return self;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *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;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
    if (unlikely(value == NULL)) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    tmp = op->func_dict;
    Py_INCREF(value);
    op->func_dict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    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 = PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = 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, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyTuple_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_tuple;
    op->defaults_tuple = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_kwdict;
    op->defaults_kwdict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value || value == Py_None) {
        value = NULL;
    } else if (!PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    tmp = op->func_annotations;
    op->func_annotations = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    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 PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
    {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
    {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
{
#if PY_MAJOR_VERSION >= 3
    Py_INCREF(m->func_qualname);
    return m->func_qualname;
#else
    return PyString_FromString(m->func.m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if PY_VERSION_HEX < 0x030500A0
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.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 (unlikely(op == NULL))
        return NULL;
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
    op->func.m_ml = ml;
    op->func.m_self = (PyObject *) op;
    Py_XINCREF(closure);
    op->func_closure = closure;
    Py_XINCREF(module);
    op->func.m_module = module;
    op->func_dict = NULL;
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
    op->func_classobj = NULL;
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults_size = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
    Py_CLEAR(m->func.m_module);
    Py_CLEAR(m->func_dict);
    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);
    Py_CLEAR(m->func_classobj);
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyObject_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    PyObject_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)
{
    Py_VISIT(m->func_closure);
    Py_VISIT(m->func.m_module);
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    Py_VISIT(m->func_code);
    Py_VISIT(m->func_classobj);
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_VISIT(pydefaults[i]);
    }
    return 0;
}
static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
{
#if PY_MAJOR_VERSION < 3
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
        Py_INCREF(func);
        return func;
    }
    if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
        if (type == NULL)
            type = (PyObject *)(Py_TYPE(obj));
        return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
    }
    if (obj == Py_None)
        obj = NULL;
#endif
    return __Pyx_PyMethod_New(func, obj, type);
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(op->func_qualname), (void *)op);
#endif
}
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    Py_ssize_t size;
    switch (f->m_ml->ml_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*)meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 0))
                return (*meth)(self, NULL);
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 1)) {
                PyObject *result, *arg0;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                arg0 = PyTuple_GET_ITEM(arg, 0);
                #else
                arg0 = 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;
            }
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags in "
                        "__Pyx_CyFunction_Call. METH_OLDARGS is no "
                        "longer supported!");
        return NULL;
    }
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
    return NULL;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
}
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
    PyObject *result;
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        Py_ssize_t argc;
        PyObject *new_args;
        PyObject *self;
        argc = PyTuple_GET_SIZE(args);
        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);
#if PY_MAJOR_VERSION > 2
            PyErr_Format(PyExc_TypeError,
                         "unbound method %.200S() needs an argument",
                         cyfunc->func_qualname);
#else
            PyErr_SetString(PyExc_TypeError,
                            "unbound method needs an argument");
#endif
            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;
}
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
    (destructor) __Pyx_CyFunction_dealloc,
    0,
    0,
    0,
#if PY_MAJOR_VERSION < 3
    0,
#else
    0,
#endif
    (reprfunc) __Pyx_CyFunction_repr,
    0,
    0,
    0,
    0,
    __Pyx_CyFunction_CallAsMethod,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
    0,
    (traverseproc) __Pyx_CyFunction_traverse,
    (inquiry) __Pyx_CyFunction_clear,
    0,
#if PY_VERSION_HEX < 0x030500A0
    offsetof(__pyx_CyFunctionObject, func_weakreflist),
#else
    offsetof(PyCFunctionObject, m_weakreflist),
#endif
    0,
    0,
    __pyx_CyFunction_methods,
    __pyx_CyFunction_members,
    __pyx_CyFunction_getsets,
    0,
    0,
    __Pyx_CyFunction_descr_get,
    0,
    offsetof(__pyx_CyFunctionObject, func_dict),
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
    0,
#endif
#if PY_VERSION_HEX >= 0x030C0000
    0,
#endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0,
#endif
};
static int __pyx_CyFunction_init(void) {
    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
    if (unlikely(__pyx_CyFunctionType == NULL)) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyObject_Malloc(size);
    if (unlikely(!m->defaults))
        return PyErr_NoMemory();
    memset(m->defaults, 0, size);
    m->defaults_pyobjects = pyobjects;
    m->defaults_size = size;
    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_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_GetAttrStr(metaclass, __pyx_n_s_prepare);
        if (prep) {
            PyObject *pargs = PyTuple_Pack(2, name, bases);
            if (unlikely(!pargs)) {
                Py_DECREF(prep);
                return NULL;
            }
            ns = PyObject_Call(prep, pargs, mkw);
            Py_DECREF(prep);
            Py_DECREF(pargs);
        } else {
            if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
                return NULL;
            PyErr_Clear();
            ns = PyDict_New();
        }
    } else {
        ns = PyDict_New();
    }
    if (unlikely(!ns))
        return NULL;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
    if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_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, *margs;
    PyObject *owned_metaclass = NULL;
    if (allow_py2_metaclass) {
        owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_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;
    }
    margs = PyTuple_Pack(3, name, bases, dict);
    if (unlikely(!margs)) {
        result = NULL;
    } else {
        result = PyObject_Call(metaclass, margs, mkw);
        Py_DECREF(margs);
    }
    Py_XDECREF(owned_metaclass);
    return result;
}

/* PyObjectCallMethod1 */
static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
    PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
    Py_DECREF(method);
    return result;
}
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
    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);
}

/* 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_n_s_append, x);
        if (unlikely(!retval))
            return -1;
        Py_DECREF(retval);
    }
    return 0;
}

/* IterNext */
static PyObject *__Pyx_PyIter_Next2Default(PyObject* defval) {
    PyObject* exc_type;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    exc_type = __Pyx_PyErr_Occurred();
    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) {
    PyErr_Format(PyExc_TypeError,
        "%.200s object is not an iterator", Py_TYPE(iterator)->tp_name);
}
static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject* iterator, PyObject* defval) {
    PyObject* next;
    iternextfunc iternext = Py_TYPE(iterator)->tp_iternext;
    if (likely(iternext)) {
#if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
        next = iternext(iterator);
        if (likely(next))
            return next;
        #if PY_VERSION_HEX >= 0x02070000 && CYTHON_COMPILING_IN_CPYTHON
        if (unlikely(iternext == &_PyObject_NextNotImplemented))
            return NULL;
        #endif
#else
        next = PyIter_Next(iterator);
        if (likely(next))
            return next;
#endif
    } else if (CYTHON_USE_TYPE_SLOTS || unlikely(!PyIter_Check(iterator))) {
        __Pyx_PyIter_Next_ErrorNoIterator(iterator);
        return NULL;
    }
#if !CYTHON_USE_TYPE_SLOTS
    else {
        next = PyIter_Next(iterator);
        if (likely(next))
            return next;
    }
#endif
    return __Pyx_PyIter_Next2Default(defval);
}

/* 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, *local_value, *local_tb;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    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;
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    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 PY_MAJOR_VERSION >= 3
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
    #endif
    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;
        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;
    }
    #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);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
    (void)inplace;
    (void)zerodivision_check;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            x = (long)((unsigned long)a + b);
            if (likely((x^a) >= 0 || (x^b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } 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]));
                        break;
#ifdef HAVE_LONG_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]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_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]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                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]));
                        break;
#ifdef HAVE_LONG_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]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                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]));
                        break;
#ifdef HAVE_LONG_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]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                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]));
                        break;
#ifdef HAVE_LONG_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]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                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]));
                        break;
#ifdef HAVE_LONG_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]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            double result;
            PyFPE_START_PROTECT("add", return NULL)
            result = ((double)a) + (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#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
    _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

/* PyIntCompare */
static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) {
    if (op1 == op2) {
        Py_RETURN_TRUE;
    }
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = Py_SIZE(op1);
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        if (intval == 0) {
            if (size == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
        } else if (intval < 0) {
            if (size >= 0)
                Py_RETURN_FALSE;
            intval = -intval;
            size = -size;
        } else {
            if (size <= 0)
                Py_RETURN_FALSE;
        }
        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 = PyFloat_AS_DOUBLE(op1);
        if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    return (
        PyObject_RichCompare(op1, op2, Py_EQ));
}

/* None */
static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
}

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
    (void)inplace;
    (void)zerodivision_check;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            x = (long)((unsigned long)a - b);
            if (likely((x^a) >= 0 || (x^~b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } 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]));
                        break;
#ifdef HAVE_LONG_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]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_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]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                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]));
                        break;
#ifdef HAVE_LONG_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]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                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]));
                        break;
#ifdef HAVE_LONG_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]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                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]));
                        break;
#ifdef HAVE_LONG_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]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                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]));
                        break;
#ifdef HAVE_LONG_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]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
            }
        }
                x = a - b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla - llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            double result;
            PyFPE_START_PROTECT("subtract", return NULL)
            result = ((double)a) - (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
}
#endif

/* Import */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (!py_import)
        goto bad;
    #endif
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
                module = PyImport_ImportModuleLevelObject(
                    name, global_dict, empty_dict, list, 1);
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_MAJOR_VERSION < 3
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, global_dict, empty_dict, list, level);
            #endif
        }
    }
bad:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_import);
    #endif
    Py_XDECREF(empty_list);
    Py_XDECREF(empty_dict);
    return module;
}

/* ImportFrom */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Format(PyExc_ImportError,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

/* CallNextTpTraverse */
static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) {
    PyTypeObject* type = Py_TYPE(obj);
    while (type && type->tp_traverse != current_tp_traverse)
        type = type->tp_base;
    while (type && type->tp_traverse == current_tp_traverse)
        type = type->tp_base;
    if (type && type->tp_traverse)
        return type->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);
    while (type && type->tp_clear != current_tp_clear)
        type = type->tp_base;
    while (type && type->tp_clear == current_tp_clear)
        type = type->tp_base;
    if (type && type->tp_clear)
        type->tp_clear(obj);
}

/* PyObject_GenericGetAttrNoDict */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'%.50s' object has no attribute '%U'",
                 tp->tp_name, attr_name);
#else
                 "'%.50s' object has no attribute '%.400s'",
                 tp->tp_name, PyString_AS_STRING(attr_name));
#endif
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
    PyObject *descr;
    PyTypeObject *tp = Py_TYPE(obj);
    if (unlikely(!PyString_Check(attr_name))) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    assert(!tp->tp_dictoffset);
    descr = _PyType_Lookup(tp, attr_name);
    if (unlikely(!descr)) {
        return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
    }
    Py_INCREF(descr);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
    #endif
    {
        descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
        if (unlikely(f)) {
            PyObject *res = f(descr, obj, (PyObject *)tp);
            Py_DECREF(descr);
            return res;
        }
    }
    return descr;
}
#endif

/* PyObject_GenericGetAttr */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
    if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
}
#endif

/* SetVTable */
static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
#if PY_VERSION_HEX >= 0x02070000
    PyObject *ob = PyCapsule_New(vtable, 0, 0);
#else
    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
#endif
    if (!ob)
        goto bad;
    if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

/* PyObjectGetAttrStrNoError */
static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        __Pyx_PyErr_Clear();
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
    PyObject *result;
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
    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;
}

/* SetupReduce */
static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
  int ret;
  PyObject *name_attr;
  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_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_n_s_getstate);
#else
    getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate);
    if (!getstate && PyErr_Occurred()) {
        goto __PYX_BAD;
    }
#endif
    if (getstate) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate);
#else
        object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_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_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#else
    object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#endif
    reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_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_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#else
        object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#endif
        reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
        if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
            reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
            if (likely(reduce_cython)) {
                ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
            } else if (reduce == object_reduce || PyErr_Occurred()) {
                goto __PYX_BAD;
            }
            setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
            if (!setstate) PyErr_Clear();
            if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
                setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
                if (likely(setstate_cython)) {
                    ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                    ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_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())
        PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_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_0_29_36
#define __PYX_HAVE_RT_ImportType_0_29_36
static PyTypeObject *__Pyx_ImportType_0_29_36(PyObject *module, const char *module_name, const char *class_name,
    size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_0_29_36 check_size)
{
    PyObject *result = 0;
    char warning[200];
    Py_ssize_t basicsize;
    Py_ssize_t itemsize;
#ifdef Py_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;
    }
#ifndef Py_LIMITED_API
    basicsize = ((PyTypeObject *)result)->tp_basicsize;
    itemsize = ((PyTypeObject *)result)->tp_itemsize;
#else
    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);
        goto bad;
    }
    if (check_size == __Pyx_ImportType_CheckSize_Error_0_29_36 && (size_t)basicsize != 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);
        goto bad;
    }
    else if (check_size == __Pyx_ImportType_CheckSize_Warn_0_29_36 && (size_t)basicsize > size) {
        PyOS_snprintf(warning, sizeof(warning),
            "%s.%s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(result);
    return NULL;
}
#endif

/* GetVTable */
static void* __Pyx_GetVtable(PyObject *dict) {
    void* ptr;
    PyObject *ob = PyObject_GetItem(dict, __pyx_n_s_pyx_vtable);
    if (!ob)
        goto bad;
#if PY_VERSION_HEX >= 0x02070000
    ptr = PyCapsule_GetPointer(ob, 0);
#else
    ptr = PyCObject_AsVoidPtr(ob);
#endif
    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;
}

/* GetNameInClass */
static PyObject *__Pyx_GetGlobalNameAfterAttributeLookup(PyObject *name) {
    PyObject *result;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        return NULL;
    __Pyx_PyErr_Clear();
    __Pyx_GetModuleGlobalNameUncached(result, name);
    return result;
}
static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) {
    PyObject *result;
    result = __Pyx_PyObject_GetAttrStr(nmspace, name);
    if (!result) {
        result = __Pyx_GetGlobalNameAfterAttributeLookup(name);
    }
    return result;
}

/* CLineInTraceback */
#ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    if (unlikely(!__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, *cython_runtime_dict,
            __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
    } else
#endif
    {
      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
      if (use_cline_obj) {
        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
        Py_DECREF(use_cline_obj);
      } else {
        PyErr_Clear();
        use_cline = NULL;
      }
    }
    if (!use_cline) {
        c_line = 0;
        (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
    }
    else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache */
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 PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_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(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

/* AddTraceback */
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
#if PY_VERSION_HEX >= 0x030b00a6
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
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 PY_MAJOR_VERSION < 3
    PyObject *py_srcfile = NULL;
    py_srcfile = PyString_FromString(filename);
    if (!py_srcfile) goto bad;
    #endif
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        #else
        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;
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        if (!py_funcname) goto bad;
        #endif
    }
    #if PY_MAJOR_VERSION < 3
    py_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    #else
    py_code = PyCode_NewEmpty(filename, funcname, py_line);
    #endif
    Py_XDECREF(py_funcname);  // XDECREF since it's only set on Py3 if cline
    return py_code;
bad:
    Py_XDECREF(py_funcname);
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_srcfile);
    #endif
    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_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);
}

/* 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_PyInt_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 PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(long) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
                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))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
                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))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            long val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (long) -1;
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        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_PyInt_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 PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } 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 PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_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 PyInt_FromLong((long) value);
        } else if (sizeof(int64_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } 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 PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int64_t),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
static CYTHON_INLINE int64_t __Pyx_PyInt_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 PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int64_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int64_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int64_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int64_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int64_t, digit, digits[0])
                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))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int64_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int64_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int64_t,  digit, +digits[0])
                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))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int64_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int64_t val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int64_t) -1;
        }
    } else {
        int64_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int64_t) -1;
        val = __Pyx_PyInt_As_int64_t(tmp);
        Py_DECREF(tmp);
        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 int __Pyx_PyInt_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 PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
                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))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
                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))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        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 = a->tp_base;
        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);
}
#if PY_MAJOR_VERSION == 2
static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
    PyObject *exception, *value, *tb;
    int res;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&exception, &value, &tb);
    res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
    if (unlikely(res == -1)) {
        PyErr_WriteUnraisable(err);
        res = 0;
    }
    if (!res) {
        res = PyObject_IsSubclass(err, exc_type2);
        if (unlikely(res == -1)) {
            PyErr_WriteUnraisable(err);
            res = 0;
        }
    }
    __Pyx_ErrRestore(exception, value, tb);
    return res;
}
#else
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
    if (!res) {
        res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
    return res;
}
#endif
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);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        #if PY_MAJOR_VERSION < 3
        if (likely(exc_type == t)) return 1;
        #endif
        if (likely(PyExceptionClass_Check(t))) {
            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
        } else {
        }
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        if (likely(PyExceptionClass_Check(exc_type))) {
            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
        } else if (likely(PyTuple_Check(exc_type))) {
            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
        } else {
        }
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    assert(PyExceptionClass_Check(exc_type1));
    assert(PyExceptionClass_Check(exc_type2));
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* CoroutineBase */
#include <structmember.h>
#include <frameobject.h>
#if PY_VERSION_HEX >= 0x030b00a6
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
#define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject **pvalue) {
    PyObject *et, *ev, *tb;
    PyObject *value = NULL;
    __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;
        }
#if PY_VERSION_HEX >= 0x030300A0
        else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
            value = ((PyStopIterationObject *)ev)->value;
            Py_INCREF(value);
            Py_DECREF(ev);
        }
#endif
        else if (unlikely(PyTuple_Check(ev))) {
            if (PyTuple_GET_SIZE(ev) >= 1) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                value = PyTuple_GET_ITEM(ev, 0);
                Py_INCREF(value);
#else
                value = PySequence_ITEM(ev, 0);
#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 PY_VERSION_HEX >= 0x030300A0
    value = ((PyStopIterationObject *)ev)->value;
    Py_INCREF(value);
    Py_DECREF(ev);
#else
    {
        PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
        Py_DECREF(ev);
        if (likely(args)) {
            value = PySequence_GetItem(args, 0);
            Py_DECREF(args);
        }
        if (unlikely(!value)) {
            __Pyx_ErrRestore(NULL, NULL, NULL);
            Py_INCREF(Py_None);
            value = Py_None;
        }
    }
#endif
    *pvalue = value;
    return 0;
}
static CYTHON_INLINE
void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) {
    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);
}
#define __Pyx_Coroutine_AlreadyRunningError(gen)  (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) {
    const char *msg;
    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);
}
#define __Pyx_Coroutine_NotStartedError(gen)  (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) {
    const char *msg;
    if ((0)) {
    #ifdef __Pyx_Coroutine_USED
    } else if (__Pyx_Coroutine_Check(gen)) {
        msg = "can't send non-None value to a just-started coroutine";
    #endif
    #ifdef __Pyx_AsyncGen_USED
    } else if (__Pyx_AsyncGen_CheckExact(gen)) {
        msg = "can't send non-None value to a just-started async generator";
    #endif
    } else {
        msg = "can't send non-None value to a just-started generator";
    }
    PyErr_SetString(PyExc_TypeError, msg);
}
#define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing)  (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
static void __Pyx__Coroutine_AlreadyTerminatedError(CYTHON_UNUSED PyObject *gen, PyObject *value, CYTHON_UNUSED int 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(__Pyx_PyExc_StopAsyncIteration);
        else
        #endif
        PyErr_SetNone(PyExc_StopIteration);
    }
}
static
PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) {
    __Pyx_PyThreadState_declare
    PyThreadState *tstate;
    __Pyx_ExcInfoStruct *exc_state;
    PyObject *retval;
    assert(!self->is_running);
    if (unlikely(self->resume_label == 0)) {
        if (unlikely(value && value != Py_None)) {
            return __Pyx_Coroutine_NotStartedError((PyObject*)self);
        }
    }
    if (unlikely(self->resume_label == -1)) {
        return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
    }
#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_type) {
        #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
        #else
        if (exc_state->exc_traceback) {
            PyTracebackObject *tb = (PyTracebackObject *) exc_state->exc_traceback;
            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
        }
        #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
    self->is_running = 1;
    retval = self->body((PyObject *) self, tstate, value);
    self->is_running = 0;
#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
    return retval;
}
static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) {
    PyObject *exc_tb = exc_state->exc_traceback;
    if (likely(exc_tb)) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
#else
        PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
        PyFrameObject *f = tb->tb_frame;
        Py_CLEAR(f->f_back);
#endif
    }
}
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *retval) {
    if (unlikely(!retval)) {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        if (!__Pyx_PyErr_Occurred()) {
            PyObject *exc = PyExc_StopIteration;
            #ifdef __Pyx_AsyncGen_USED
            if (__Pyx_AsyncGen_CheckExact(gen))
                exc = __Pyx_PyExc_StopAsyncIteration;
            #endif
            __Pyx_PyErr_SetNone(exc);
        }
    }
    return retval;
}
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
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 {
            _PyGen_SetStopIterationValue(result);
        }
        Py_CLEAR(result);
    }
    return result;
#endif
}
#endif
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
    PyObject *ret;
    PyObject *val = NULL;
    __Pyx_Coroutine_Undelegate(gen);
    __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
    ret = __Pyx_Coroutine_SendEx(gen, val, 0);
    Py_XDECREF(val);
    return ret;
}
static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
    PyObject *retval;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        #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 && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyGen_CheckExact(yf)) {
            ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyCoro_CheckExact(yf)) {
            ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
        } else
        #endif
        {
            if (value == Py_None)
                ret = Py_TYPE(yf)->tp_iternext(yf);
            else
                ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
        }
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        retval = __Pyx_Coroutine_FinishDelegation(gen);
    } else {
        retval = __Pyx_Coroutine_SendEx(gen, value, 0);
    }
    return __Pyx_Coroutine_MethodReturn(self, retval);
}
static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
    PyObject *retval = NULL;
    int err = 0;
    #ifdef __Pyx_Generator_USED
    if (__Pyx_Generator_CheckExact(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    #endif
    #ifdef __Pyx_Coroutine_USED
    if (__Pyx_Coroutine_Check(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    if (__Pyx_CoroutineAwait_CheckExact(yf)) {
        retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf, NULL);
        if (!retval)
            return -1;
    } else
    #endif
    #ifdef __Pyx_AsyncGen_USED
    if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
        retval = __Pyx_async_gen_asend_close(yf, NULL);
    } else
    if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
        retval = __Pyx_async_gen_athrow_close(yf, NULL);
    } else
    #endif
    {
        PyObject *meth;
        gen->is_running = 1;
        meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
        if (unlikely(!meth)) {
            if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                PyErr_WriteUnraisable(yf);
            }
            PyErr_Clear();
        } else {
            retval = PyObject_CallFunction(meth, NULL);
            Py_DECREF(meth);
            if (!retval)
                err = -1;
        }
        gen->is_running = 0;
    }
    Py_XDECREF(retval);
    return err;
}
static PyObject *__Pyx_Generator_Next(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Generator_Next(yf);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyGen_CheckExact(yf)) {
            ret = __Pyx_PyGen_Send((PyGenObject*)yf, NULL);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_Check(yf)) {
            ret = __Pyx_Coroutine_Send(yf, Py_None);
        } else
        #endif
            ret = Py_TYPE(yf)->tp_iternext(yf);
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        return __Pyx_Coroutine_FinishDelegation(gen);
    }
    return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
}
static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, CYTHON_UNUSED PyObject *arg) {
    return __Pyx_Coroutine_Close(self);
}
static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *retval, *raised_exception;
    PyObject *yf = gen->yieldfrom;
    int err = 0;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    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);
    retval = __Pyx_Coroutine_SendEx(gen, NULL, 1);
    if (unlikely(retval)) {
        const char *msg;
        Py_DECREF(retval);
        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)) {
#if PY_VERSION_HEX < 0x03060000
            msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
#else
            msg = "async generator ignored GeneratorExit";
#endif
        #endif
        } else {
            msg = "generator ignored GeneratorExit";
        }
        PyErr_SetString(PyExc_RuntimeError, msg);
        return NULL;
    }
    raised_exception = PyErr_Occurred();
    if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
        if (raised_exception) PyErr_Clear();
        Py_INCREF(Py_None);
        return Py_None;
    }
    return NULL;
}
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 = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        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)
                return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
            goto throw_here;
        }
        gen->is_running = 1;
        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_GetAttrStr(yf, __pyx_n_s_throw);
            if (unlikely(!meth)) {
                Py_DECREF(yf);
                if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                    gen->is_running = 0;
                    return NULL;
                }
                PyErr_Clear();
                __Pyx_Coroutine_Undelegate(gen);
                gen->is_running = 0;
                goto throw_here;
            }
            if (likely(args)) {
                ret = PyObject_CallObject(meth, args);
            } else {
                ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb, NULL);
            }
            Py_DECREF(meth);
        }
        gen->is_running = 0;
        Py_DECREF(yf);
        if (!ret) {
            ret = __Pyx_Coroutine_FinishDelegation(gen);
        }
        return __Pyx_Coroutine_MethodReturn(self, ret);
    }
throw_here:
    __Pyx_Raise(typ, val, tb, NULL);
    return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
}
static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
    PyObject *typ;
    PyObject *val = NULL;
    PyObject *tb = NULL;
    if (!PyArg_UnpackTuple(args, (char *)"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) {
    Py_VISIT(exc_state->exc_type);
    Py_VISIT(exc_state->exc_value);
    Py_VISIT(exc_state->exc_traceback);
    return 0;
}
static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
    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);
    Py_CLEAR(gen->yieldfrom);
    __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 (gen->gi_weakreflist != NULL)
        PyObject_ClearWeakRefs(self);
    if (gen->resume_label >= 0) {
        PyObject_GC_Track(self);
#if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE
        if (PyObject_CallFinalizerFromDealloc(self))
#else
        Py_TYPE(gen)->tp_del(self);
        if (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);
    PyObject_GC_Del(gen);
}
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;
    }
#if !CYTHON_USE_TP_FINALIZE
    assert(self->ob_refcnt == 0);
    __Pyx_SET_REFCNT(self, 1);
#endif
    __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 PY_MAJOR_VERSION >= 3  || defined(PyErr_WarnFormat)
        if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
            PyErr_WriteUnraisable(self);
#else
        {PyObject *msg;
        char *cmsg;
        #if CYTHON_COMPILING_IN_PYPY
        msg = NULL;
        cmsg = (char*) "coroutine was never awaited";
        #else
        char *cname;
        PyObject *qualname;
        qualname = gen->gi_qualname;
        cname = PyString_AS_STRING(qualname);
        msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname);
        if (unlikely(!msg)) {
            PyErr_Clear();
            cmsg = (char*) "coroutine was never awaited";
        } else {
            cmsg = PyString_AS_STRING(msg);
        }
        #endif
        if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
            PyErr_WriteUnraisable(self);
        Py_XDECREF(msg);}
#endif
        PyObject_GC_Track(self);
        }
#endif
    } else {
        PyObject *res = __Pyx_Coroutine_Close(self);
        if (unlikely(!res)) {
            if (PyErr_Occurred())
                PyErr_WriteUnraisable(self);
        } else {
            Py_DECREF(res);
        }
    }
    __Pyx_ErrRestore(error_type, error_value, error_traceback);
#if !CYTHON_USE_TP_FINALIZE
    assert(Py_REFCNT(self) > 0);
    if (--self->ob_refcnt == 0) {
        return;
    }
    {
        Py_ssize_t refcnt = Py_REFCNT(self);
        _Py_NewReference(self);
        __Pyx_SET_REFCNT(self, refcnt);
    }
#if CYTHON_COMPILING_IN_CPYTHON
    assert(PyType_IS_GC(Py_TYPE(self)) &&
           _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
    _Py_DEC_REFTOTAL;
#endif
#ifdef COUNT_ALLOCS
    --Py_TYPE(self)->tp_frees;
    --Py_TYPE(self)->tp_allocs;
#endif
#endif
}
static PyObject *
__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
{
    PyObject *name = self->gi_name;
    if (unlikely(!name)) name = Py_None;
    Py_INCREF(name);
    return name;
}
static int
__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = self->gi_name;
    Py_INCREF(value);
    self->gi_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
{
    PyObject *name = self->gi_qualname;
    if (unlikely(!name)) name = Py_None;
    Py_INCREF(name);
    return name;
}
static int
__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = self->gi_qualname;
    Py_INCREF(value);
    self->gi_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_Coroutine_get_frame(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
{
    PyObject *frame = self->gi_frame;
    if (!frame) {
        if (unlikely(!self->gi_code)) {
            Py_RETURN_NONE;
        }
        frame = (PyObject *) PyFrame_New(
            PyThreadState_Get(),            /*PyThreadState *tstate,*/
            (PyCodeObject*) self->gi_code,  /*PyCodeObject *code,*/
            __pyx_d,                 /*PyObject *globals,*/
            0                               /*PyObject *locals*/
        );
        if (unlikely(!frame))
            return NULL;
        self->gi_frame = frame;
    }
    Py_INCREF(frame);
    return frame;
}
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->gi_exc_state.exc_type = NULL;
    gen->gi_exc_state.exc_value = NULL;
    gen->gi_exc_state.exc_traceback = NULL;
#if CYTHON_USE_EXC_INFO_STACK
    gen->gi_exc_state.previous_item = NULL;
#endif
    gen->gi_weakreflist = NULL;
    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;
}

/* PatchModuleWithCoroutine */
static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    int result;
    PyObject *globals, *result_obj;
    globals = PyDict_New();  if (unlikely(!globals)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_coroutine_type",
    #ifdef __Pyx_Coroutine_USED
        (PyObject*)__pyx_CoroutineType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_generator_type",
    #ifdef __Pyx_Generator_USED
        (PyObject*)__pyx_GeneratorType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
    result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
    if (unlikely(!result_obj)) goto ignore;
    Py_DECREF(result_obj);
    Py_DECREF(globals);
    return module;
ignore:
    Py_XDECREF(globals);
    PyErr_WriteUnraisable(module);
    if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
        Py_DECREF(module);
        module = NULL;
    }
#else
    py_code++;
#endif
    return module;
}

/* PatchGeneratorABC */
#ifndef CYTHON_REGISTER_ABCS
#define CYTHON_REGISTER_ABCS 1
#endif
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
static PyObject* __Pyx_patch_abc_module(PyObject *module);
static PyObject* __Pyx_patch_abc_module(PyObject *module) {
    module = __Pyx_Coroutine_patch_module(
        module, ""
"if _cython_generator_type is not None:\n"
"    try: Generator = _module.Generator\n"
"    except AttributeError: pass\n"
"    else: Generator.register(_cython_generator_type)\n"
"if _cython_coroutine_type is not None:\n"
"    try: Coroutine = _module.Coroutine\n"
"    except AttributeError: pass\n"
"    else: Coroutine.register(_cython_coroutine_type)\n"
    );
    return module;
}
#endif
static int __Pyx_patch_abc(void) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    static int abc_patched = 0;
    if (CYTHON_REGISTER_ABCS && !abc_patched) {
        PyObject *module;
        module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections");
        if (!module) {
            PyErr_WriteUnraisable(NULL);
            if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
                    ((PY_MAJOR_VERSION >= 3) ?
                        "Cython module failed to register with collections.abc module" :
                        "Cython module failed to register with collections module"), 1) < 0)) {
                return -1;
            }
        } else {
            module = __Pyx_patch_abc_module(module);
            abc_patched = 1;
            if (unlikely(!module))
                return -1;
            Py_DECREF(module);
        }
        module = PyImport_ImportModule("backports_abc");
        if (module) {
            module = __Pyx_patch_abc_module(module);
            Py_XDECREF(module);
        }
        if (!module) {
            PyErr_Clear();
        }
    }
#else
    if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL);
#endif
    return 0;
}

/* Generator */
static PyMethodDef __pyx_Generator_methods[] = {
    {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
     (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
    {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
     (char*) 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,
     (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
    {0, 0, 0, 0}
};
static PyMemberDef __pyx_Generator_memberlist[] = {
    {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
    {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
     (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
    {(char*) "gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL},
    {0, 0, 0, 0, 0}
};
static PyGetSetDef __pyx_Generator_getsets[] = {
    {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
     (char*) PyDoc_STR("name of the generator"), 0},
    {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
     (char*) PyDoc_STR("qualified name of the generator"), 0},
    {(char *) "gi_frame", (getter)__Pyx_Coroutine_get_frame, NULL,
     (char*) PyDoc_STR("Frame of the generator"), 0},
    {0, 0, 0, 0, 0}
};
static PyTypeObject __pyx_GeneratorType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "generator",
    sizeof(__pyx_CoroutineObject),
    0,
    (destructor) __Pyx_Coroutine_dealloc,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
    0,
    (traverseproc) __Pyx_Coroutine_traverse,
    0,
    0,
    offsetof(__pyx_CoroutineObject, gi_weakreflist),
    0,
    (iternextfunc) __Pyx_Generator_Next,
    __pyx_Generator_methods,
    __pyx_Generator_memberlist,
    __pyx_Generator_getsets,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if CYTHON_USE_TP_FINALIZE
    0,
#else
    __Pyx_Coroutine_del,
#endif
    0,
#if CYTHON_USE_TP_FINALIZE
    __Pyx_Coroutine_del,
#elif PY_VERSION_HEX >= 0x030400a1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
    0,
#endif
#if PY_VERSION_HEX >= 0x030C0000
    0,
#endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0,
#endif
};
static int __pyx_Generator_init(void) {
    __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
    __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
    __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
    if (unlikely(!__pyx_GeneratorType)) {
        return -1;
    }
    return 0;
}

/* CheckBinaryVersion */
static int __Pyx_check_binary_version(void) {
    char ctversion[5];
    int same=1, i, found_dot;
    const char* rt_from_call = Py_GetVersion();
    PyOS_snprintf(ctversion, 5, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    found_dot = 0;
    for (i = 0; i < 4; i++) {
        if (!ctversion[i]) {
            same = (rt_from_call[i] < '0' || rt_from_call[i] > '9');
            break;
        }
        if (rt_from_call[i] != ctversion[i]) {
            same = 0;
            break;
        }
    }
    if (!same) {
        char rtversion[5] = {'\0'};
        char message[200];
        for (i=0; i<4; ++i) {
            if (rt_from_call[i] == '.') {
                if (found_dot) break;
                found_dot = 1;
            } else if (rt_from_call[i] < '0' || rt_from_call[i] > '9') {
                break;
            }
            rtversion[i] = rt_from_call[i];
        }
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        return PyErr_WarnEx(NULL, message, 1);
    }
    return 0;
}

/* VoidPtrExport */
static int __Pyx_ExportVoidPtr(PyObject *name, void *p, const char *sig) {
    PyObject *d;
    PyObject *cobj = 0;
    d = PyDict_GetItem(__pyx_d, __pyx_n_s_pyx_capi);
    Py_XINCREF(d);
    if (!d) {
        d = PyDict_New();
        if (!d)
            goto bad;
        if (__Pyx_PyObject_SetAttrStr(__pyx_m, __pyx_n_s_pyx_capi, d) < 0)
            goto bad;
    }
#if PY_VERSION_HEX >= 0x02070000
    cobj = PyCapsule_New(p, sig, 0);
#else
    cobj = PyCObject_FromVoidPtrAndDesc(p, (void *)sig, 0);
#endif
    if (!cobj)
        goto bad;
    if (PyDict_SetItem(d, name, cobj) < 0)
        goto bad;
    Py_DECREF(cobj);
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(cobj);
    Py_XDECREF(d);
    return -1;
}

/* VoidPtrImport */
#ifndef __PYX_HAVE_RT_ImportVoidPtr_0_29_36
#define __PYX_HAVE_RT_ImportVoidPtr_0_29_36
static int __Pyx_ImportVoidPtr_0_29_36(PyObject *module, const char *name, void **p, const char *sig) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
    if (!d)
        goto bad;
    cobj = PyDict_GetItemString(d, name);
    if (!cobj) {
        PyErr_Format(PyExc_ImportError,
            "%.200s does not export expected C variable %.200s",
                PyModule_GetName(module), name);
        goto bad;
    }
#if PY_VERSION_HEX >= 0x02070000
    if (!PyCapsule_IsValid(cobj, sig)) {
        PyErr_Format(PyExc_TypeError,
            "C variable %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
             PyModule_GetName(module), name, sig, PyCapsule_GetName(cobj));
        goto bad;
    }
    *p = PyCapsule_GetPointer(cobj, sig);
#else
    {const char *desc, *s1, *s2;
    desc = (const char *)PyCObject_GetDesc(cobj);
    if (!desc)
        goto bad;
    s1 = desc; s2 = sig;
    while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; }
    if (*s1 != *s2) {
        PyErr_Format(PyExc_TypeError,
            "C variable %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
             PyModule_GetName(module), name, sig, desc);
        goto bad;
    }
    *p = PyCObject_AsVoidPtr(cobj);}
#endif
    if (!(*p))
        goto bad;
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(d);
    return -1;
}
#endif

/* InitStrings */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        if (PyObject_Hash(*t->p) == -1)
            return -1;
        ++t;
    }
    return 0;
}

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
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_DEFAULT
#if !CYTHON_PEP393_ENABLED
static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    char* defenc_c;
    PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
    if (!defenc) return NULL;
    defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    {
        char* end = defenc_c + PyBytes_GET_SIZE(defenc);
        char* c;
        for (c = defenc_c; c < end; c++) {
            if ((unsigned char) (*c) >= 128) {
                PyUnicode_AsASCIIString(o);
                return NULL;
            }
        }
    }
#endif
    *length = PyBytes_GET_SIZE(defenc);
    return defenc_c;
}
#else
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#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_DEFAULT
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        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_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
#if PY_MAJOR_VERSION >= 3
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type %.200s).  "
                "The ability to return an instance of a strict subclass of int "
                "is deprecated, and may be removed in a future version of Python.",
                Py_TYPE(result)->tp_name)) {
            Py_DECREF(result);
            return NULL;
        }
        return result;
    }
#endif
    PyErr_Format(PyExc_TypeError,
                 "__%.4s__ returned non-%.4s (type %.200s)",
                 type_name, type_name, Py_TYPE(result)->tp_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_Check(x) || PyLong_Check(x)))
#else
  if (likely(PyLong_Check(x)))
#endif
    return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  #if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = m->nb_int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = m->nb_long(x);
  }
  #else
  if (likely(m && m->nb_int)) {
    name = "int";
    res = m->nb_int(x);
  }
  #endif
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
    res = PyNumber_Int(x);
  }
#endif
  if (likely(res)) {
#if PY_MAJOR_VERSION < 3
    if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
#else
    if (unlikely(!PyLong_CheckExact(res))) {
#endif
        return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
    }
  }
  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 PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(b);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    const digit* digits = ((PyLongObject*)b)->ob_digit;
    const Py_ssize_t size = Py_SIZE(b);
    if (likely(__Pyx_sst_abs(size) <= 1)) {
        ival = likely(size) ? digits[0] : 0;
        if (size == -1) ival = -ival;
        return ival;
    } else {
      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 = PyInt_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);
#if PY_MAJOR_VERSION < 3
  } else if (likely(PyInt_CheckExact(o))) {
    return PyInt_AS_LONG(o);
#endif
  } else {
    Py_ssize_t ival;
    PyObject *x;
    x = PyNumber_Index(o);
    if (!x) return -1;
    ival = PyInt_AsLong(x);
    Py_DECREF(x);
    return ival;
  }
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


#endif /* Py_PYTHON_H */
