/* Generated by Cython 0.29.36 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "name": "apache_beam.runners.worker.operations",
        "sources": [
            "apache_beam/runners/worker/operations.py"
        ]
    },
    "module_name": "apache_beam.runners.worker.operations"
}
END: Cython Metadata */

#ifndef PY_SSIZE_T_CLEAN
#define PY_SSIZE_T_CLEAN
#endif /* PY_SSIZE_T_CLEAN */
#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__worker__operations
#define __PYX_HAVE_API__apache_beam__runners__worker__operations
/* Early includes */
#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include "datetime.h"
#include "pythread.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/worker/operations.py",
  "apache_beam/runners/worker/operations.pxd",
  "stringsource",
  "datetime.pxd",
  "apache_beam/utils/windowed_value.pxd",
  "apache_beam/transforms/cy_dataflow_distribution_counter.pxd",
  "apache_beam/runners/common.pxd",
  "apache_beam/utils/counters.pxd",
  "type.pxd",
  "bool.pxd",
  "complex.pxd",
  "apache_beam/metrics/cells.pxd",
  "apache_beam/metrics/execution.pxd",
  "apache_beam/runners/worker/statesampler_fast.pxd",
  "apache_beam/runners/worker/opcounters.pxd",
};

/*--- Type declarations ---*/
struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo;
struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue;
struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch;
struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch;
struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase;
struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter;
struct __pyx_obj_11apache_beam_7runners_6common_Receiver;
struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper;
struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature;
struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker;
struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker;
struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker;
struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner;
struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler;
struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler;
struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext;
struct __pyx_obj_11apache_beam_7runners_6common__ReceiverAdapter;
struct __pyx_obj_11apache_beam_5utils_8counters_Counter;
struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter;
struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell;
struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell;
struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell;
struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell;
struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData;
struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName;
struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater;
struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer;
struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler;
struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState;
struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter;
struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter;
struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter;
struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator;
struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters;
struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet;
struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet;
struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet;
struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation;
struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation;
struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation;
struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation;
struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements;
struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions;
struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation;
struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation;
struct __pyx_obj_11apache_beam_7runners_6worker_10operations_FlattenOperation;
struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup;
struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs;
struct __pyx_opt_args_11apache_beam_5utils_14windowed_value_create;

/* "apache_beam/utils/windowed_value.pxd":55
 * 
 * @cython.locals(wv=WindowedValue)
 * cpdef WindowedValue create(             # <<<<<<<<<<<<<<
 *   object value, int64_t timestamp_micros, object windows, object pane_info=*)
 * 
 */
struct __pyx_opt_args_11apache_beam_5utils_14windowed_value_create {
  int __pyx_n;
  PyObject *pane_info;
};

/* "apache_beam/transforms/cy_dataflow_distribution_counter.pxd":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;

/* "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;
};
struct __pyx_opt_args_11apache_beam_7runners_6worker_10operations_9Operation_output;

/* "apache_beam/runners/worker/operations.pxd":93
 *   cpdef finish(self)
 *   cpdef teardown(self)
 *   cpdef output(self, WindowedValue windowed_value, int output_index=*)             # <<<<<<<<<<<<<<
 *   cpdef execution_time_monitoring_infos(self, transform_id)
 *   cpdef user_monitoring_infos(self, transform_id)
 */
struct __pyx_opt_args_11apache_beam_7runners_6worker_10operations_9Operation_output {
  int __pyx_n;
  int output_index;
};

/* "apache_beam/utils/windowed_value.pxd":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/utils/counters.pxd":21
 * # cython: overflowcheck=True
 * 
 * cdef class Counter(object):             # <<<<<<<<<<<<<<
 *   cdef readonly object name
 *   cdef readonly object combine_fn
 */
struct __pyx_obj_11apache_beam_5utils_8counters_Counter {
  PyObject_HEAD
  struct __pyx_vtabstruct_11apache_beam_5utils_8counters_Counter *__pyx_vtab;
  PyObject *name;
  PyObject *combine_fn;
  PyObject *accumulator;
  PyObject *_add_input;
};


/* "apache_beam/utils/counters.pxd":29
 * 
 * 
 * cdef class AccumulatorCombineFnCounter(Counter):             # <<<<<<<<<<<<<<
 *   cdef readonly object _fast_add_input
 *   cdef readonly object _fast_add_input_n
 */
struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter {
  struct __pyx_obj_11apache_beam_5utils_8counters_Counter __pyx_base;
  PyObject *_fast_add_input;
  PyObject *_fast_add_input_n;
};


/* "apache_beam/metrics/cells.pxd":23
 * 
 * 
 * cdef class MetricCell(object):             # <<<<<<<<<<<<<<
 *   cdef object _lock
 *   cpdef bint update(self, value) except -1
 */
struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell {
  PyObject_HEAD
  struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell *__pyx_vtab;
  PyObject *_lock;
  PyDateTime_DateTime *_start_time;
};


/* "apache_beam/metrics/cells.pxd":29
 * 
 * 
 * cdef class CounterCell(MetricCell):             # <<<<<<<<<<<<<<
 *   cdef readonly libc.stdint.int64_t value
 * 
 */
struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell {
  struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell __pyx_base;
  int64_t value;
};


/* "apache_beam/metrics/cells.pxd":36
 * 
 * 
 * cdef class DistributionCell(MetricCell):             # <<<<<<<<<<<<<<
 *   cdef readonly DistributionData data
 * 
 */
struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell {
  struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell __pyx_base;
  struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *data;
};


/* "apache_beam/metrics/cells.pxd":43
 * 
 * 
 * cdef class GaugeCell(MetricCell):             # <<<<<<<<<<<<<<
 *   cdef readonly object data
 * 
 */
struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell {
  struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell __pyx_base;
  PyObject *data;
};


/* "apache_beam/metrics/cells.pxd":47
 * 
 * 
 * cdef class DistributionData(object):             # <<<<<<<<<<<<<<
 *   cdef readonly libc.stdint.int64_t sum
 *   cdef readonly libc.stdint.int64_t count
 */
struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData {
  PyObject_HEAD
  int64_t sum;
  int64_t count;
  int64_t min;
  int64_t max;
};


/* "apache_beam/metrics/execution.pxd":26
 * 
 * 
 * cdef class _TypedMetricName(object):             # <<<<<<<<<<<<<<
 *   cdef readonly object cell_type
 *   cdef readonly object metric_name
 */
struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName {
  PyObject_HEAD
  PyObject *cell_type;
  PyObject *metric_name;
  PyObject *fast_name;
  int64_t _hash;
};


/* "apache_beam/metrics/execution.pxd":36
 * 
 * 
 * cdef class MetricUpdater(object):             # <<<<<<<<<<<<<<
 *   cdef _TypedMetricName typed_metric_name
 *   cdef object default_value
 */
struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater {
  PyObject_HEAD
  struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *typed_metric_name;
  PyObject *default_value;
  int process_wide;
};


/* "apache_beam/metrics/execution.pxd":42
 * 
 * 
 * cdef class MetricsContainer(object):             # <<<<<<<<<<<<<<
 *   cdef object step_name
 *   cdef object lock
 */
struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer {
  PyObject_HEAD
  struct __pyx_vtabstruct_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_vtab;
  PyObject *step_name;
  PyObject *lock;
  PyObject *metrics;
};


/* "statesampler_fast.pxd":25
 * from libc.stdint cimport int32_t, int64_t
 * 
 * cdef class StateSampler(object):             # <<<<<<<<<<<<<<
 *   """Tracks time spent in states during pipeline execution."""
 *   cdef int _sampling_period_ms
 */
struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler {
  PyObject_HEAD
  struct __pyx_vtabstruct_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_vtab;
  int _sampling_period_ms;
  int _sampling_period_ms_start;
  double _sampling_period_ratio;
  PyObject *scoped_states_by_index;
  int started;
  int finished;
  PyObject *sampling_thread;
  PyThread_type_lock lock;
  int64_t state_transition_count;
  int64_t time_since_transition;
  int32_t current_state_index;
};


/* "statesampler_fast.pxd":52
 *       self, counter_name, name_context, output_counter, metrics_container)
 * 
 * cdef class ScopedState(object):             # <<<<<<<<<<<<<<
 *   """Context manager class managing transitions for a given sampler state."""
 * 
 */
struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState {
  PyObject_HEAD
  struct __pyx_vtabstruct_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_vtab;
  struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *sampler;
  int32_t state_index;
  PyObject *counter;
  PyObject *name;
  PyObject *name_context;
  int64_t _nsecs;
  int32_t old_state_index;
  struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *metrics_container;
};


/* "opcounters.pxd":25
 * 
 * 
 * cdef class TransformIOCounter(object):             # <<<<<<<<<<<<<<
 *   cdef readonly object _counter_factory
 *   cdef readonly object _state_sampler
 */
struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter {
  PyObject_HEAD
  struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *__pyx_vtab;
  PyObject *_counter_factory;
  PyObject *_state_sampler;
  struct __pyx_obj_11apache_beam_5utils_8counters_Counter *bytes_read_counter;
  struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *scoped_state;
  PyObject *_latest_step;
};


/* "opcounters.pxd":38
 * 
 * 
 * cdef class NoOpTransformIOCounter(TransformIOCounter):             # <<<<<<<<<<<<<<
 *   pass
 * 
 */
struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter {
  struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter __pyx_base;
};


/* "opcounters.pxd":42
 * 
 * 
 * cdef class SideInputReadCounter(TransformIOCounter):             # <<<<<<<<<<<<<<
 *   cdef readonly object declaring_step
 *   cdef readonly object input_index
 */
struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter {
  struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter __pyx_base;
  PyObject *declaring_step;
  PyObject *input_index;
};


/* "opcounters.pxd":47
 * 
 * 
 * cdef class SumAccumulator(object):             # <<<<<<<<<<<<<<
 *   cdef libc.stdint.int64_t _value
 *   cpdef update(self, libc.stdint.int64_t value)
 */
struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator {
  PyObject_HEAD
  struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *__pyx_vtab;
  int64_t _value;
};


/* "opcounters.pxd":53
 * 
 * 
 * cdef class OperationCounters(object):             # <<<<<<<<<<<<<<
 *   cdef public _counter_factory
 *   cdef public Counter element_counter
 */
struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters {
  PyObject_HEAD
  struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_vtab;
  PyObject *_counter_factory;
  struct __pyx_obj_11apache_beam_5utils_8counters_Counter *element_counter;
  struct __pyx_obj_11apache_beam_5utils_8counters_Counter *mean_byte_counter;
  PyObject *coder_impl;
  struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *active_accumulator;
  PyObject *current_size;
  int64_t _sample_counter;
  int64_t _next_sample;
  PyObject *output_type_constraints;
  PyObject *producer_batch_converter;
};


/* "apache_beam/runners/worker/operations.pxd":31
 * 
 * 
 * cdef class ConsumerSet(Receiver):             # <<<<<<<<<<<<<<
 *   cdef list consumers
 *   cdef readonly opcounters.OperationCounters opcounter
 */
struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet {
  struct __pyx_obj_11apache_beam_7runners_6common_Receiver __pyx_base;
  PyObject *consumers;
  struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *opcounter;
  PyObject *step_name;
  PyObject *output_index;
  PyObject *coder;
  PyObject *output_sampler;
  PyObject *element_sampler;
  PyObject *execution_context;
};


/* "apache_beam/runners/worker/operations.pxd":45
 *   cpdef update_counters_batch(self, WindowedBatch windowed_batch)
 * 
 * cdef class SingletonElementConsumerSet(ConsumerSet):             # <<<<<<<<<<<<<<
 *   cdef Operation consumer
 * 
 */
struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet __pyx_base;
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *consumer;
};


/* "apache_beam/runners/worker/operations.pxd":52
 *   cpdef flush(self)
 * 
 * cdef class GeneralPurposeConsumerSet(ConsumerSet):             # <<<<<<<<<<<<<<
 *   cdef list element_consumers
 *   cdef list passthrough_batch_consumers
 */
struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet __pyx_base;
  PyObject *element_consumers;
  PyObject *passthrough_batch_consumers;
  PyObject *other_batch_consumers;
  int has_batch_consumers;
  PyObject *_batched_elements;
  PyObject *producer_batch_converter;
};


/* "apache_beam/runners/worker/operations.pxd":64
 *   cpdef flush(self)
 * 
 * cdef class Operation(object):             # <<<<<<<<<<<<<<
 *   cdef readonly name_context
 *   cdef readonly operation_name
 */
struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation {
  PyObject_HEAD
  struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation *__pyx_vtab;
  PyObject *name_context;
  PyObject *operation_name;
  PyObject *spec;
  PyObject *consumers;
  PyObject *counter_factory;
  PyObject *metrics_container;
  PyObject *execution_context;
  PyObject *receivers;
  int debug_logging_enabled;
  int setup_done;
  PyObject *step_name;
  PyObject *state_sampler;
  PyObject *scoped_start_state;
  PyObject *scoped_process_state;
  PyObject *scoped_finish_state;
  PyObject *data_sampler;
};


/* "apache_beam/runners/worker/operations.pxd":100
 * 
 * 
 * cdef class ReadOperation(Operation):             # <<<<<<<<<<<<<<
 *   @cython.locals(windowed_value=WindowedValue)
 *   cpdef start(self)
 */
struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation __pyx_base;
};


/* "apache_beam/runners/worker/operations.pxd":105
 * 
 * 
 * cdef class ImpulseReadOperation(Operation):             # <<<<<<<<<<<<<<
 *   cdef object source
 *   @cython.locals(windowed_value=WindowedValue)
 */
struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation __pyx_base;
  PyObject *source;
};


/* "apache_beam/runners/worker/operations.pxd":111
 * 
 * 
 * cdef class DoOperation(Operation):             # <<<<<<<<<<<<<<
 *   cdef DoFnRunner dofn_runner
 *   cdef object tagged_receivers
 */
struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation __pyx_base;
  struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *dofn_runner;
  PyObject *tagged_receivers;
  PyObject *side_input_maps;
  PyObject *user_state_context;
  PyObject *timer_inputs;
  PyObject *timer_specs;
  PyObject *input_info;
  PyObject *fn;
};


/* "apache_beam/runners/worker/operations.pxd":122
 * 
 * 
 * cdef class SdfProcessSizedElements(DoOperation):             # <<<<<<<<<<<<<<
 *   cdef object lock
 *   cdef object element_start_output_bytes
 */
struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation __pyx_base;
  PyObject *lock;
  PyObject *element_start_output_bytes;
};


/* "apache_beam/runners/worker/operations.pxd":126
 *   cdef object element_start_output_bytes
 * 
 * cdef class SdfTruncateSizedRestrictions(DoOperation):             # <<<<<<<<<<<<<<
 *   pass
 * 
 */
struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation __pyx_base;
};


/* "apache_beam/runners/worker/operations.pxd":129
 *   pass
 * 
 * cdef class CombineOperation(Operation):             # <<<<<<<<<<<<<<
 *   cdef object phased_combine_fn
 * 
 */
struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation __pyx_base;
  PyObject *phased_combine_fn;
};


/* "apache_beam/runners/worker/operations.pxd":133
 * 
 * 
 * cdef class PGBKCVOperation(Operation):             # <<<<<<<<<<<<<<
 *   cdef public object combine_fn
 *   cdef public object combine_fn_add_input
 */
struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation __pyx_base;
  PyObject *combine_fn;
  PyObject *combine_fn_add_input;
  PyObject *combine_fn_compact;
  int is_default_windowing;
  PyObject *timestamp_combiner;
  PyObject *table;
  long max_keys;
  long key_count;
};


/* "apache_beam/runners/worker/operations.pxd":146
 * 
 * 
 * cdef class FlattenOperation(Operation):             # <<<<<<<<<<<<<<
 *   pass
 */
struct __pyx_obj_11apache_beam_7runners_6worker_10operations_FlattenOperation {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation __pyx_base;
};


/* "apache_beam/runners/worker/operations.py":464
 *     self.data_sampler: Optional[DataSampler] = None
 * 
 *   def setup(self, data_sampler=None):             # <<<<<<<<<<<<<<
 *     # type: (Optional[DataSampler]) -> None
 * 
 */
struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup {
  PyObject_HEAD
  PyObject *__pyx_v_data_sampler;
  PyObject *__pyx_v_transform_id;
};


/* "apache_beam/runners/worker/operations.py":819
 *     self.fn, _, _, _, _ = (pickler.loads(self.spec.serialized_fn))
 * 
 *   def _read_side_inputs(self, tags_and_types):             # <<<<<<<<<<<<<<
 *     # type: (...) -> Iterator[apache_sideinputs.SideInputMap]
 * 
 */
struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs {
  PyObject_HEAD
  PyObject *__pyx_v_element_counter;
  PyObject *__pyx_v_i;
  PyObject *__pyx_v_iterator_fn;
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self;
  PyObject *__pyx_v_si;
  PyObject *__pyx_v_si_counter;
  PyObject *__pyx_v_side_tag;
  PyObject *__pyx_v_sources;
  PyObject *__pyx_v_tags_and_types;
  PyObject *__pyx_v_view_class;
  PyObject *__pyx_v_view_options;
  PyObject *__pyx_t_0;
  PyObject *__pyx_t_1;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
};



/* "apache_beam/utils/windowed_value.pxd":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.pxd":30
 * 
 * 
 * cdef class Receiver(object):             # <<<<<<<<<<<<<<
 *   cpdef receive(self, WindowedValue windowed_value)
 *   cpdef receive_batch(self, WindowedBatch windowed_batch)
 */

struct __pyx_vtabstruct_11apache_beam_7runners_6common_Receiver {
  PyObject *(*receive)(struct __pyx_obj_11apache_beam_7runners_6common_Receiver *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch);
  PyObject *(*receive_batch)(struct __pyx_obj_11apache_beam_7runners_6common_Receiver *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *, int __pyx_skip_dispatch);
  PyObject *(*flush)(struct __pyx_obj_11apache_beam_7runners_6common_Receiver *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_11apache_beam_7runners_6common_Receiver *__pyx_vtabptr_11apache_beam_7runners_6common_Receiver;


/* "apache_beam/runners/common.pxd":72
 * 
 * 
 * cdef class DoFnInvoker(object):             # <<<<<<<<<<<<<<
 *   cdef public DoFnSignature signature
 *   cdef OutputHandler output_handler
 */

struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnInvoker {
  PyObject *(*invoke_process)(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_7runners_6common_11DoFnInvoker_invoke_process *__pyx_optional_args);
  PyObject *(*invoke_start_bundle)(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *, int __pyx_skip_dispatch);
  PyObject *(*invoke_finish_bundle)(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *, int __pyx_skip_dispatch);
  PyObject *(*invoke_split)(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*invoke_initial_restriction)(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*invoke_create_tracker)(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnInvoker *__pyx_vtabptr_11apache_beam_7runners_6common_DoFnInvoker;


/* "apache_beam/runners/common.pxd":88
 * 
 * 
 * cdef class SimpleInvoker(DoFnInvoker):             # <<<<<<<<<<<<<<
 *   cdef object process_method
 *   cdef object process_batch_method
 */

struct __pyx_vtabstruct_11apache_beam_7runners_6common_SimpleInvoker {
  struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnInvoker __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_7runners_6common_SimpleInvoker *__pyx_vtabptr_11apache_beam_7runners_6common_SimpleInvoker;


/* "apache_beam/runners/common.pxd":93
 * 
 * 
 * cdef class PerWindowInvoker(DoFnInvoker):             # <<<<<<<<<<<<<<
 *   cdef list side_inputs
 *   cdef DoFnContext context
 */

struct __pyx_vtabstruct_11apache_beam_7runners_6common_PerWindowInvoker {
  struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnInvoker __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_7runners_6common_PerWindowInvoker *__pyx_vtabptr_11apache_beam_7runners_6common_PerWindowInvoker;


/* "apache_beam/runners/common.pxd":118
 * 
 * 
 * cdef class DoFnRunner:             # <<<<<<<<<<<<<<
 *   cdef DoFnContext context
 *   cdef object step_name
 */

struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnRunner {
  PyObject *(*process)(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnRunner *__pyx_vtabptr_11apache_beam_7runners_6common_DoFnRunner;


/* "apache_beam/runners/common.pxd":129
 * 
 * 
 * cdef class OutputHandler(object):             # <<<<<<<<<<<<<<
 *   @cython.locals(windowed_value=WindowedValue,
 *                  output_element_count=int64_t)
 */

struct __pyx_vtabstruct_11apache_beam_7runners_6common_OutputHandler {
  PyObject *(*handle_process_outputs)(struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_7runners_6common_13OutputHandler_handle_process_outputs *__pyx_optional_args);
  PyObject *(*handle_process_batch_outputs)(struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_7runners_6common_13OutputHandler_handle_process_batch_outputs *__pyx_optional_args);
};
static struct __pyx_vtabstruct_11apache_beam_7runners_6common_OutputHandler *__pyx_vtabptr_11apache_beam_7runners_6common_OutputHandler;


/* "apache_beam/runners/common.pxd":141
 * 
 * 
 * cdef class _OutputHandler(OutputHandler):             # <<<<<<<<<<<<<<
 *   cdef object window_fn
 *   cdef Receiver main_receivers
 */

struct __pyx_vtabstruct_11apache_beam_7runners_6common__OutputHandler {
  struct __pyx_vtabstruct_11apache_beam_7runners_6common_OutputHandler __pyx_base;
  struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *(*_maybe_propagate_windowing_info)(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, PyObject *);
  PyObject *(*_handle_tagged_output)(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *, PyObject *);
  PyObject *(*_write_value_to_tag)(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *, PyObject *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, PyObject *);
  PyObject *(*_write_batch_to_tag)(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *, PyObject *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *, PyObject *);
  PyObject *(*_verify_batch_output)(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *, PyObject *);
};
static struct __pyx_vtabstruct_11apache_beam_7runners_6common__OutputHandler *__pyx_vtabptr_11apache_beam_7runners_6common__OutputHandler;


/* "apache_beam/runners/common.pxd":171
 *   cdef inline _verify_batch_output(self, result)
 * 
 * cdef class DoFnContext(object):             # <<<<<<<<<<<<<<
 *   cdef object label
 *   cdef object state
 */

struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnContext {
  PyObject *(*set_element)(struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnContext *__pyx_vtabptr_11apache_beam_7runners_6common_DoFnContext;


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


/* "apache_beam/utils/counters.pxd":21
 * # cython: overflowcheck=True
 * 
 * cdef class Counter(object):             # <<<<<<<<<<<<<<
 *   cdef readonly object name
 *   cdef readonly object combine_fn
 */

struct __pyx_vtabstruct_11apache_beam_5utils_8counters_Counter {
  int (*update)(struct __pyx_obj_11apache_beam_5utils_8counters_Counter *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_11apache_beam_5utils_8counters_Counter *__pyx_vtabptr_11apache_beam_5utils_8counters_Counter;


/* "apache_beam/utils/counters.pxd":29
 * 
 * 
 * cdef class AccumulatorCombineFnCounter(Counter):             # <<<<<<<<<<<<<<
 *   cdef readonly object _fast_add_input
 *   cdef readonly object _fast_add_input_n
 */

struct __pyx_vtabstruct_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter {
  struct __pyx_vtabstruct_11apache_beam_5utils_8counters_Counter __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *__pyx_vtabptr_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter;


/* "apache_beam/metrics/cells.pxd":23
 * 
 * 
 * cdef class MetricCell(object):             # <<<<<<<<<<<<<<
 *   cdef object _lock
 *   cpdef bint update(self, value) except -1
 */

struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell {
  int (*update)(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell *__pyx_vtabptr_11apache_beam_7metrics_5cells_MetricCell;


/* "apache_beam/metrics/cells.pxd":29
 * 
 * 
 * cdef class CounterCell(MetricCell):             # <<<<<<<<<<<<<<
 *   cdef readonly libc.stdint.int64_t value
 * 
 */

struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_CounterCell {
  struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_CounterCell *__pyx_vtabptr_11apache_beam_7metrics_5cells_CounterCell;


/* "apache_beam/metrics/cells.pxd":36
 * 
 * 
 * cdef class DistributionCell(MetricCell):             # <<<<<<<<<<<<<<
 *   cdef readonly DistributionData data
 * 
 */

struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_DistributionCell {
  struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell __pyx_base;
  int (*_update)(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *, PyObject *);
};
static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_DistributionCell *__pyx_vtabptr_11apache_beam_7metrics_5cells_DistributionCell;


/* "apache_beam/metrics/cells.pxd":43
 * 
 * 
 * cdef class GaugeCell(MetricCell):             # <<<<<<<<<<<<<<
 *   cdef readonly object data
 * 
 */

struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_GaugeCell {
  struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_GaugeCell *__pyx_vtabptr_11apache_beam_7metrics_5cells_GaugeCell;


/* "apache_beam/metrics/execution.pxd":42
 * 
 * 
 * cdef class MetricsContainer(object):             # <<<<<<<<<<<<<<
 *   cdef object step_name
 *   cdef object lock
 */

struct __pyx_vtabstruct_11apache_beam_7metrics_9execution_MetricsContainer {
  struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *(*get_metric_cell)(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_vtabptr_11apache_beam_7metrics_9execution_MetricsContainer;


/* "statesampler_fast.pxd":25
 * from libc.stdint cimport int32_t, int64_t
 * 
 * cdef class StateSampler(object):             # <<<<<<<<<<<<<<
 *   """Tracks time spent in states during pipeline execution."""
 *   cdef int _sampling_period_ms
 */

struct __pyx_vtabstruct_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler {
  struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *(*current_state)(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *, int __pyx_skip_dispatch);
  struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *(*current_state_c)(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *);
  PyObject *(*_scoped_state)(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *, PyObject *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_vtabptr_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler;


/* "statesampler_fast.pxd":52
 *       self, counter_name, name_context, output_counter, metrics_container)
 * 
 * cdef class ScopedState(object):             # <<<<<<<<<<<<<<
 *   """Context manager class managing transitions for a given sampler state."""
 * 
 */

struct __pyx_vtabstruct_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState {
  PyObject *(*__pyx___enter__)(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *, int __pyx_skip_dispatch);
  PyObject *(*__pyx___exit__)(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_vtabptr_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState;


/* "opcounters.pxd":25
 * 
 * 
 * cdef class TransformIOCounter(object):             # <<<<<<<<<<<<<<
 *   cdef readonly object _counter_factory
 *   cdef readonly object _state_sampler
 */

struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter {
  PyObject *(*update_current_step)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *, int __pyx_skip_dispatch);
  PyObject *(*add_bytes_read)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *, int64_t, int __pyx_skip_dispatch);
  PyObject *(*__pyx___enter__)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *, int __pyx_skip_dispatch);
  PyObject *(*__pyx___exit__)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *__pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter;


/* "opcounters.pxd":38
 * 
 * 
 * cdef class NoOpTransformIOCounter(TransformIOCounter):             # <<<<<<<<<<<<<<
 *   pass
 * 
 */

struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter {
  struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter *__pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter;


/* "opcounters.pxd":42
 * 
 * 
 * cdef class SideInputReadCounter(TransformIOCounter):             # <<<<<<<<<<<<<<
 *   cdef readonly object declaring_step
 *   cdef readonly object input_index
 */

struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter {
  struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter *__pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter;


/* "opcounters.pxd":47
 * 
 * 
 * cdef class SumAccumulator(object):             # <<<<<<<<<<<<<<
 *   cdef libc.stdint.int64_t _value
 *   cpdef update(self, libc.stdint.int64_t value)
 */

struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_SumAccumulator {
  PyObject *(*update)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *, int64_t, int __pyx_skip_dispatch);
  int64_t (*value)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *__pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_SumAccumulator;


/* "opcounters.pxd":53
 * 
 * 
 * cdef class OperationCounters(object):             # <<<<<<<<<<<<<<
 *   cdef public _counter_factory
 *   cdef public Counter element_counter
 */

struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_OperationCounters {
  PyObject *(*update_from)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*update_from_batch)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*do_sample)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *, PyObject *);
  PyObject *(*update_collect)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *, int __pyx_skip_dispatch);
  PyObject *(*type_check)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *, PyObject *, int __pyx_skip_dispatch);
  int64_t (*_compute_next_sample)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *, int64_t);
  int (*_should_sample)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *);
  int (*should_sample)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_OperationCounters;


/* "apache_beam/runners/worker/operations.py":112
 * 
 * 
 * class ConsumerSet(Receiver):             # <<<<<<<<<<<<<<
 *   """A ConsumerSet represents a graph edge between two Operation nodes.
 * 
 */

struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_ConsumerSet {
  struct __pyx_vtabstruct_11apache_beam_7runners_6common_Receiver __pyx_base;
  PyObject *(*update_counters_start)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch);
  PyObject *(*update_counters_finish)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *, int __pyx_skip_dispatch);
  PyObject *(*update_counters_batch)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_ConsumerSet;


/* "apache_beam/runners/worker/operations.py":241
 * 
 * 
 * class SingletonElementConsumerSet(ConsumerSet):             # <<<<<<<<<<<<<<
 *   """ConsumerSet representing a single consumer that can only process elements
 *   (not batches)."""
 */

struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet {
  struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_ConsumerSet __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet;


/* "apache_beam/runners/worker/operations.py":285
 * 
 * 
 * class GeneralPurposeConsumerSet(ConsumerSet):             # <<<<<<<<<<<<<<
 *   """ConsumerSet implementation that handles all combinations of possible edges.
 *   """
 */

struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet {
  struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_ConsumerSet __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet;


/* "apache_beam/runners/worker/operations.py":414
 * 
 * 
 * class Operation(object):             # <<<<<<<<<<<<<<
 *   """An operation representing the live version of a work item specification.
 * 
 */

struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation {
  PyObject *(*start)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, int __pyx_skip_dispatch);
  PyObject *(*process)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch);
  PyObject *(*finish)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, int __pyx_skip_dispatch);
  PyObject *(*teardown)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, int __pyx_skip_dispatch);
  PyObject *(*output)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_7runners_6worker_10operations_9Operation_output *__pyx_optional_args);
  PyObject *(*execution_time_monitoring_infos)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*user_monitoring_infos)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*pcollection_count_monitoring_infos)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*monitoring_infos)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, PyObject *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_Operation;


/* "apache_beam/runners/worker/operations.py":705
 * 
 * 
 * class ReadOperation(Operation):             # <<<<<<<<<<<<<<
 *   def start(self):
 *     with self.scoped_start_state:
 */

struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_ReadOperation {
  struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_ReadOperation *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_ReadOperation;


/* "apache_beam/runners/worker/operations.py":719
 * 
 * 
 * class ImpulseReadOperation(Operation):             # <<<<<<<<<<<<<<
 *   def __init__(
 *       self,
 */

struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation {
  struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation;


/* "apache_beam/runners/worker/operations.py":797
 * 
 * 
 * class DoOperation(Operation):             # <<<<<<<<<<<<<<
 *   """A Do operation that will execute a custom DoFn for each input element."""
 * 
 */

struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_DoOperation {
  struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_DoOperation;


/* "apache_beam/runners/worker/operations.py":1058
 * 
 * 
 * class SdfProcessSizedElements(DoOperation):             # <<<<<<<<<<<<<<
 *   def __init__(self, *args, **kwargs):
 *     super(SdfProcessSizedElements, self).__init__(*args, **kwargs)
 */

struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements {
  struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_DoOperation __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements;


/* "apache_beam/runners/worker/operations.py":1044
 * 
 * 
 * class SdfTruncateSizedRestrictions(DoOperation):             # <<<<<<<<<<<<<<
 *   def __init__(self, *args, **kwargs):
 *     super(SdfTruncateSizedRestrictions, self).__init__(*args, **kwargs)
 */

struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions {
  struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_DoOperation __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions;


/* "apache_beam/runners/worker/operations.py":1141
 * 
 * 
 * class CombineOperation(Operation):             # <<<<<<<<<<<<<<
 *   """A Combine operation executing a CombineFn for each input element."""
 *   def __init__(self, name_context, spec, counter_factory, state_sampler):
 */

struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_CombineOperation {
  struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_CombineOperation;


/* "apache_beam/runners/worker/operations.py":1234
 * 
 * 
 * class PGBKCVOperation(Operation):             # <<<<<<<<<<<<<<
 *   def __init__(
 *       self, name_context, spec, counter_factory, state_sampler, windowing=None):
 */

struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_PGBKCVOperation {
  struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation __pyx_base;
  PyObject *(*output_key)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_PGBKCVOperation;


/* "apache_beam/runners/worker/operations.py":1343
 * 
 * 
 * class FlattenOperation(Operation):             # <<<<<<<<<<<<<<
 *   """Flatten operation.
 * 
 */

struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_FlattenOperation {
  struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_FlattenOperation *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_FlattenOperation;

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

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

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

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

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

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

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

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

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

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

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

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

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

/* PyObjectFormatAndDecref.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f);
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f);

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

/* BuildPyUnicode.proto */
static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength,
                                                int prepend_sign, char padding_char);

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

/* CIntToPyUnicode.proto */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char);

/* JoinPyUnicode.proto */
static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
                                      Py_UCS4 max_char);

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

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

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

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

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

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

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

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

/* ObjectGetItem.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
#else
#define __Pyx_PyObject_GetItem(obj, key)  PyObject_GetItem(obj, key)
#endif

/* IterFinish.proto */
static CYTHON_INLINE int __Pyx_IterFinish(void);

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

/* RaiseNeedMoreValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

/* RaiseTooManyValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

/* UnpackItemEndCheck.proto */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);

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

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

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

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

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

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

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

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

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

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

/* DictGetItem.proto */
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
#define __Pyx_PyObject_Dict_GetItem(obj, name)\
    (likely(PyDict_CheckExact(obj)) ?\
     __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
#else
#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
#define __Pyx_PyObject_Dict_GetItem(obj, name)  PyObject_GetItem(obj, name)
#endif

/* BytesEquals.proto */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);

/* UnicodeEquals.proto */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);

/* PySequenceContains.proto */
static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
    int result = PySequence_Contains(seq, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

/* KeywordStringCheck.proto */
static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);

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

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

/* SliceObject.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
        PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
        int has_cstart, int has_cstop, int wraparound);

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

/* dict_getitem_default.proto */
static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value);

/* UnpackUnboundCMethod.proto */
typedef struct {
    PyObject *type;
    PyObject **method_name;
    PyCFunction func;
    PyObject *method;
    int flag;
} __Pyx_CachedCFunction;

/* CallUnboundCMethod1.proto */
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
#else
#define __Pyx_CallUnboundCMethod1(cfunc, self, arg)  __Pyx__CallUnboundCMethod1(cfunc, self, arg)
#endif

/* CallUnboundCMethod2.proto */
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2);
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2);
#else
#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2)  __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2)
#endif

/* DivInt[long].proto */
static CYTHON_INLINE long __Pyx_div_long(long, long);

/* SetItemInt.proto */
#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
               __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
                                               int is_list, int wraparound, int boundscheck);

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

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

/* WriteUnraisableException.proto */
static void __Pyx_WriteUnraisable(const char *name, int clineno,
                                  int lineno, const char *filename,
                                  int full_traceback, int nogil);

/* CallNextTpDealloc.proto */
static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc);

/* CallNextTpTraverse.proto */
static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse);

/* CallNextTpClear.proto */
static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_dealloc);

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

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

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

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

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

/* CyFunctionClassCell.proto */
static int __Pyx_CyFunction_InitClassCell(PyObject *cyfunctions, PyObject *classobj);

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

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

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

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);

/* 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_6worker_10operations_11ConsumerSet_update_counters_start(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_11ConsumerSet_update_counters_finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_11ConsumerSet_update_counters_batch(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_receive(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_receive_batch(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_flush(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_receive(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_receive_batch(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_flush(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_start(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_process(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_teardown(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_output(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_7runners_6worker_10operations_9Operation_output *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_transform_id, PyObject *__pyx_v_tag_to_pcollection_id, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_pcollection_count_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_tag_to_pcollection_id, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_user_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_transform_id, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_execution_time_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_transform_id, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_13ReadOperation_start(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_unused_impulse, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_start(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_teardown(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_pcollection_count_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v_tag_to_pcollection_id, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_v_self, PyObject *__pyx_v_transform_id, PyObject *__pyx_v_tag_to_pcollection_id, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_16CombineOperation_process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_16CombineOperation_finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_16CombineOperation_teardown(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_wkv, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_teardown(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_output_key(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_wkey, PyObject *__pyx_v_accumulator, PyObject *__pyx_v_timestamp, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_16FlattenOperation_process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_FlattenOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o, int __pyx_skip_dispatch); /* proto*/

/* Module declarations from 'cython' */

/* Module declarations from 'libc.stdint' */

/* Module declarations from 'apache_beam.utils.windowed_value' */
static PyTypeObject *__pyx_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_vp_11apache_beam_7runners_6common_TaggedOutput = 0;
#define __pyx_v_11apache_beam_7runners_6common_TaggedOutput (*__pyx_vp_11apache_beam_7runners_6common_TaggedOutput)
static PyTypeObject **__pyx_vp_11apache_beam_7runners_6common_TimestampedValue = 0;
#define __pyx_v_11apache_beam_7runners_6common_TimestampedValue (*__pyx_vp_11apache_beam_7runners_6common_TimestampedValue)

/* Module declarations from 'apache_beam.runners.worker' */

/* Module declarations from 'libc' */

/* Module declarations from 'apache_beam.utils.counters' */
static PyTypeObject *__pyx_ptype_11apache_beam_5utils_8counters_Counter = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter = 0;

/* Module declarations from 'libc.string' */

/* Module declarations from 'libc.stdio' */

/* Module declarations from '__builtin__' */

/* Module declarations from 'cpython.type' */
static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;

/* Module declarations from 'cpython.version' */

/* Module declarations from 'cpython.ref' */

/* Module declarations from 'cpython.exc' */

/* Module declarations from 'cpython.module' */

/* Module declarations from 'cpython.mem' */

/* Module declarations from 'cpython.tuple' */

/* Module declarations from 'cpython.list' */

/* Module declarations from 'cpython.sequence' */

/* Module declarations from 'cpython.mapping' */

/* Module declarations from 'cpython.iterator' */

/* Module declarations from 'cpython.number' */

/* Module declarations from 'cpython.int' */

/* Module declarations from '__builtin__' */

/* Module declarations from 'cpython.bool' */
static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0;

/* Module declarations from 'cpython.long' */

/* Module declarations from 'cpython.float' */

/* Module declarations from '__builtin__' */

/* Module declarations from 'cpython.complex' */
static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0;

/* Module declarations from 'cpython.string' */

/* Module declarations from 'cpython.unicode' */

/* Module declarations from 'cpython.dict' */

/* Module declarations from 'cpython.instance' */

/* Module declarations from 'cpython.function' */

/* Module declarations from 'cpython.method' */

/* Module declarations from 'cpython.weakref' */

/* Module declarations from 'cpython.getargs' */

/* Module declarations from 'cpython.pythread' */

/* Module declarations from 'cpython.pystate' */

/* Module declarations from 'cpython.cobject' */

/* Module declarations from 'cpython.oldbuffer' */

/* Module declarations from 'cpython.set' */

/* Module declarations from 'cpython.buffer' */

/* Module declarations from 'cpython.bytes' */

/* Module declarations from 'cpython.pycapsule' */

/* Module declarations from 'cpython' */

/* Module declarations from 'cpython.object' */

/* Module declarations from 'datetime' */

/* Module declarations from 'cpython.datetime' */
static PyTypeObject *__pyx_ptype_7cpython_8datetime_date = 0;
static PyTypeObject *__pyx_ptype_7cpython_8datetime_time = 0;
static PyTypeObject *__pyx_ptype_7cpython_8datetime_datetime = 0;
static PyTypeObject *__pyx_ptype_7cpython_8datetime_timedelta = 0;
static PyTypeObject *__pyx_ptype_7cpython_8datetime_tzinfo = 0;

/* Module declarations from 'apache_beam.metrics.cells' */
static PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData = 0;

/* Module declarations from 'apache_beam.metrics.execution' */
static PyTypeObject *__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7metrics_9execution_MetricUpdater = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer = 0;
static PyObject **__pyx_vp_11apache_beam_7metrics_9execution_get_current_tracker = 0;
#define __pyx_v_11apache_beam_7metrics_9execution_get_current_tracker (*__pyx_vp_11apache_beam_7metrics_9execution_get_current_tracker)
static PyObject **__pyx_vp_11apache_beam_7metrics_9execution__DEFAULT = 0;
#define __pyx_v_11apache_beam_7metrics_9execution__DEFAULT (*__pyx_vp_11apache_beam_7metrics_9execution__DEFAULT)

/* Module declarations from 'apache_beam.runners.worker.statesampler_fast' */
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState = 0;

/* Module declarations from 'apache_beam.runners.worker.opcounters' */
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SumAccumulator = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters = 0;

/* Module declarations from 'apache_beam.runners.worker.operations' */
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10operations_FlattenOperation = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs = 0;
static struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_11apache_beam_7runners_6worker_10operations__globally_windowed_value = 0;
static PyTypeObject *__pyx_v_11apache_beam_7runners_6worker_10operations__global_window_type = 0;
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_ConsumerSet__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_SingletonElementConsumerSet__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_GeneralPurposeConsumerSet__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_Operation__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_ReadOperation__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_ImpulseReadOperation__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_DoOperation__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_SdfTruncateSizedRestrictions__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_SdfProcessSizedElements__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_CombineOperation__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_PGBKCVOperation__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_FlattenOperation__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_FlattenOperation *, PyObject *); /*proto*/
#define __Pyx_MODULE_NAME "apache_beam.runners.worker.operations"
extern int __pyx_module_is_main_apache_beam__runners__worker__operations;
int __pyx_module_is_main_apache_beam__runners__worker__operations = 0;

/* Implementation of 'apache_beam.runners.worker.operations' */
static PyObject *__pyx_builtin_ImportError;
static PyObject *__pyx_builtin_object;
static PyObject *__pyx_builtin_staticmethod;
static PyObject *__pyx_builtin_RuntimeWarning;
static PyObject *__pyx_builtin_super;
static PyObject *__pyx_builtin_AssertionError;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_filter;
static PyObject *__pyx_builtin_NotImplementedError;
static PyObject *__pyx_builtin_min;
static PyObject *__pyx_builtin_max;
static PyObject *__pyx_builtin_sum;
static PyObject *__pyx_builtin_reversed;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_zip;
static const char __pyx_k_i[] = "i";
static const char __pyx_k_o[] = "o";
static const char __pyx_k_s[] = " %s";
static const char __pyx_k_v[] = "v";
static const char __pyx_k__9[] = "[";
static const char __pyx_k_el[] = "el";
static const char __pyx_k_fn[] = "_fn";
static const char __pyx_k_ix[] = "ix";
static const char __pyx_k_kw[] = "kw";
static const char __pyx_k_op[] = "op";
static const char __pyx_k_si[] = "si";
static const char __pyx_k_to[] = " to ";
static const char __pyx_k_vs[] = "vs";
static const char __pyx_k_Any[] = "Any";
static const char __pyx_k__10[] = "]";
static const char __pyx_k__50[] = ", ";
static const char __pyx_k__51[] = "<";
static const char __pyx_k__52[] = " ";
static const char __pyx_k__53[] = ">";
static const char __pyx_k_doc[] = "__doc__";
static const char __pyx_k_fns[] = "fns";
static const char __pyx_k_get[] = "get";
static const char __pyx_k_key[] = "key";
static const char __pyx_k_max[] = "max";
static const char __pyx_k_min[] = "min";
static const char __pyx_k_new[] = "__new__";
static const char __pyx_k_ops[] = "_ops";
static const char __pyx_k_out[] = ".out";
static const char __pyx_k_s_2[] = "<%s>";
static const char __pyx_k_sum[] = "sum";
static const char __pyx_k_tag[] = "tag";
static const char __pyx_k_urn[] = "urn";
static const char __pyx_k_wkv[] = "wkv";
static const char __pyx_k_zip[] = "zip";
static const char __pyx_k_Dict[] = "Dict";
static const char __pyx_k_List[] = "List";
static const char __pyx_k_None[] = "None";
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_exit[] = "__exit__";
static const char __pyx_k_fn_2[] = "fn";
static const char __pyx_k_func[] = "__func__";
static const char __pyx_k_init[] = "__init__";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_mean[] = "mean";
static const char __pyx_k_name[] = "__name__";
static const char __pyx_k_once[] = "once";
static const char __pyx_k_read[] = "read";
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_type[] = "type";
static const char __pyx_k_warn[] = "warn";
static const char __pyx_k_wkey[] = "wkey";
static const char __pyx_k_DEBUG[] = "DEBUG";
static const char __pyx_k_RLock[] = "RLock";
static const char __pyx_k_Tuple[] = "Tuple";
static const char __pyx_k_apply[] = "apply";
static const char __pyx_k_batch[] = "batch";
static const char __pyx_k_class[] = "__class__";
static const char __pyx_k_close[] = "close";
static const char __pyx_k_coder[] = "coder";
static const char __pyx_k_debug[] = "debug";
static const char __pyx_k_enter[] = "__enter__";
static const char __pyx_k_flush[] = "flush";
static const char __pyx_k_index[] = "index";
static const char __pyx_k_input[] = "input";
static const char __pyx_k_items[] = "items";
static const char __pyx_k_limit[] = "limit";
static const char __pyx_k_loads[] = "loads";
static const char __pyx_k_phase[] = "phase";
static const char __pyx_k_reset[] = "reset";
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_super[] = "super";
static const char __pyx_k_table[] = "table";
static const char __pyx_k_throw[] = "throw";
static const char __pyx_k_total[] = "total";
static const char __pyx_k_value[] = "value";
static const char __pyx_k_LOGGER[] = "_LOGGER";
static const char __pyx_k_append[] = "append";
static const char __pyx_k_coders[] = "coders";
static const char __pyx_k_commit[] = "commit";
static const char __pyx_k_common[] = "common";
static const char __pyx_k_create[] = "create";
static const char __pyx_k_dict_2[] = "_dict";
static const char __pyx_k_encode[] = "encode";
static const char __pyx_k_filter[] = "filter";
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_iobase[] = "iobase";
static const char __pyx_k_kwargs[] = "kwargs";
static const char __pyx_k_labels[] = "labels";
static const char __pyx_k_module[] = "__module__";
static const char __pyx_k_name_2[] = "name";
static const char __pyx_k_object[] = "object";
static const char __pyx_k_output[] = "output";
static const char __pyx_k_pickle[] = "pickle";
static const char __pyx_k_reduce[] = "__reduce__";
static const char __pyx_k_return[] = "return";
static const char __pyx_k_source[] = "source";
static const char __pyx_k_suffix[] = "suffix";
static const char __pyx_k_target[] = "target";
static const char __pyx_k_to_key[] = "to_key";
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_Mapping[] = "Mapping";
static const char __pyx_k_coder_2[] = ", coder=";
static const char __pyx_k_combine[] = "combine";
static const char __pyx_k_compact[] = "compact";
static const char __pyx_k_execute[] = "execute";
static const char __pyx_k_logging[] = "logging";
static const char __pyx_k_missing[] = "__missing__";
static const char __pyx_k_outputs[] = "outputs";
static const char __pyx_k_payload[] = "payload";
static const char __pyx_k_pickler[] = "pickler";
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_sampler[] = "sampler";
static const char __pyx_k_sources[] = "sources";
static const char __pyx_k_windows[] = "windows";
static const char __pyx_k_Hashable[] = "Hashable";
static const char __pyx_k_Iterable[] = "Iterable";
static const char __pyx_k_Iterator[] = "Iterator";
static const char __pyx_k_Optional[] = "Optional";
static const char __pyx_k_Receiver[] = "Receiver";
static const char __pyx_k_consumer[] = "consumer";
static const char __pyx_k_elements[] = "elements";
static const char __pyx_k_finalize[] = "finalize";
static const char __pyx_k_get_impl[] = "get_impl";
static const char __pyx_k_getstate[] = "__getstate__";
static const char __pyx_k_map_task[] = "map_task";
static const char __pyx_k_max_size[] = "max_size";
static const char __pyx_k_paneinfo[] = "paneinfo";
static const char __pyx_k_producer[] = "producer";
static const char __pyx_k_progress[] = "progress";
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_receiver[] = "receiver";
static const char __pyx_k_residual[] = "residual";
static const char __pyx_k_reversed[] = "reversed";
static const char __pyx_k_setstate[] = "__setstate__";
static const char __pyx_k_side_tag[] = "side_tag";
static const char __pyx_k_teardown[] = "teardown";
static const char __pyx_k_user_key[] = "user_key";
static const char __pyx_k_warnings[] = "warnings";
static const char __pyx_k_windowfn[] = "windowfn";
static const char __pyx_k_CombineFn[] = "CombineFn";
static const char __pyx_k_DoFnState[] = "DoFnState";
static const char __pyx_k_FrozenSet[] = "FrozenSet";
static const char __pyx_k_Operation[] = "Operation";
static const char __pyx_k_TimerSpec[] = "TimerSpec";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_add_input[] = "add_input";
static const char __pyx_k_combiners[] = "combiners";
static const char __pyx_k_consumers[] = "consumers";
static const char __pyx_k_enumerate[] = "enumerate";
static const char __pyx_k_getLogger[] = "getLogger";
static const char __pyx_k_metaclass[] = "__metaclass__";
static const char __pyx_k_opcounter[] = "opcounter";
static const char __pyx_k_operation[] = "operation";
static const char __pyx_k_primaries[] = "primaries";
static const char __pyx_k_pyx_state[] = "__pyx_state";
static const char __pyx_k_receivers[] = "receivers";
static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
static const char __pyx_k_residuals[] = "residuals";
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_try_split[] = "try_split";
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_DoFnRunner[] = "DoFnRunner";
static const char __pyx_k_FloatCoder[] = "FloatCoder";
static const char __pyx_k_NamedTuple[] = "NamedTuple";
static const char __pyx_k_WorkerDoFn[] = "WorkerDoFn";
static const char __pyx_k_WorkerRead[] = "WorkerRead";
static const char __pyx_k_batch_type[] = "batch_type";
static const char __pyx_k_combine_fn[] = "combine_fn";
static const char __pyx_k_is_default[] = "is_default";
static const char __pyx_k_map_task_2[] = "_map_task";
static const char __pyx_k_opcounters[] = "opcounters";
static const char __pyx_k_operations[] = "operations";
static const char __pyx_k_output_key[] = "output_key";
static const char __pyx_k_output_num[] = "output_num";
static const char __pyx_k_produce_fn[] = "produce_fn";
static const char __pyx_k_ptransform[] = "ptransform";
static const char __pyx_k_pyx_result[] = "__pyx_result";
static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
static const char __pyx_k_si_counter[] = "si_counter";
static const char __pyx_k_side_input[] = "side-input";
static const char __pyx_k_sideinputs[] = "sideinputs";
static const char __pyx_k_timer_data[] = "timer_data";
static const char __pyx_k_timer_info[] = "timer_info";
static const char __pyx_k_timer_spec[] = "timer_spec";
static const char __pyx_k_view_class[] = "view_class";
static const char __pyx_k_ConsumerSet[] = "ConsumerSet";
static const char __pyx_k_DO_NOT_CARE[] = "DO_NOT_CARE";
static const char __pyx_k_DataSampler[] = "DataSampler";
static const char __pyx_k_DefaultDict[] = "DefaultDict";
static const char __pyx_k_DoOperation[] = "DoOperation";
static const char __pyx_k_Finishing_s[] = "Finishing %s";
static const char __pyx_k_ImportError[] = "ImportError";
static const char __pyx_k_NameContext[] = "NameContext";
static const char __pyx_k_OpInputInfo[] = "OpInputInfo";
static const char __pyx_k_PickleError[] = "PickleError";
static const char __pyx_k_WorkerWrite[] = "WorkerWrite";
static const char __pyx_k_accumulator[] = "accumulator";
static const char __pyx_k_apache_beam[] = "apache_beam";
static const char __pyx_k_collections[] = "collections";
static const char __pyx_k_defaultdict[] = "defaultdict";
static const char __pyx_k_has_element[] = "has_element";
static const char __pyx_k_input_index[] = "input_index";
static const char __pyx_k_iterator_fn[] = "iterator_fn";
static const char __pyx_k_metrics_pb2[] = "metrics_pb2";
static const char __pyx_k_output_tags[] = "output_tags";
static const char __pyx_k_pcollection[] = "pcollection";
static const char __pyx_k_receivers_s[] = "receivers=[%s]";
static const char __pyx_k_side_inputs[] = "side_inputs";
static const char __pyx_k_step_name_2[] = "_step_name";
static const char __pyx_k_SideInputMap[] = "SideInputMap";
static const char __pyx_k_SourceBundle[] = "SourceBundle";
static const char __pyx_k_StateSampler[] = "StateSampler";
static const char __pyx_k_add_receiver[] = "add_receiver";
static const char __pyx_k_data_sampler[] = "data_sampler";
static const char __pyx_k_isEnabledFor[] = "isEnabledFor";
static const char __pyx_k_is_recursive[] = "is_recursive";
static const char __pyx_k_is_streaming[] = "is_streaming";
static const char __pyx_k_logging_name[] = "logging_name";
static const char __pyx_k_metrics_name[] = "metrics_name";
static const char __pyx_k_name_context[] = "name_context";
static const char __pyx_k_output_coder[] = "output_coder";
static const char __pyx_k_output_index[] = "output_index";
static const char __pyx_k_output_value[] = "output_value";
static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
static const char __pyx_k_read_counter[] = "read_counter";
static const char __pyx_k_scoped_state[] = "scoped_state";
static const char __pyx_k_shuffle_sink[] = "shuffle_sink";
static const char __pyx_k_simplefilter[] = "simplefilter";
static const char __pyx_k_staticmethod[] = "staticmethod";
static const char __pyx_k_str_internal[] = "str_internal";
static const char __pyx_k_stringsource[] = "stringsource";
static const char __pyx_k_transform_id[] = "transform_id";
static const char __pyx_k_use_setstate[] = "use_setstate";
static const char __pyx_k_view_options[] = "view_options";
static const char __pyx_k_GlobalWindows[] = "GlobalWindows";
static const char __pyx_k_IterableCoder[] = "IterableCoder";
static const char __pyx_k_MeanCombineFn[] = "MeanCombineFn";
static const char __pyx_k_OUTPUT_AT_EOW[] = "OUTPUT_AT_EOW";
static const char __pyx_k_OutputSampler[] = "OutputSampler";
static const char __pyx_k_PGBKOperation[] = "PGBKOperation";
static const char __pyx_k_PROGRESS_TYPE[] = "PROGRESS_TYPE";
static const char __pyx_k_ReadOperation[] = "ReadOperation";
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_WorkerFlatten[] = "WorkerFlatten";
static const char __pyx_k_create_labels[] = "create_labels";
static const char __pyx_k_explode_batch[] = "explode_batch";
static const char __pyx_k_has_callbacks[] = "has_callbacks";
static const char __pyx_k_int64_counter[] = "int64_counter";
static const char __pyx_k_len_consumers[] = ", len(consumers)=";
static const char __pyx_k_max_timestamp[] = "max_timestamp";
static const char __pyx_k_name_contexts[] = "name_contexts";
static const char __pyx_k_output_buffer[] = "output_buffer";
static const char __pyx_k_output_coders[] = "output_coders";
static const char __pyx_k_process_batch[] = "process_batch";
static const char __pyx_k_process_timer[] = "process_timer";
static const char __pyx_k_produce_batch[] = "produce_batch";
static const char __pyx_k_receive_batch[] = "receive_batch";
static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
static const char __pyx_k_serialized_fn[] = "serialized_fn";
static const char __pyx_k_state_sampler[] = "state_sampler";
static const char __pyx_k_stop_position[] = "stop_position";
static const char __pyx_k_AssertionError[] = "AssertionError";
static const char __pyx_k_BATCH_REQUIRED[] = "BATCH_REQUIRED";
static const char __pyx_k_BatchConverter[] = "BatchConverter";
static const char __pyx_k_CountCombineFn[] = "CountCombineFn";
static const char __pyx_k_MAX_BATCH_SIZE[] = "MAX_BATCH_SIZE";
static const char __pyx_k_MonitoringInfo[] = "MonitoringInfo";
static const char __pyx_k_RuntimeWarning[] = "RuntimeWarning";
static const char __pyx_k_add_timer_info[] = "add_timer_info";
static const char __pyx_k_apache_beam_io[] = "apache_beam.io";
static const char __pyx_k_completed_work[] = "completed_work";
static const char __pyx_k_create_pgbk_op[] = "create_pgbk_op";
static const char __pyx_k_declaring_step[] = "declaring_step";
static const char __pyx_k_fire_timestamp[] = "fire_timestamp";
static const char __pyx_k_get_dofn_specs[] = "get_dofn_specs";
static const char __pyx_k_main_input_tag[] = "main_input_tag";
static const char __pyx_k_operation_name[] = "operation_name";
static const char __pyx_k_output_sampler[] = "output_sampler";
static const char __pyx_k_printable_name[] = "printable_name";
static const char __pyx_k_remaining_work[] = "remaining_work";
static const char __pyx_k_shuffle_source[] = "shuffle_source";
static const char __pyx_k_side_input_map[] = "side_input_map";
static const char __pyx_k_start_position[] = "start_position";
static const char __pyx_k_tags_and_types[] = "tags_and_types";
static const char __pyx_k_unused_impulse[] = "unused_impulse";
static const char __pyx_k_windowed_batch[] = "windowed_batch";
static const char __pyx_k_windowed_value[] = "windowed_value";
static const char __pyx_k_with_completed[] = "with_completed";
static const char __pyx_k_BATCH_FORBIDDEN[] = "BATCH_FORBIDDEN";
static const char __pyx_k_Operation_reset[] = "Operation.reset";
static const char __pyx_k_Operation_setup[] = "Operation.setup";
static const char __pyx_k_Operation_start[] = "Operation.start";
static const char __pyx_k_PGBKCVOperation[] = "PGBKCVOperation";
static const char __pyx_k_Starting_op_d_s[] = "Starting op %d %s";
static const char __pyx_k_TOTAL_MSECS_URN[] = "TOTAL_MSECS_URN";
static const char __pyx_k_TaggedReceivers[] = "_TaggedReceivers";
static const char __pyx_k_WorkerCombineFn[] = "WorkerCombineFn";
static const char __pyx_k_counter_factory[] = "counter_factory";
static const char __pyx_k_element_counter[] = "element_counter";
static const char __pyx_k_element_sampler[] = "element_sampler";
static const char __pyx_k_finalize_bundle[] = "finalize_bundle";
static const char __pyx_k_operation_specs[] = "operation_specs";
static const char __pyx_k_process_defined[] = "_process_defined";
static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
static const char __pyx_k_side_input_maps[] = "side_input_maps";
static const char __pyx_k_state_sampler_2[] = "_state_sampler";
static const char __pyx_k_timer_family_id[] = "timer_family_id";
static const char __pyx_k_CombineOperation[] = "CombineOperation";
static const char __pyx_k_DistributionData[] = "DistributionData";
static const char __pyx_k_EmulatedIterable[] = "EmulatedIterable";
static const char __pyx_k_ExecutionContext[] = "ExecutionContext";
static const char __pyx_k_FlattenOperation[] = "FlattenOperation";
static const char __pyx_k_MetricsContainer[] = "MetricsContainer";
static const char __pyx_k_Operation_finish[] = "Operation.finish";
static const char __pyx_k_Operation_output[] = "Operation.output";
static const char __pyx_k_cast_to_receiver[] = "_cast_to_receiver";
static const char __pyx_k_create_operation[] = "create_operation";
static const char __pyx_k_curry_combine_fn[] = "curry_combine_fn";
static const char __pyx_k_main_input_coder[] = "main_input_coder";
static const char __pyx_k_monitoring_infos[] = "monitoring_infos";
static const char __pyx_k_printable_fields[] = "printable_fields";
static const char __pyx_k_read_side_inputs[] = "_read_side_inputs";
static const char __pyx_k_restart_sampling[] = "restart_sampling";
static const char __pyx_k_supports_batches[] = "supports_batches";
static const char __pyx_k_tagged_receivers[] = "tagged_receivers";
static const char __pyx_k_DoOperation_reset[] = "DoOperation.reset";
static const char __pyx_k_DoOperation_setup[] = "DoOperation.setup";
static const char __pyx_k_DoOperation_start[] = "DoOperation.start";
static const char __pyx_k_ELEMENT_COUNT_URN[] = "ELEMENT_COUNT_URN";
static const char __pyx_k_Operation_process[] = "Operation.process";
static const char __pyx_k_Processing_s_in_s[] = "Processing [%s] in %s";
static const char __pyx_k_TimestampCombiner[] = "TimestampCombiner";
static const char __pyx_k_apache_sideinputs[] = "apache_sideinputs";
static const char __pyx_k_cast_to_operation[] = "_cast_to_operation";
static const char __pyx_k_counter_factory_2[] = "_counter_factory";
static const char __pyx_k_dynamic_timer_tag[] = "dynamic_timer_tag";
static const char __pyx_k_execution_context[] = "execution_context";
static const char __pyx_k_get_range_tracker[] = "get_range_tracker";
static const char __pyx_k_mean_byte_counter[] = "mean_byte_counter";
static const char __pyx_k_metrics_container[] = "metrics_container";
static const char __pyx_k_sampled_msecs_int[] = "sampled_msecs_int";
static const char __pyx_k_supports_elements[] = "supports_elements";
static const char __pyx_k_test_shuffle_sink[] = "test_shuffle_sink";
static const char __pyx_k_BatchingPreference[] = "BatchingPreference";
static const char __pyx_k_ConsumerSet_create[] = "ConsumerSet.create";
static const char __pyx_k_DoOperation_finish[] = "DoOperation.finish";
static const char __pyx_k_Input_to_operation[] = "Input to operation ";
static const char __pyx_k_Operation_teardown[] = "Operation.teardown";
static const char __pyx_k_Setup_called_for_s[] = "Setup called for %s";
static const char __pyx_k_SplitResultPrimary[] = "SplitResultPrimary";
static const char __pyx_k_WORK_COMPLETED_URN[] = "WORK_COMPLETED_URN";
static const char __pyx_k_WORK_REMAINING_URN[] = "WORK_REMAINING_URN";
static const char __pyx_k_WindowedValueCoder[] = "WindowedValueCoder";
static const char __pyx_k_WorkerMergeWindows[] = "WorkerMergeWindows";
static const char __pyx_k_WorkerShuffleWrite[] = "WorkerShuffleWrite";
static const char __pyx_k_as_windowed_values[] = "as_windowed_values";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_create_accumulator[] = "create_accumulator";
static const char __pyx_k_fraction_completed[] = "fraction_completed";
static const char __pyx_k_fraction_remaining[] = "fraction_remaining";
static const char __pyx_k_get_output_sampler[] = "get_output_sampler";
static const char __pyx_k_global_window_type[] = "_global_window_type";
static const char __pyx_k_int64_distribution[] = "int64_distribution";
static const char __pyx_k_needs_finalization[] = "needs_finalization";
static const char __pyx_k_process_user_timer[] = "process_user_timer";
static const char __pyx_k_sampler_for_output[] = "sampler_for_output";
static const char __pyx_k_timestamp_combiner[] = "timestamp_combiner";
static const char __pyx_k_total_output_bytes[] = "total_output_bytes";
static const char __pyx_k_user_state_context[] = "user_state_context";
static const char __pyx_k_DoOperation_process[] = "DoOperation.process";
static const char __pyx_k_NativeReadOperation[] = "NativeReadOperation";
static const char __pyx_k_NotImplementedError[] = "NotImplementedError";
static const char __pyx_k_Operation_try_split[] = "Operation.try_split";
static const char __pyx_k_PGBKOperation_flush[] = "PGBKOperation.flush";
static const char __pyx_k_ReadOperation_start[] = "ReadOperation.start";
static const char __pyx_k_SplitResultResidual[] = "SplitResultResidual";
static const char __pyx_k_WorkerInMemoryWrite[] = "WorkerInMemoryWrite";
static const char __pyx_k_apache_beam_metrics[] = "apache_beam.metrics";
static const char __pyx_k_apache_beam_runners[] = "apache_beam.runners";
static const char __pyx_k_producer_type_hints[] = "producer_type_hints";
static const char __pyx_k_test_shuffle_sink_2[] = "_test_shuffle_sink";
static const char __pyx_k_test_shuffle_source[] = "test_shuffle_source";
static const char __pyx_k_DoOperation_teardown[] = "DoOperation.teardown";
static const char __pyx_k_ImpulseReadOperation[] = "ImpulseReadOperation";
static const char __pyx_k_NativeWriteOperation[] = "NativeWriteOperation";
static const char __pyx_k_PGBKOperation___init[] = "PGBKOperation.__init__";
static const char __pyx_k_PGBKOperation_finish[] = "PGBKOperation.finish";
static const char __pyx_k_apache_beam_internal[] = "apache_beam.internal";
static const char __pyx_k_delayed_applications[] = "delayed_applications";
static const char __pyx_k_from_windowed_values[] = "from_windowed_values";
static const char __pyx_k_init___locals_lambda[] = "__init__.<locals>.<lambda>";
static const char __pyx_k_scoped_process_state[] = "scoped_process_state";
static const char __pyx_k_ConsumerSet_try_split[] = "ConsumerSet.try_split";
static const char __pyx_k_PGBKCVOperation_setup[] = "PGBKCVOperation.setup";
static const char __pyx_k_PGBKOperation_process[] = "PGBKOperation.process";
static const char __pyx_k_SAMPLED_BYTE_SIZE_URN[] = "SAMPLED_BYTE_SIZE_URN";
static const char __pyx_k_ShuffleWriteOperation[] = "ShuffleWriteOperation";
static const char __pyx_k_SimpleMapTaskExecutor[] = "SimpleMapTaskExecutor";
static const char __pyx_k_Teardown_called_for_s[] = "Teardown called for %s";
static const char __pyx_k_WorkerSideInputSource[] = "WorkerSideInputSource";
static const char __pyx_k_debug_logging_enabled[] = "debug_logging_enabled";
static const char __pyx_k_fraction_of_remainder[] = "fraction_of_remainder";
static const char __pyx_k_input_batch_converter[] = "input_batch_converter";
static const char __pyx_k_process_batch_defined[] = "_process_batch_defined";
static const char __pyx_k_tag_to_pcollection_id[] = "tag_to_pcollection_id";
static const char __pyx_k_test_shuffle_source_2[] = "_test_shuffle_source";
static const char __pyx_k_update_counters_batch[] = "update_counters_batch";
static const char __pyx_k_update_counters_start[] = "update_counters_start";
static const char __pyx_k_user_monitoring_infos[] = "user_monitoring_infos";
static const char __pyx_k_write_windowed_values[] = "write_windowed_values";
static const char __pyx_k_CombineOperation_setup[] = "CombineOperation.setup";
static const char __pyx_k_InMemoryWriteOperation[] = "InMemoryWriteOperation";
static const char __pyx_k_Operation_add_receiver[] = "Operation.add_receiver";
static const char __pyx_k_Operation_str_internal[] = "Operation.str_internal";
static const char __pyx_k_PGBKCVOperation_finish[] = "PGBKCVOperation.finish";
static const char __pyx_k_START_BUNDLE_MSECS_URN[] = "START_BUNDLE_MSECS_URN";
static const char __pyx_k_SdfSplitResultsPrimary[] = "SdfSplitResultsPrimary";
static const char __pyx_k_TaggedReceivers___init[] = "_TaggedReceivers.__init__";
static const char __pyx_k_apache_beam_transforms[] = "apache_beam.transforms";
static const char __pyx_k_output_batch_converter[] = "output_batch_converter";
static const char __pyx_k_pyx_unpickle_Operation[] = "__pyx_unpickle_Operation";
static const char __pyx_k_update_counters_finish[] = "update_counters_finish";
static const char __pyx_k_CombineOperation_finish[] = "CombineOperation.finish";
static const char __pyx_k_FINISH_BUNDLE_MSECS_URN[] = "FINISH_BUNDLE_MSECS_URN";
static const char __pyx_k_Operation_process_batch[] = "Operation.process_batch";
static const char __pyx_k_PGBKCVOperation_process[] = "PGBKCVOperation.process";
static const char __pyx_k_PhasedCombineFnExecutor[] = "PhasedCombineFnExecutor";
static const char __pyx_k_SdfProcessSizedElements[] = "SdfProcessSizedElements";
static const char __pyx_k_SdfSplitResultsResidual[] = "SdfSplitResultsResidual";
static const char __pyx_k_WorkerPartialGroupByKey[] = "WorkerPartialGroupByKey";
static const char __pyx_k_get_batching_preference[] = "get_batching_preference";
static const char __pyx_k_globally_windowed_value[] = "_globally_windowed_value";
static const char __pyx_k_worker_printable_fields[] = "worker_printable_fields";
static const char __pyx_k_CallableWrapperCombineFn[] = "CallableWrapperCombineFn";
static const char __pyx_k_CombineOperation_process[] = "CombineOperation.process";
static const char __pyx_k_FlattenOperation_process[] = "FlattenOperation.process";
static const char __pyx_k_PGBKCVOperation_teardown[] = "PGBKCVOperation.teardown";
static const char __pyx_k_PROCESS_BUNDLE_MSECS_URN[] = "PROCESS_BUNDLE_MSECS_URN";
static const char __pyx_k_consumer_batch_converter[] = "consumer_batch_converter";
static const char __pyx_k_current_element_progress[] = "current_element_progress";
static const char __pyx_k_producer_batch_converter[] = "producer_batch_converter";
static const char __pyx_k_pyx_unpickle_ConsumerSet[] = "__pyx_unpickle_ConsumerSet";
static const char __pyx_k_pyx_unpickle_DoOperation[] = "__pyx_unpickle_DoOperation";
static const char __pyx_k_CombineOperation_teardown[] = "CombineOperation.teardown";
static const char __pyx_k_DoOperation_process_batch[] = "DoOperation.process_batch";
static const char __pyx_k_DoOperation_process_timer[] = "DoOperation.process_timer";
static const char __pyx_k_GeneralPurposeConsumerSet[] = "GeneralPurposeConsumerSet";
static const char __pyx_k_Operation___reduce_cython[] = "Operation.__reduce_cython__";
static const char __pyx_k_Operation_finalize_bundle[] = "Operation.finalize_bundle";
static const char __pyx_k_TaggedReceivers___missing[] = "_TaggedReceivers.__missing__";
static const char __pyx_k_Unknown_side_input_type_r[] = "Unknown side input type: %r";
static const char __pyx_k_WorkerGroupingShuffleRead[] = "WorkerGroupingShuffleRead";
static const char __pyx_k_apache_beam_metrics_cells[] = "apache_beam.metrics.cells";
static const char __pyx_k_consumer_batch_preference[] = "consumer_batch_preference";
static const char __pyx_k_get_input_batch_converter[] = "get_input_batch_converter";
static const char __pyx_k_DoOperation_add_timer_info[] = "DoOperation.add_timer_info";
static const char __pyx_k_Operation_monitoring_infos[] = "Operation.monitoring_infos";
static const char __pyx_k_PGBKCVOperation_output_key[] = "PGBKCVOperation.output_key";
static const char __pyx_k_WorkerUngroupedShuffleRead[] = "WorkerUngroupedShuffleRead";
static const char __pyx_k_Worker_operations_executor[] = "Worker operations executor.";
static const char __pyx_k_apache_beam_runners_common[] = "apache_beam.runners.common";
static const char __pyx_k_apache_beam_runners_worker[] = "apache_beam.runners.worker";
static const char __pyx_k_get_output_batch_converter[] = "get_output_batch_converter";
static const char __pyx_k_pyx_unpickle_ReadOperation[] = "__pyx_unpickle_ReadOperation";
static const char __pyx_k_runtime_output_constraints[] = "_runtime_output_constraints";
static const char __pyx_k_ConsumerSet___reduce_cython[] = "ConsumerSet.__reduce_cython__";
static const char __pyx_k_DoOperation___reduce_cython[] = "DoOperation.__reduce_cython__";
static const char __pyx_k_DoOperation_finalize_bundle[] = "DoOperation.finalize_bundle";
static const char __pyx_k_GroupedShuffleReadOperation[] = "GroupedShuffleReadOperation";
static const char __pyx_k_InefficientExecutionWarning[] = "InefficientExecutionWarning";
static const char __pyx_k_Operation___setstate_cython[] = "Operation.__setstate_cython__";
static const char __pyx_k_SingletonElementConsumerSet[] = "SingletonElementConsumerSet";
static const char __pyx_k_apache_beam_portability_api[] = "apache_beam.portability.api";
static const char __pyx_k_apache_beam_typehints_batch[] = "apache_beam.typehints.batch";
static const char __pyx_k_get_iterator_fn_for_sources[] = "get_iterator_fn_for_sources";
static const char __pyx_k_must_be_rebatched_from_type[] = " must be rebatched from type ";
static const char __pyx_k_ImpulseReadOperation_process[] = "ImpulseReadOperation.process";
static const char __pyx_k_Operation_needs_finalization[] = "Operation.needs_finalization";
static const char __pyx_k_SdfTruncateSizedRestrictions[] = "SdfTruncateSizedRestrictions";
static const char __pyx_k_SimpleMapTaskExecutor___init[] = "SimpleMapTaskExecutor.__init__";
static const char __pyx_k_pyx_unpickle_PGBKCVOperation[] = "__pyx_unpickle_PGBKCVOperation";
static const char __pyx_k_ConsumerSet___setstate_cython[] = "ConsumerSet.__setstate_cython__";
static const char __pyx_k_DoOperation___setstate_cython[] = "DoOperation.__setstate_cython__";
static const char __pyx_k_DoOperation__read_side_inputs[] = "DoOperation._read_side_inputs";
static const char __pyx_k_ReadOperation___reduce_cython[] = "ReadOperation.__reduce_cython__";
static const char __pyx_k_SimpleMapTaskExecutor_execute[] = "SimpleMapTaskExecutor.execute";
static const char __pyx_k_UngroupedShuffleReadOperation[] = "UngroupedShuffleReadOperation";
static const char __pyx_k_apache_beam_metrics_execution[] = "apache_beam.metrics.execution";
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_get_runtime_performance_hints[] = "_get_runtime_performance_hints";
static const char __pyx_k_pyx_unpickle_CombineOperation[] = "__pyx_unpickle_CombineOperation";
static const char __pyx_k_pyx_unpickle_FlattenOperation[] = "__pyx_unpickle_FlattenOperation";
static const char __pyx_k_DoOperation_needs_finalization[] = "DoOperation.needs_finalization";
static const char __pyx_k_InMemoryWriteOperation_process[] = "InMemoryWriteOperation.process";
static const char __pyx_k_WorkerReifyTimestampAndWindows[] = "WorkerReifyTimestampAndWindows";
static const char __pyx_k_process_with_sized_restriction[] = "process_with_sized_restriction";
static const char __pyx_k_pyx_unpickle_GeneralPurposeCon[] = "__pyx_unpickle_GeneralPurposeConsumerSet";
static const char __pyx_k_pyx_unpickle_ImpulseReadOperat[] = "__pyx_unpickle_ImpulseReadOperation";
static const char __pyx_k_pyx_unpickle_SdfProcessSizedEl[] = "__pyx_unpickle_SdfProcessSizedElements";
static const char __pyx_k_pyx_unpickle_SdfTruncateSizedR[] = "__pyx_unpickle_SdfTruncateSizedRestrictions";
static const char __pyx_k_pyx_unpickle_SingletonElementC[] = "__pyx_unpickle_SingletonElementConsumerSet";
static const char __pyx_k_read_side_inputs_locals_lambda[] = "_read_side_inputs.<locals>.<lambda>";
static const char __pyx_k_to_runner_api_monitoring_infos[] = "to_runner_api_monitoring_infos";
static const char __pyx_k_GeneralPurposeConsumerSet_flush[] = "GeneralPurposeConsumerSet.flush";
static const char __pyx_k_ImpulseReadOperation___setstate[] = "ImpulseReadOperation.__setstate_cython__";
static const char __pyx_k_Operation_user_monitoring_infos[] = "Operation.user_monitoring_infos";
static const char __pyx_k_PGBKCVOperation___reduce_cython[] = "PGBKCVOperation.__reduce_cython__";
static const char __pyx_k_ReadOperation___setstate_cython[] = "ReadOperation.__setstate_cython__";
static const char __pyx_k_SdfProcessSizedElements_current[] = "SdfProcessSizedElements.current_element_progress";
static const char __pyx_k_SdfProcessSizedElements_process[] = "SdfProcessSizedElements.process";
static const char __pyx_k_SingletonElementConsumerSet_try[] = "SingletonElementConsumerSet.try_split";
static const char __pyx_k_TaggedReceivers_total_output_by[] = "_TaggedReceivers.total_output_bytes";
static const char __pyx_k_This_is_very_inefficient_consid[] = ".\nThis is very inefficient, consider re-structuring your pipeline or adding a DoFn to directly convert between these types.";
static const char __pyx_k_apache_beam_runners_worker_data[] = "apache_beam.runners.worker.data_sampler";
static const char __pyx_k_execution_time_monitoring_infos[] = "execution_time_monitoring_infos";
static const char __pyx_k_setup_locals_get_output_sampler[] = "setup.<locals>.get_output_sampler";
static const char __pyx_k_A_write_operation_that_will_writ[] = "A write operation that will write to an in-memory sink.";
static const char __pyx_k_An_executor_for_map_tasks_Stores[] = "An executor for map tasks.\n\n   Stores progress of the read operation that is the first operation of a map\n   task.\n  ";
static const char __pyx_k_BatchGroupAlsoByWindowsOperation[] = "BatchGroupAlsoByWindowsOperation";
static const char __pyx_k_CombineOperation___reduce_cython[] = "CombineOperation.__reduce_cython__";
static const char __pyx_k_CombineOperation___setstate_cyth[] = "CombineOperation.__setstate_cython__";
static const char __pyx_k_ConsumerSet_current_element_prog[] = "ConsumerSet.current_element_progress";
static const char __pyx_k_ConsumerSet_update_counters_batc[] = "ConsumerSet.update_counters_batch";
static const char __pyx_k_ConsumerSet_update_counters_fini[] = "ConsumerSet.update_counters_finish";
static const char __pyx_k_ConsumerSet_update_counters_star[] = "ConsumerSet.update_counters_start";
static const char __pyx_k_DoOperation__get_runtime_perform[] = "DoOperation._get_runtime_performance_hints";
static const char __pyx_k_DoOperation_get_batching_prefere[] = "DoOperation.get_batching_preference";
static const char __pyx_k_DoOperation_get_input_batch_conv[] = "DoOperation.get_input_batch_converter";
static const char __pyx_k_DoOperation_get_output_batch_con[] = "DoOperation.get_output_batch_converter";
static const char __pyx_k_DoOperation_pcollection_count_mo[] = "DoOperation.pcollection_count_monitoring_infos";
static const char __pyx_k_Expected_an_instance_of_operatio[] = "Expected an instance of operation_specs.Worker* class instead of ";
static const char __pyx_k_FlattenOperation___reduce_cython[] = "FlattenOperation.__reduce_cython__";
static const char __pyx_k_FlattenOperation___setstate_cyth[] = "FlattenOperation.__setstate_cython__";
static const char __pyx_k_GeneralPurposeConsumerSet___redu[] = "GeneralPurposeConsumerSet.__reduce_cython__";
static const char __pyx_k_GeneralPurposeConsumerSet___sets[] = "GeneralPurposeConsumerSet.__setstate_cython__";
static const char __pyx_k_GeneralPurposeConsumerSet_receiv[] = "GeneralPurposeConsumerSet.receive";
static const char __pyx_k_ImpulseReadOperation___reduce_cy[] = "ImpulseReadOperation.__reduce_cython__";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] = "Incompatible checksums (0x%x vs (0x94398cf, 0xdda7ffa, 0xb6f3513) = (coder, consumers, element_sampler, execution_context, opcounter, output_index, output_sampler, step_name))";
static const char __pyx_k_Operation__get_runtime_performan[] = "Operation._get_runtime_performance_hints";
static const char __pyx_k_Operation_current_element_progre[] = "Operation.current_element_progress";
static const char __pyx_k_Operation_execution_time_monitor[] = "Operation.execution_time_monitoring_infos";
static const char __pyx_k_Operation_get_batching_preferenc[] = "Operation.get_batching_preference";
static const char __pyx_k_Operation_get_input_batch_conver[] = "Operation.get_input_batch_converter";
static const char __pyx_k_Operation_get_output_batch_conve[] = "Operation.get_output_batch_converter";
static const char __pyx_k_Operation_pcollection_count_moni[] = "Operation.pcollection_count_monitoring_infos";
static const char __pyx_k_PGBKCVOperation___setstate_cytho[] = "PGBKCVOperation.__setstate_cython__";
static const char __pyx_k_Partial_group_by_key_operation_T[] = "Partial group-by-key operation.\n\n  This takes (windowed) input (key, value) tuples and outputs\n  (key, [value]) tuples, performing a best effort group-by-key for\n  values in this bundle, memory permitting.\n  ";
static const char __pyx_k_ReifyTimestampAndWindowsOperatio[] = "ReifyTimestampAndWindowsOperation";
static const char __pyx_k_SdfProcessSizedElements___reduce[] = "SdfProcessSizedElements.__reduce_cython__";
static const char __pyx_k_SdfProcessSizedElements___setsta[] = "SdfProcessSizedElements.__setstate_cython__";
static const char __pyx_k_SdfProcessSizedElements_monitori[] = "SdfProcessSizedElements.monitoring_infos";
static const char __pyx_k_SdfProcessSizedElements_try_spli[] = "SdfProcessSizedElements.try_split";
static const char __pyx_k_SdfTruncateSizedRestrictions___r[] = "SdfTruncateSizedRestrictions.__reduce_cython__";
static const char __pyx_k_SdfTruncateSizedRestrictions___s[] = "SdfTruncateSizedRestrictions.__setstate_cython__";
static const char __pyx_k_SdfTruncateSizedRestrictions_cur[] = "SdfTruncateSizedRestrictions.current_element_progress";
static const char __pyx_k_SdfTruncateSizedRestrictions_try[] = "SdfTruncateSizedRestrictions.try_split";
static const char __pyx_k_SimpleMapTaskExecutor_operations[] = "SimpleMapTaskExecutor.operations";
static const char __pyx_k_SingletonElementConsumerSet___re[] = "SingletonElementConsumerSet.__reduce_cython__";
static const char __pyx_k_SingletonElementConsumerSet___se[] = "SingletonElementConsumerSet.__setstate_cython__";
static const char __pyx_k_SingletonElementConsumerSet_curr[] = "SingletonElementConsumerSet.current_element_progress";
static const char __pyx_k_SingletonElementConsumerSet_flus[] = "SingletonElementConsumerSet.flush";
static const char __pyx_k_SingletonElementConsumerSet_rece[] = "SingletonElementConsumerSet.receive_batch is not implemented";
static const char __pyx_k_StreamingGroupAlsoByWindowsOpera[] = "StreamingGroupAlsoByWindowsOperation";
static const char __pyx_k_apache_beam_runners_worker_bundl[] = "apache_beam.runners.worker.bundle_processor";
static const char __pyx_k_apache_beam_runners_worker_opera[] = "apache_beam.runners.worker.operations";
static const char __pyx_k_apache_beam_runners_worker_state[] = "apache_beam.runners.worker.statesampler";
static const char __pyx_k_apache_beam_transforms_combiners[] = "apache_beam.transforms.combiners";
static const char __pyx_k_apache_beam_transforms_userstate[] = "apache_beam.transforms.userstate";
static const char __pyx_k_apache_beam_utils_windowed_value[] = "apache_beam.utils.windowed_value";
static const char __pyx_k_dataflow_worker_native_operation[] = "dataflow_worker.native_operations";
static const char __pyx_k_dataflow_worker_shuffle_operatio[] = "dataflow_worker.shuffle_operations";
static const char __pyx_k_pcollection_count_monitoring_inf[] = "pcollection_count_monitoring_infos";
static const char __pyx_k_warning_to_indicate_an_inefficie[] = "warning to indicate an inefficiency in a Beam pipeline.";
static const char __pyx_k_GeneralPurposeConsumerSet_receiv_2[] = "GeneralPurposeConsumerSet.receive_batch";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_2[] = "Incompatible checksums (0x%x vs (0x98fe48c, 0x0c72a15, 0x844e6c1) = (coder, consumer, consumers, element_sampler, execution_context, opcounter, output_index, output_sampler, step_name))";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_3[] = "Incompatible checksums (0x%x vs (0x331df85, 0xff1ef4c, 0x2a2c1fd) = (_batched_elements, coder, consumers, element_consumers, element_sampler, execution_context, has_batch_consumers, opcounter, other_batch_consumers, output_index, output_sampler, passthrough_batch_consumers, producer_batch_converter, step_name))";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_4[] = "Incompatible checksums (0x%x vs (0xb6b9d28, 0x33b1103, 0x0ef7c70) = (consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name))";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_5[] = "Incompatible checksums (0x%x vs (0x216a25a, 0x969cf7e, 0x52d7a2f) = (consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, source, spec, state_sampler, step_name))";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_6[] = "Incompatible checksums (0x%x vs (0x521836b, 0xc916b15, 0xe64c129) = (consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, execution_context, fn, input_info, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context))";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_7[] = "Incompatible checksums (0x%x vs (0x8c483fa, 0x7b38efe, 0xbbdd7bd) = (consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, element_start_output_bytes, execution_context, fn, input_info, lock, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context))";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_8[] = "Incompatible checksums (0x%x vs (0xc1cd107, 0x81f9b57, 0xaa2ec96) = (consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, phased_combine_fn, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name))";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_9[] = "Incompatible checksums (0x%x vs (0xf08ce62, 0x65f6927, 0x6c7b164) = (combine_fn, combine_fn_add_input, combine_fn_compact, consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, is_default_windowing, key_count, max_keys, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name, table, timestamp_combiner))";
static const char __pyx_k_SingletonElementConsumerSet_rece_2[] = "SingletonElementConsumerSet.receive";
static const char __pyx_k_SingletonElementConsumerSet_rece_3[] = "SingletonElementConsumerSet.receive_batch";
static const char __pyx_k_apache_beam_runners_worker_opera_2[] = "apache_beam/runners/worker/operations.py";
static PyObject *__pyx_kp_s_A_write_operation_that_will_writ;
static PyObject *__pyx_kp_s_An_executor_for_map_tasks_Stores;
static PyObject *__pyx_n_s_Any;
static PyObject *__pyx_n_s_AssertionError;
static PyObject *__pyx_n_s_BATCH_FORBIDDEN;
static PyObject *__pyx_n_s_BATCH_REQUIRED;
static PyObject *__pyx_n_s_BatchConverter;
static PyObject *__pyx_n_s_BatchGroupAlsoByWindowsOperation;
static PyObject *__pyx_n_s_BatchingPreference;
static PyObject *__pyx_n_s_CallableWrapperCombineFn;
static PyObject *__pyx_n_s_CombineFn;
static PyObject *__pyx_n_s_CombineOperation;
static PyObject *__pyx_n_s_CombineOperation___reduce_cython;
static PyObject *__pyx_n_s_CombineOperation___setstate_cyth;
static PyObject *__pyx_n_s_CombineOperation_finish;
static PyObject *__pyx_n_s_CombineOperation_process;
static PyObject *__pyx_n_s_CombineOperation_setup;
static PyObject *__pyx_n_s_CombineOperation_teardown;
static PyObject *__pyx_n_s_ConsumerSet;
static PyObject *__pyx_n_s_ConsumerSet___reduce_cython;
static PyObject *__pyx_n_s_ConsumerSet___setstate_cython;
static PyObject *__pyx_n_s_ConsumerSet_create;
static PyObject *__pyx_n_s_ConsumerSet_current_element_prog;
static PyObject *__pyx_n_s_ConsumerSet_try_split;
static PyObject *__pyx_n_s_ConsumerSet_update_counters_batc;
static PyObject *__pyx_n_s_ConsumerSet_update_counters_fini;
static PyObject *__pyx_n_s_ConsumerSet_update_counters_star;
static PyObject *__pyx_n_s_CountCombineFn;
static PyObject *__pyx_n_s_DEBUG;
static PyObject *__pyx_n_s_DO_NOT_CARE;
static PyObject *__pyx_n_s_DataSampler;
static PyObject *__pyx_n_s_DefaultDict;
static PyObject *__pyx_n_s_Dict;
static PyObject *__pyx_n_s_DistributionData;
static PyObject *__pyx_n_s_DoFnRunner;
static PyObject *__pyx_n_s_DoFnState;
static PyObject *__pyx_n_s_DoOperation;
static PyObject *__pyx_n_u_DoOperation;
static PyObject *__pyx_n_s_DoOperation___reduce_cython;
static PyObject *__pyx_n_s_DoOperation___setstate_cython;
static PyObject *__pyx_n_s_DoOperation__get_runtime_perform;
static PyObject *__pyx_n_s_DoOperation__read_side_inputs;
static PyObject *__pyx_n_s_DoOperation_add_timer_info;
static PyObject *__pyx_n_s_DoOperation_finalize_bundle;
static PyObject *__pyx_n_s_DoOperation_finish;
static PyObject *__pyx_n_s_DoOperation_get_batching_prefere;
static PyObject *__pyx_n_s_DoOperation_get_input_batch_conv;
static PyObject *__pyx_n_s_DoOperation_get_output_batch_con;
static PyObject *__pyx_n_s_DoOperation_needs_finalization;
static PyObject *__pyx_n_s_DoOperation_pcollection_count_mo;
static PyObject *__pyx_n_s_DoOperation_process;
static PyObject *__pyx_n_s_DoOperation_process_batch;
static PyObject *__pyx_n_s_DoOperation_process_timer;
static PyObject *__pyx_n_s_DoOperation_reset;
static PyObject *__pyx_n_s_DoOperation_setup;
static PyObject *__pyx_n_s_DoOperation_start;
static PyObject *__pyx_n_s_DoOperation_teardown;
static PyObject *__pyx_n_s_ELEMENT_COUNT_URN;
static PyObject *__pyx_n_s_EmulatedIterable;
static PyObject *__pyx_n_s_ExecutionContext;
static PyObject *__pyx_kp_u_Expected_an_instance_of_operatio;
static PyObject *__pyx_n_s_FINISH_BUNDLE_MSECS_URN;
static PyObject *__pyx_kp_u_Finishing_s;
static PyObject *__pyx_n_s_FlattenOperation;
static PyObject *__pyx_n_s_FlattenOperation___reduce_cython;
static PyObject *__pyx_n_s_FlattenOperation___setstate_cyth;
static PyObject *__pyx_n_s_FlattenOperation_process;
static PyObject *__pyx_n_s_FloatCoder;
static PyObject *__pyx_n_s_FrozenSet;
static PyObject *__pyx_n_s_GeneralPurposeConsumerSet;
static PyObject *__pyx_n_s_GeneralPurposeConsumerSet___redu;
static PyObject *__pyx_n_s_GeneralPurposeConsumerSet___sets;
static PyObject *__pyx_n_s_GeneralPurposeConsumerSet_flush;
static PyObject *__pyx_n_s_GeneralPurposeConsumerSet_receiv;
static PyObject *__pyx_n_s_GeneralPurposeConsumerSet_receiv_2;
static PyObject *__pyx_n_s_GlobalWindows;
static PyObject *__pyx_n_s_GroupedShuffleReadOperation;
static PyObject *__pyx_n_s_Hashable;
static PyObject *__pyx_n_s_ImportError;
static PyObject *__pyx_n_s_ImpulseReadOperation;
static PyObject *__pyx_n_s_ImpulseReadOperation___reduce_cy;
static PyObject *__pyx_n_s_ImpulseReadOperation___setstate;
static PyObject *__pyx_n_s_ImpulseReadOperation_process;
static PyObject *__pyx_n_s_InMemoryWriteOperation;
static PyObject *__pyx_n_s_InMemoryWriteOperation_process;
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_n_s_InefficientExecutionWarning;
static PyObject *__pyx_kp_u_Input_to_operation;
static PyObject *__pyx_n_s_Iterable;
static PyObject *__pyx_n_s_IterableCoder;
static PyObject *__pyx_n_s_Iterator;
static PyObject *__pyx_n_s_LOGGER;
static PyObject *__pyx_n_s_List;
static PyObject *__pyx_n_s_MAX_BATCH_SIZE;
static PyObject *__pyx_n_s_Mapping;
static PyObject *__pyx_n_s_MeanCombineFn;
static PyObject *__pyx_n_s_MetricsContainer;
static PyObject *__pyx_n_s_MonitoringInfo;
static PyObject *__pyx_n_s_NameContext;
static PyObject *__pyx_n_s_NamedTuple;
static PyObject *__pyx_n_s_NativeReadOperation;
static PyObject *__pyx_n_s_NativeWriteOperation;
static PyObject *__pyx_n_u_None;
static PyObject *__pyx_n_s_NotImplementedError;
static PyObject *__pyx_n_s_OUTPUT_AT_EOW;
static PyObject *__pyx_n_s_OpInputInfo;
static PyObject *__pyx_n_u_OpInputInfo;
static PyObject *__pyx_n_s_Operation;
static PyObject *__pyx_n_s_Operation___reduce_cython;
static PyObject *__pyx_n_s_Operation___setstate_cython;
static PyObject *__pyx_n_s_Operation__get_runtime_performan;
static PyObject *__pyx_n_s_Operation_add_receiver;
static PyObject *__pyx_n_s_Operation_current_element_progre;
static PyObject *__pyx_n_s_Operation_execution_time_monitor;
static PyObject *__pyx_n_s_Operation_finalize_bundle;
static PyObject *__pyx_n_s_Operation_finish;
static PyObject *__pyx_n_s_Operation_get_batching_preferenc;
static PyObject *__pyx_n_s_Operation_get_input_batch_conver;
static PyObject *__pyx_n_s_Operation_get_output_batch_conve;
static PyObject *__pyx_n_s_Operation_monitoring_infos;
static PyObject *__pyx_n_s_Operation_needs_finalization;
static PyObject *__pyx_n_s_Operation_output;
static PyObject *__pyx_n_s_Operation_pcollection_count_moni;
static PyObject *__pyx_n_s_Operation_process;
static PyObject *__pyx_n_s_Operation_process_batch;
static PyObject *__pyx_n_s_Operation_reset;
static PyObject *__pyx_n_s_Operation_setup;
static PyObject *__pyx_n_s_Operation_start;
static PyObject *__pyx_n_s_Operation_str_internal;
static PyObject *__pyx_n_s_Operation_teardown;
static PyObject *__pyx_n_s_Operation_try_split;
static PyObject *__pyx_n_s_Operation_user_monitoring_infos;
static PyObject *__pyx_n_s_Optional;
static PyObject *__pyx_n_s_OutputSampler;
static PyObject *__pyx_n_s_PGBKCVOperation;
static PyObject *__pyx_n_s_PGBKCVOperation___reduce_cython;
static PyObject *__pyx_n_s_PGBKCVOperation___setstate_cytho;
static PyObject *__pyx_n_s_PGBKCVOperation_finish;
static PyObject *__pyx_n_s_PGBKCVOperation_output_key;
static PyObject *__pyx_n_s_PGBKCVOperation_process;
static PyObject *__pyx_n_s_PGBKCVOperation_setup;
static PyObject *__pyx_n_s_PGBKCVOperation_teardown;
static PyObject *__pyx_n_s_PGBKOperation;
static PyObject *__pyx_n_s_PGBKOperation___init;
static PyObject *__pyx_n_s_PGBKOperation_finish;
static PyObject *__pyx_n_s_PGBKOperation_flush;
static PyObject *__pyx_n_s_PGBKOperation_process;
static PyObject *__pyx_n_s_PROCESS_BUNDLE_MSECS_URN;
static PyObject *__pyx_n_s_PROGRESS_TYPE;
static PyObject *__pyx_kp_s_Partial_group_by_key_operation_T;
static PyObject *__pyx_n_s_PhasedCombineFnExecutor;
static PyObject *__pyx_n_s_PickleError;
static PyObject *__pyx_kp_u_Processing_s_in_s;
static PyObject *__pyx_n_s_RLock;
static PyObject *__pyx_n_s_ReadOperation;
static PyObject *__pyx_n_s_ReadOperation___reduce_cython;
static PyObject *__pyx_n_s_ReadOperation___setstate_cython;
static PyObject *__pyx_n_s_ReadOperation_start;
static PyObject *__pyx_n_s_Receiver;
static PyObject *__pyx_n_s_ReifyTimestampAndWindowsOperatio;
static PyObject *__pyx_n_s_RuntimeWarning;
static PyObject *__pyx_n_s_SAMPLED_BYTE_SIZE_URN;
static PyObject *__pyx_n_s_START_BUNDLE_MSECS_URN;
static PyObject *__pyx_n_s_SdfProcessSizedElements;
static PyObject *__pyx_n_s_SdfProcessSizedElements___reduce;
static PyObject *__pyx_n_s_SdfProcessSizedElements___setsta;
static PyObject *__pyx_n_s_SdfProcessSizedElements_current;
static PyObject *__pyx_n_s_SdfProcessSizedElements_monitori;
static PyObject *__pyx_n_s_SdfProcessSizedElements_process;
static PyObject *__pyx_n_s_SdfProcessSizedElements_try_spli;
static PyObject *__pyx_n_s_SdfSplitResultsPrimary;
static PyObject *__pyx_n_s_SdfSplitResultsResidual;
static PyObject *__pyx_n_s_SdfTruncateSizedRestrictions;
static PyObject *__pyx_n_s_SdfTruncateSizedRestrictions___r;
static PyObject *__pyx_n_s_SdfTruncateSizedRestrictions___s;
static PyObject *__pyx_n_s_SdfTruncateSizedRestrictions_cur;
static PyObject *__pyx_n_s_SdfTruncateSizedRestrictions_try;
static PyObject *__pyx_kp_u_Setup_called_for_s;
static PyObject *__pyx_n_s_ShuffleWriteOperation;
static PyObject *__pyx_n_s_SideInputMap;
static PyObject *__pyx_n_s_SimpleMapTaskExecutor;
static PyObject *__pyx_n_s_SimpleMapTaskExecutor___init;
static PyObject *__pyx_n_s_SimpleMapTaskExecutor_execute;
static PyObject *__pyx_n_s_SimpleMapTaskExecutor_operations;
static PyObject *__pyx_n_s_SingletonElementConsumerSet;
static PyObject *__pyx_n_s_SingletonElementConsumerSet___re;
static PyObject *__pyx_n_s_SingletonElementConsumerSet___se;
static PyObject *__pyx_n_s_SingletonElementConsumerSet_curr;
static PyObject *__pyx_n_s_SingletonElementConsumerSet_flus;
static PyObject *__pyx_kp_u_SingletonElementConsumerSet_rece;
static PyObject *__pyx_n_s_SingletonElementConsumerSet_rece_2;
static PyObject *__pyx_n_s_SingletonElementConsumerSet_rece_3;
static PyObject *__pyx_n_s_SingletonElementConsumerSet_try;
static PyObject *__pyx_n_s_SourceBundle;
static PyObject *__pyx_n_s_SplitResultPrimary;
static PyObject *__pyx_n_u_SplitResultPrimary;
static PyObject *__pyx_n_s_SplitResultResidual;
static PyObject *__pyx_n_u_SplitResultResidual;
static PyObject *__pyx_kp_u_Starting_op_d_s;
static PyObject *__pyx_n_s_StateSampler;
static PyObject *__pyx_n_s_StreamingGroupAlsoByWindowsOpera;
static PyObject *__pyx_n_s_TOTAL_MSECS_URN;
static PyObject *__pyx_n_s_TYPE_CHECKING;
static PyObject *__pyx_n_s_TaggedReceivers;
static PyObject *__pyx_n_s_TaggedReceivers___init;
static PyObject *__pyx_n_s_TaggedReceivers___missing;
static PyObject *__pyx_n_s_TaggedReceivers_total_output_by;
static PyObject *__pyx_kp_u_Teardown_called_for_s;
static PyObject *__pyx_kp_u_This_is_very_inefficient_consid;
static PyObject *__pyx_n_s_TimerSpec;
static PyObject *__pyx_n_s_TimestampCombiner;
static PyObject *__pyx_n_s_Tuple;
static PyObject *__pyx_n_s_TypeError;
static PyObject *__pyx_n_s_UngroupedShuffleReadOperation;
static PyObject *__pyx_kp_u_Unknown_side_input_type_r;
static PyObject *__pyx_n_s_WORK_COMPLETED_URN;
static PyObject *__pyx_n_s_WORK_REMAINING_URN;
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_n_s_WorkerCombineFn;
static PyObject *__pyx_n_s_WorkerDoFn;
static PyObject *__pyx_n_s_WorkerFlatten;
static PyObject *__pyx_n_s_WorkerGroupingShuffleRead;
static PyObject *__pyx_n_s_WorkerInMemoryWrite;
static PyObject *__pyx_n_s_WorkerMergeWindows;
static PyObject *__pyx_n_s_WorkerPartialGroupByKey;
static PyObject *__pyx_n_s_WorkerRead;
static PyObject *__pyx_n_s_WorkerReifyTimestampAndWindows;
static PyObject *__pyx_n_s_WorkerShuffleWrite;
static PyObject *__pyx_n_s_WorkerSideInputSource;
static PyObject *__pyx_n_s_WorkerUngroupedShuffleRead;
static PyObject *__pyx_n_s_WorkerWrite;
static PyObject *__pyx_kp_u__10;
static PyObject *__pyx_kp_u__50;
static PyObject *__pyx_kp_u__51;
static PyObject *__pyx_kp_u__52;
static PyObject *__pyx_kp_u__53;
static PyObject *__pyx_kp_u__9;
static PyObject *__pyx_n_s_accumulator;
static PyObject *__pyx_n_s_add_input;
static PyObject *__pyx_n_s_add_receiver;
static PyObject *__pyx_n_s_add_timer_info;
static PyObject *__pyx_n_s_apache_beam;
static PyObject *__pyx_n_s_apache_beam_internal;
static PyObject *__pyx_n_s_apache_beam_io;
static PyObject *__pyx_n_s_apache_beam_metrics;
static PyObject *__pyx_n_s_apache_beam_metrics_cells;
static PyObject *__pyx_n_s_apache_beam_metrics_execution;
static PyObject *__pyx_n_s_apache_beam_portability_api;
static PyObject *__pyx_n_s_apache_beam_runners;
static PyObject *__pyx_n_s_apache_beam_runners_common;
static PyObject *__pyx_n_s_apache_beam_runners_sdf_utils;
static PyObject *__pyx_n_s_apache_beam_runners_worker;
static PyObject *__pyx_n_s_apache_beam_runners_worker_bundl;
static PyObject *__pyx_n_s_apache_beam_runners_worker_data;
static PyObject *__pyx_n_s_apache_beam_runners_worker_opera;
static PyObject *__pyx_kp_s_apache_beam_runners_worker_opera_2;
static PyObject *__pyx_n_s_apache_beam_runners_worker_state;
static PyObject *__pyx_n_s_apache_beam_transforms;
static PyObject *__pyx_n_s_apache_beam_transforms_combiners;
static PyObject *__pyx_n_s_apache_beam_transforms_userstate;
static PyObject *__pyx_n_s_apache_beam_transforms_window;
static PyObject *__pyx_n_s_apache_beam_typehints_batch;
static PyObject *__pyx_n_s_apache_beam_utils_windowed_value;
static PyObject *__pyx_n_s_apache_sideinputs;
static PyObject *__pyx_n_s_append;
static PyObject *__pyx_n_s_apply;
static PyObject *__pyx_n_s_args;
static PyObject *__pyx_n_s_as_windowed_values;
static PyObject *__pyx_n_s_batch;
static PyObject *__pyx_n_s_batch_type;
static PyObject *__pyx_n_s_cast_to_operation;
static PyObject *__pyx_n_s_cast_to_receiver;
static PyObject *__pyx_n_s_class;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_close;
static PyObject *__pyx_n_s_coder;
static PyObject *__pyx_n_u_coder;
static PyObject *__pyx_kp_u_coder_2;
static PyObject *__pyx_n_s_coders;
static PyObject *__pyx_n_s_collections;
static PyObject *__pyx_n_s_combine;
static PyObject *__pyx_n_s_combine_fn;
static PyObject *__pyx_n_s_combiners;
static PyObject *__pyx_n_s_commit;
static PyObject *__pyx_n_s_common;
static PyObject *__pyx_n_s_compact;
static PyObject *__pyx_n_s_completed_work;
static PyObject *__pyx_n_s_consumer;
static PyObject *__pyx_n_s_consumer_batch_converter;
static PyObject *__pyx_n_s_consumer_batch_preference;
static PyObject *__pyx_n_s_consumers;
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_create;
static PyObject *__pyx_n_s_create_accumulator;
static PyObject *__pyx_n_s_create_labels;
static PyObject *__pyx_n_s_create_operation;
static PyObject *__pyx_n_s_create_pgbk_op;
static PyObject *__pyx_n_s_current_element_progress;
static PyObject *__pyx_n_s_curry_combine_fn;
static PyObject *__pyx_n_s_data_sampler;
static PyObject *__pyx_n_s_dataflow_worker_native_operation;
static PyObject *__pyx_n_s_dataflow_worker_shuffle_operatio;
static PyObject *__pyx_n_s_debug;
static PyObject *__pyx_n_s_debug_logging_enabled;
static PyObject *__pyx_n_s_declaring_step;
static PyObject *__pyx_n_s_defaultdict;
static PyObject *__pyx_n_s_delayed_applications;
static PyObject *__pyx_n_s_dict;
static PyObject *__pyx_n_s_dict_2;
static PyObject *__pyx_n_s_doc;
static PyObject *__pyx_n_s_dynamic_timer_tag;
static PyObject *__pyx_n_s_el;
static PyObject *__pyx_n_s_element_counter;
static PyObject *__pyx_n_s_element_sampler;
static PyObject *__pyx_n_s_elements;
static PyObject *__pyx_n_s_encode;
static PyObject *__pyx_n_s_enter;
static PyObject *__pyx_n_s_enumerate;
static PyObject *__pyx_n_s_execute;
static PyObject *__pyx_n_s_execution_context;
static PyObject *__pyx_n_s_execution_time_monitoring_infos;
static PyObject *__pyx_n_s_exit;
static PyObject *__pyx_n_s_explode_batch;
static PyObject *__pyx_n_s_filter;
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;
static PyObject *__pyx_n_s_fire_timestamp;
static PyObject *__pyx_n_s_flush;
static PyObject *__pyx_n_s_fn;
static PyObject *__pyx_n_s_fn_2;
static PyObject *__pyx_n_s_fns;
static PyObject *__pyx_n_s_fraction_completed;
static PyObject *__pyx_n_s_fraction_of_remainder;
static PyObject *__pyx_n_s_fraction_remaining;
static PyObject *__pyx_n_s_from_windowed_values;
static PyObject *__pyx_n_s_func;
static PyObject *__pyx_n_s_get;
static PyObject *__pyx_n_s_getLogger;
static PyObject *__pyx_n_s_get_batching_preference;
static PyObject *__pyx_n_s_get_dofn_specs;
static PyObject *__pyx_n_s_get_impl;
static PyObject *__pyx_n_s_get_input_batch_converter;
static PyObject *__pyx_n_s_get_iterator_fn_for_sources;
static PyObject *__pyx_n_s_get_output_batch_converter;
static PyObject *__pyx_n_s_get_output_sampler;
static PyObject *__pyx_n_s_get_range_tracker;
static PyObject *__pyx_n_s_get_runtime_performance_hints;
static PyObject *__pyx_n_s_getstate;
static PyObject *__pyx_n_s_global_window_type;
static PyObject *__pyx_n_s_globally_windowed_value;
static PyObject *__pyx_n_s_has_callbacks;
static PyObject *__pyx_n_s_has_element;
static PyObject *__pyx_n_s_i;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_index;
static PyObject *__pyx_n_s_init;
static PyObject *__pyx_n_s_init___locals_lambda;
static PyObject *__pyx_n_s_input;
static PyObject *__pyx_n_u_input;
static PyObject *__pyx_n_u_input_batch_converter;
static PyObject *__pyx_n_s_input_index;
static PyObject *__pyx_n_s_inputs;
static PyObject *__pyx_n_u_inputs;
static PyObject *__pyx_n_s_int64_counter;
static PyObject *__pyx_n_s_int64_distribution;
static PyObject *__pyx_n_s_iobase;
static PyObject *__pyx_n_s_isEnabledFor;
static PyObject *__pyx_n_s_is_default;
static PyObject *__pyx_n_s_is_recursive;
static PyObject *__pyx_n_s_is_streaming;
static PyObject *__pyx_n_s_items;
static PyObject *__pyx_n_s_iterator_fn;
static PyObject *__pyx_n_s_ix;
static PyObject *__pyx_n_s_key;
static PyObject *__pyx_n_s_kw;
static PyObject *__pyx_n_s_kwargs;
static PyObject *__pyx_n_s_labels;
static PyObject *__pyx_kp_u_len_consumers;
static PyObject *__pyx_n_s_limit;
static PyObject *__pyx_n_s_loads;
static PyObject *__pyx_n_s_logging;
static PyObject *__pyx_n_s_logging_name;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_u_main_input_coder;
static PyObject *__pyx_n_u_main_input_tag;
static PyObject *__pyx_n_s_map_task;
static PyObject *__pyx_n_s_map_task_2;
static PyObject *__pyx_n_s_max;
static PyObject *__pyx_n_s_max_size;
static PyObject *__pyx_n_s_max_timestamp;
static PyObject *__pyx_n_s_mean;
static PyObject *__pyx_n_s_mean_byte_counter;
static PyObject *__pyx_n_s_metaclass;
static PyObject *__pyx_n_s_metrics_container;
static PyObject *__pyx_n_s_metrics_name;
static PyObject *__pyx_n_s_metrics_pb2;
static PyObject *__pyx_n_s_min;
static PyObject *__pyx_n_s_missing;
static PyObject *__pyx_n_s_module;
static PyObject *__pyx_n_s_monitoring_infos;
static PyObject *__pyx_kp_u_must_be_rebatched_from_type;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_name_2;
static PyObject *__pyx_n_s_name_context;
static PyObject *__pyx_n_s_name_contexts;
static PyObject *__pyx_n_s_needs_finalization;
static PyObject *__pyx_n_s_new;
static PyObject *__pyx_n_s_o;
static PyObject *__pyx_n_s_object;
static PyObject *__pyx_n_u_once;
static PyObject *__pyx_n_s_op;
static PyObject *__pyx_n_s_opcounter;
static PyObject *__pyx_n_s_opcounters;
static PyObject *__pyx_n_s_operation;
static PyObject *__pyx_n_s_operation_name;
static PyObject *__pyx_n_s_operation_specs;
static PyObject *__pyx_n_s_operations;
static PyObject *__pyx_n_s_ops;
static PyObject *__pyx_kp_u_out;
static PyObject *__pyx_n_s_output;
static PyObject *__pyx_n_u_output_batch_converter;
static PyObject *__pyx_n_s_output_buffer;
static PyObject *__pyx_n_s_output_coder;
static PyObject *__pyx_n_s_output_coders;
static PyObject *__pyx_n_u_output_coders;
static PyObject *__pyx_n_s_output_index;
static PyObject *__pyx_n_s_output_key;
static PyObject *__pyx_n_s_output_num;
static PyObject *__pyx_n_s_output_sampler;
static PyObject *__pyx_n_s_output_tags;
static PyObject *__pyx_n_s_output_value;
static PyObject *__pyx_n_u_outputs;
static PyObject *__pyx_n_s_paneinfo;
static PyObject *__pyx_n_s_payload;
static PyObject *__pyx_n_s_pcollection;
static PyObject *__pyx_n_s_pcollection_count_monitoring_inf;
static PyObject *__pyx_n_s_phase;
static PyObject *__pyx_n_s_pickle;
static PyObject *__pyx_n_s_pickler;
static PyObject *__pyx_n_s_prepare;
static PyObject *__pyx_n_s_primaries;
static PyObject *__pyx_n_s_primary;
static PyObject *__pyx_n_s_printable_fields;
static PyObject *__pyx_n_s_printable_name;
static PyObject *__pyx_n_s_process;
static PyObject *__pyx_n_u_process;
static PyObject *__pyx_n_s_process_batch;
static PyObject *__pyx_n_s_process_batch_defined;
static PyObject *__pyx_n_s_process_defined;
static PyObject *__pyx_n_s_process_timer;
static PyObject *__pyx_n_s_process_user_timer;
static PyObject *__pyx_n_s_process_with_sized_restriction;
static PyObject *__pyx_n_s_produce_batch;
static PyObject *__pyx_n_s_produce_fn;
static PyObject *__pyx_n_s_producer;
static PyObject *__pyx_n_s_producer_batch_converter;
static PyObject *__pyx_n_s_producer_type_hints;
static PyObject *__pyx_n_s_progress;
static PyObject *__pyx_n_s_ptransform;
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_CombineOperation;
static PyObject *__pyx_n_s_pyx_unpickle_ConsumerSet;
static PyObject *__pyx_n_s_pyx_unpickle_DoOperation;
static PyObject *__pyx_n_s_pyx_unpickle_FlattenOperation;
static PyObject *__pyx_n_s_pyx_unpickle_GeneralPurposeCon;
static PyObject *__pyx_n_s_pyx_unpickle_ImpulseReadOperat;
static PyObject *__pyx_n_s_pyx_unpickle_Operation;
static PyObject *__pyx_n_s_pyx_unpickle_PGBKCVOperation;
static PyObject *__pyx_n_s_pyx_unpickle_ReadOperation;
static PyObject *__pyx_n_s_pyx_unpickle_SdfProcessSizedEl;
static PyObject *__pyx_n_s_pyx_unpickle_SdfTruncateSizedR;
static PyObject *__pyx_n_s_pyx_unpickle_SingletonElementC;
static PyObject *__pyx_n_s_pyx_vtable;
static PyObject *__pyx_n_s_qualname;
static PyObject *__pyx_n_s_read;
static PyObject *__pyx_n_s_read_counter;
static PyObject *__pyx_n_s_read_side_inputs;
static PyObject *__pyx_n_s_read_side_inputs_locals_lambda;
static PyObject *__pyx_n_s_receive;
static PyObject *__pyx_n_s_receive_batch;
static PyObject *__pyx_n_s_receiver;
static PyObject *__pyx_n_u_receivers;
static PyObject *__pyx_kp_u_receivers_s;
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_work;
static PyObject *__pyx_n_s_reset;
static PyObject *__pyx_n_s_residual;
static PyObject *__pyx_n_s_residuals;
static PyObject *__pyx_n_s_restart_sampling;
static PyObject *__pyx_n_s_return;
static PyObject *__pyx_n_s_reversed;
static PyObject *__pyx_n_s_runtime_output_constraints;
static PyObject *__pyx_n_u_runtime_output_constraints;
static PyObject *__pyx_kp_u_s;
static PyObject *__pyx_kp_u_s_2;
static PyObject *__pyx_n_s_sampled_msecs_int;
static PyObject *__pyx_n_s_sampler;
static PyObject *__pyx_n_s_sampler_for_output;
static PyObject *__pyx_n_s_scoped_process_state;
static PyObject *__pyx_n_s_scoped_state;
static PyObject *__pyx_n_s_self;
static PyObject *__pyx_n_s_send;
static PyObject *__pyx_n_s_serialized_fn;
static PyObject *__pyx_n_s_setstate;
static PyObject *__pyx_n_s_setstate_cython;
static PyObject *__pyx_n_s_setup;
static PyObject *__pyx_n_s_setup_locals_get_output_sampler;
static PyObject *__pyx_n_s_shuffle_sink;
static PyObject *__pyx_n_s_shuffle_source;
static PyObject *__pyx_n_s_si;
static PyObject *__pyx_n_s_si_counter;
static PyObject *__pyx_kp_u_side_input;
static PyObject *__pyx_n_s_side_input_map;
static PyObject *__pyx_n_s_side_input_maps;
static PyObject *__pyx_n_s_side_inputs;
static PyObject *__pyx_n_s_side_tag;
static PyObject *__pyx_n_s_sideinputs;
static PyObject *__pyx_n_s_simplefilter;
static PyObject *__pyx_n_s_size;
static PyObject *__pyx_n_s_source;
static PyObject *__pyx_n_s_sources;
static PyObject *__pyx_n_s_spec;
static PyObject *__pyx_n_s_split;
static PyObject *__pyx_n_s_start;
static PyObject *__pyx_n_u_start;
static PyObject *__pyx_n_s_start_position;
static PyObject *__pyx_n_s_state;
static PyObject *__pyx_n_s_state_sampler;
static PyObject *__pyx_n_s_state_sampler_2;
static PyObject *__pyx_n_s_staticmethod;
static PyObject *__pyx_n_s_step_name;
static PyObject *__pyx_n_u_step_name;
static PyObject *__pyx_n_s_step_name_2;
static PyObject *__pyx_n_s_stop_position;
static PyObject *__pyx_n_s_str_internal;
static PyObject *__pyx_kp_s_stringsource;
static PyObject *__pyx_n_s_suffix;
static PyObject *__pyx_n_s_sum;
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_table;
static PyObject *__pyx_n_s_tag;
static PyObject *__pyx_n_s_tag_to_pcollection_id;
static PyObject *__pyx_n_s_tagged_receivers;
static PyObject *__pyx_n_s_tags_and_types;
static PyObject *__pyx_n_s_target;
static PyObject *__pyx_n_s_teardown;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_test_shuffle_sink;
static PyObject *__pyx_n_s_test_shuffle_sink_2;
static PyObject *__pyx_n_s_test_shuffle_source;
static PyObject *__pyx_n_s_test_shuffle_source_2;
static PyObject *__pyx_n_s_threading;
static PyObject *__pyx_n_s_throw;
static PyObject *__pyx_n_s_timer_data;
static PyObject *__pyx_n_s_timer_family_id;
static PyObject *__pyx_n_s_timer_info;
static PyObject *__pyx_n_s_timer_spec;
static PyObject *__pyx_n_s_timestamp;
static PyObject *__pyx_n_s_timestamp_combiner;
static PyObject *__pyx_kp_u_to;
static PyObject *__pyx_n_s_to_key;
static PyObject *__pyx_n_s_to_runner_api_monitoring_infos;
static PyObject *__pyx_n_s_total;
static PyObject *__pyx_n_s_total_output_bytes;
static PyObject *__pyx_n_s_transform_id;
static PyObject *__pyx_n_u_transform_id;
static PyObject *__pyx_n_s_try_split;
static PyObject *__pyx_n_s_type;
static PyObject *__pyx_n_s_typing;
static PyObject *__pyx_n_s_unused_impulse;
static PyObject *__pyx_n_s_update;
static PyObject *__pyx_n_s_update_counters_batch;
static PyObject *__pyx_n_s_update_counters_finish;
static PyObject *__pyx_n_s_update_counters_start;
static PyObject *__pyx_n_s_urn;
static PyObject *__pyx_n_s_use_setstate;
static PyObject *__pyx_n_s_user_key;
static PyObject *__pyx_n_s_user_monitoring_infos;
static PyObject *__pyx_n_s_user_state_context;
static PyObject *__pyx_n_s_userstate;
static PyObject *__pyx_n_s_v;
static PyObject *__pyx_n_s_value;
static PyObject *__pyx_n_s_values;
static PyObject *__pyx_n_s_view_class;
static PyObject *__pyx_n_s_view_options;
static PyObject *__pyx_n_s_vs;
static PyObject *__pyx_n_s_warn;
static PyObject *__pyx_kp_s_warning_to_indicate_an_inefficie;
static PyObject *__pyx_n_s_warnings;
static PyObject *__pyx_n_s_window;
static PyObject *__pyx_n_s_window_fn;
static PyObject *__pyx_n_s_windowed_batch;
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_n_s_with_completed;
static PyObject *__pyx_n_s_wkey;
static PyObject *__pyx_n_s_wkv;
static PyObject *__pyx_n_s_worker_printable_fields;
static PyObject *__pyx_n_s_write_windowed_values;
static PyObject *__pyx_n_s_zip;
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations__cast_to_operation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_2_cast_to_receiver(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_create(PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_step_name, PyObject *__pyx_v_output_index, PyObject *__pyx_v_consumers, PyObject *__pyx_v_coder, PyObject *__pyx_v_producer_type_hints, PyObject *__pyx_v_producer_batch_converter, PyObject *__pyx_v_output_sampler); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_2__init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_step_name, PyObject *__pyx_v_output_index, PyObject *__pyx_v_consumers, PyObject *__pyx_v_coder, PyObject *__pyx_v_producer_type_hints, PyObject *__pyx_v_producer_batch_converter, PyObject *__pyx_v_output_sampler); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_4try_split(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_fraction_of_remainder); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_6current_element_progress(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_8update_counters_start(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_10update_counters_finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_12update_counters_batch(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14__repr__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9opcounter___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9step_name___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9step_name_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9step_name_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_12output_index___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_12output_index_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_12output_index_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5coder___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5coder_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5coder_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14output_sampler___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14output_sampler_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14output_sampler_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15element_sampler___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15element_sampler_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15element_sampler_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17execution_context___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17execution_context_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17execution_context_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_16__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_18__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_step_name, PyObject *__pyx_v_output_index, PyObject *__pyx_v_consumer, PyObject *__pyx_v_coder, PyObject *__pyx_v_producer_type_hints, PyObject *__pyx_v_output_sampler); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_2receive(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_4receive_batch(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_6flush(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_8try_split(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self, PyObject *__pyx_v_fraction_of_remainder); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_10current_element_progress(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_12__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_14__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_v_self, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_step_name, PyObject *__pyx_v_output_index, PyObject *__pyx_v_coder, PyObject *__pyx_v_producer_type_hints, PyObject *__pyx_v_consumers, PyObject *__pyx_v_producer_batch_converter, PyObject *__pyx_v_output_sampler); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_2receive(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_4receive_batch(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_6flush(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_8__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_10__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_name_context, PyObject *__pyx_v_spec, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_state_sampler); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_5setup_get_output_sampler(PyObject *__pyx_self, PyObject *__pyx_v_output_num); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_2setup(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_data_sampler); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_4start(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_6get_batching_preference(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_8get_input_batch_converter(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_10get_output_batch_converter(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_12process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_14process_batch(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_batch); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_16finalize_bundle(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_18needs_finalization(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_20try_split(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_fraction_of_remainder); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_22current_element_progress(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_24finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_26teardown(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_28reset(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_30output(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, int __pyx_v_output_index); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_32add_receiver(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_operation, PyObject *__pyx_v_output_index); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_34monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_transform_id, PyObject *__pyx_v_tag_to_pcollection_id); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_36pcollection_count_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_tag_to_pcollection_id); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_38user_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_transform_id); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_40execution_time_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_transform_id); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_42__str__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_44str_internal(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_is_recursive); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_46_get_runtime_performance_hints(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_12name_context___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_14operation_name___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_4spec___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_15counter_factory___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_17metrics_container___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_17metrics_container_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_17metrics_container_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_17execution_context___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_17execution_context_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_17execution_context_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_9receivers___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_9receivers_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_9receivers_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_21debug_logging_enabled___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_9step_name___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_9step_name_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_9step_name_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_13state_sampler___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_18scoped_start_state___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_20scoped_process_state___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_19scoped_finish_state___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_12data_sampler___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_48__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_50__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_13ReadOperation_start(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_13ReadOperation_2__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_13ReadOperation_4__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *__pyx_v_self, PyObject *__pyx_v_name_context, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_state_sampler, PyObject *__pyx_v_consumers, PyObject *__pyx_v_source, PyObject *__pyx_v_output_coder); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_2process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_unused_impulse); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_4__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_6__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_22InMemoryWriteOperation_process(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_o); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_step_name); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_2__missing__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tag); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_4total_output_bytes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_spec, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_sampler, PyObject *__pyx_v_side_input_maps, PyObject *__pyx_v_user_state_context); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda1(PyObject *__pyx_self, PyObject *__pyx_v_o); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_2_read_side_inputs(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v_tags_and_types); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_5setup(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v_data_sampler); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_7start(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_9get_batching_preference(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_11get_input_batch_converter(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_13get_output_batch_converter(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_15process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_17process_batch(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_19finalize_bundle(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_21needs_finalization(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_23add_timer_info(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v_timer_family_id, PyObject *__pyx_v_timer_info); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_25process_timer(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_timer_data); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_27finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_29teardown(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_31reset(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_33pcollection_count_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v_tag_to_pcollection_id); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_35_get_runtime_performance_hints(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_12timer_inputs___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_12timer_inputs_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_12timer_inputs_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_10input_info___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_10input_info_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_10input_info_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_37__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_39__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_2current_element_progress(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_4try_split(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *__pyx_v_self, PyObject *__pyx_v_fraction_of_remainder); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_6__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_8__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_2process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_4try_split(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_v_self, PyObject *__pyx_v_fraction_of_remainder); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_6current_element_progress(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_8monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_v_self, PyObject *__pyx_v_transform_id, PyObject *__pyx_v_tag_to_pcollection_id); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_10__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_12__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_16CombineOperation___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self, PyObject *__pyx_v_name_context, PyObject *__pyx_v_spec, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_state_sampler); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16CombineOperation_2setup(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self, PyObject *__pyx_v_data_sampler); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16CombineOperation_4process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16CombineOperation_6finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16CombineOperation_8teardown(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16CombineOperation_10__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16CombineOperation_12__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_4create_pgbk_op(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_step_name, PyObject *__pyx_v_spec, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_state_sampler); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_13PGBKOperation___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name_context, PyObject *__pyx_v_spec, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_state_sampler); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_13PGBKOperation_2process(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_o); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_13PGBKOperation_4finish(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_13PGBKOperation_6flush(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_target); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_name_context, PyObject *__pyx_v_spec, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_state_sampler, PyObject *__pyx_v_windowing); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_2setup(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_data_sampler); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_4process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_wkv); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_6finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_8teardown(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10output_key(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_wkey, PyObject *__pyx_v_accumulator, PyObject *__pyx_v_timestamp); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10combine_fn___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10combine_fn_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10combine_fn_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20combine_fn_add_input___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20combine_fn_add_input_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20combine_fn_add_input_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18combine_fn_compact___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18combine_fn_compact_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18combine_fn_compact_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20is_default_windowing___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20is_default_windowing_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18timestamp_combiner___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18timestamp_combiner_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18timestamp_combiner_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_12__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_14__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16FlattenOperation_process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_FlattenOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16FlattenOperation_2__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_FlattenOperation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16FlattenOperation_4__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_FlattenOperation *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_6create_operation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name_context, PyObject *__pyx_v_spec, PyObject *__pyx_v_counter_factory, CYTHON_UNUSED PyObject *__pyx_v_step_name, PyObject *__pyx_v_state_sampler, PyObject *__pyx_v_test_shuffle_source, PyObject *__pyx_v_test_shuffle_sink, PyObject *__pyx_v_is_streaming); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_map_task, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_state_sampler, PyObject *__pyx_v_test_shuffle_source, PyObject *__pyx_v_test_shuffle_sink); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_2operations(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_4execute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_8__pyx_unpickle_ConsumerSet(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_10__pyx_unpickle_SingletonElementConsumerSet(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_12__pyx_unpickle_GeneralPurposeConsumerSet(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_14__pyx_unpickle_Operation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16__pyx_unpickle_ReadOperation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_18__pyx_unpickle_ImpulseReadOperation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_20__pyx_unpickle_DoOperation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_22__pyx_unpickle_SdfTruncateSizedRestrictions(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_24__pyx_unpickle_SdfProcessSizedElements(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_26__pyx_unpickle_CombineOperation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_28__pyx_unpickle_PGBKCVOperation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_30__pyx_unpickle_FlattenOperation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_ConsumerSet(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_Operation(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_ReadOperation(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_DoOperation(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_CombineOperation(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_PGBKCVOperation(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_FlattenOperation(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_get = {0, &__pyx_n_s_get, 0, 0, 0};
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_3;
static PyObject *__pyx_int_9;
static PyObject *__pyx_int_10;
static PyObject *__pyx_int_4096;
static PyObject *__pyx_int_10000;
static PyObject *__pyx_int_13052437;
static PyObject *__pyx_int_15694960;
static PyObject *__pyx_int_35037786;
static PyObject *__pyx_int_44220925;
static PyObject *__pyx_int_53600133;
static PyObject *__pyx_int_54202627;
static PyObject *__pyx_int_86082411;
static PyObject *__pyx_int_86866479;
static PyObject *__pyx_int_106916135;
static PyObject *__pyx_int_113750372;
static PyObject *__pyx_int_129208062;
static PyObject *__pyx_int_136289111;
static PyObject *__pyx_int_138733249;
static PyObject *__pyx_int_147096570;
static PyObject *__pyx_int_155424975;
static PyObject *__pyx_int_157929342;
static PyObject *__pyx_int_160425100;
static PyObject *__pyx_int_178449558;
static PyObject *__pyx_int_191601960;
static PyObject *__pyx_int_191837459;
static PyObject *__pyx_int_196990909;
static PyObject *__pyx_int_203215111;
static PyObject *__pyx_int_210856725;
static PyObject *__pyx_int_232423418;
static PyObject *__pyx_int_241484073;
static PyObject *__pyx_int_252235362;
static PyObject *__pyx_int_267513676;
static PyObject *__pyx_codeobj_;
static PyObject *__pyx_slice__97;
static PyObject *__pyx_tuple__15;
static PyObject *__pyx_tuple__27;
static PyObject *__pyx_tuple__29;
static PyObject *__pyx_tuple__61;
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_slice__122;
static PyObject *__pyx_tuple__125;
static PyObject *__pyx_tuple__127;
static PyObject *__pyx_tuple__129;
static PyObject *__pyx_tuple__131;
static PyObject *__pyx_tuple__134;
static PyObject *__pyx_tuple__136;
static PyObject *__pyx_tuple__139;
static PyObject *__pyx_tuple__141;
static PyObject *__pyx_tuple__143;
static PyObject *__pyx_tuple__145;
static PyObject *__pyx_tuple__146;
static PyObject *__pyx_tuple__147;
static PyObject *__pyx_tuple__148;
static PyObject *__pyx_tuple__149;
static PyObject *__pyx_tuple__150;
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__184;
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_tuple__268;
static PyObject *__pyx_tuple__269;
static PyObject *__pyx_tuple__270;
static PyObject *__pyx_tuple__271;
static PyObject *__pyx_tuple__272;
static PyObject *__pyx_tuple__273;
static PyObject *__pyx_codeobj__11;
static PyObject *__pyx_codeobj__12;
static PyObject *__pyx_codeobj__13;
static PyObject *__pyx_codeobj__14;
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__23;
static PyObject *__pyx_codeobj__24;
static PyObject *__pyx_codeobj__25;
static PyObject *__pyx_codeobj__26;
static PyObject *__pyx_codeobj__28;
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__36;
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__54;
static PyObject *__pyx_codeobj__55;
static PyObject *__pyx_codeobj__56;
static PyObject *__pyx_codeobj__57;
static PyObject *__pyx_codeobj__58;
static PyObject *__pyx_codeobj__59;
static PyObject *__pyx_codeobj__60;
static PyObject *__pyx_codeobj__62;
static PyObject *__pyx_codeobj__63;
static PyObject *__pyx_codeobj__64;
static PyObject *__pyx_codeobj__65;
static PyObject *__pyx_codeobj__66;
static PyObject *__pyx_codeobj__67;
static PyObject *__pyx_codeobj__68;
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__75;
static PyObject *__pyx_codeobj__76;
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__92;
static PyObject *__pyx_codeobj__93;
static PyObject *__pyx_codeobj__94;
static PyObject *__pyx_codeobj__95;
static PyObject *__pyx_codeobj__96;
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__107;
static PyObject *__pyx_codeobj__108;
static PyObject *__pyx_codeobj__109;
static PyObject *__pyx_codeobj__110;
static PyObject *__pyx_codeobj__111;
static PyObject *__pyx_codeobj__112;
static PyObject *__pyx_codeobj__113;
static PyObject *__pyx_codeobj__114;
static PyObject *__pyx_codeobj__115;
static PyObject *__pyx_codeobj__116;
static PyObject *__pyx_codeobj__117;
static PyObject *__pyx_codeobj__118;
static PyObject *__pyx_codeobj__119;
static PyObject *__pyx_codeobj__120;
static PyObject *__pyx_codeobj__121;
static PyObject *__pyx_codeobj__123;
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__138;
static PyObject *__pyx_codeobj__140;
static PyObject *__pyx_codeobj__142;
static PyObject *__pyx_codeobj__144;
/* Late includes */

/* "apache_beam/runners/worker/operations.py":97
 * 
 * # TODO(BEAM-9324) Remove these workarounds once upgraded to Cython 3
 * def _cast_to_operation(value):             # <<<<<<<<<<<<<<
 *   if cython.compiled:
 *     return cython.cast(Operation, value)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_1_cast_to_operation(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_1_cast_to_operation = {"_cast_to_operation", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_1_cast_to_operation, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_1_cast_to_operation(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_cast_to_operation (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations__cast_to_operation(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations__cast_to_operation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj_)
  __Pyx_RefNannySetupContext("_cast_to_operation", 0);
  __Pyx_TraceCall("_cast_to_operation", __pyx_f[0], 97, 0, __PYX_ERR(0, 97, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":98
 * # TODO(BEAM-9324) Remove these workarounds once upgraded to Cython 3
 * def _cast_to_operation(value):
 *   if cython.compiled:             # <<<<<<<<<<<<<<
 *     return cython.cast(Operation, value)
 *   else:
 */
  __pyx_t_1 = (1 != 0);
  if (__pyx_t_1) {

    /* "apache_beam/runners/worker/operations.py":99
 * def _cast_to_operation(value):
 *   if cython.compiled:
 *     return cython.cast(Operation, value)             # <<<<<<<<<<<<<<
 *   else:
 *     return value
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_value)));
    __pyx_r = __pyx_v_value;
    goto __pyx_L0;

    /* "apache_beam/runners/worker/operations.py":98
 * # TODO(BEAM-9324) Remove these workarounds once upgraded to Cython 3
 * def _cast_to_operation(value):
 *   if cython.compiled:             # <<<<<<<<<<<<<<
 *     return cython.cast(Operation, value)
 *   else:
 */
  }

  /* "apache_beam/runners/worker/operations.py":101
 *     return cython.cast(Operation, value)
 *   else:
 *     return value             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_value);
    __pyx_r = __pyx_v_value;
    goto __pyx_L0;
  }

  /* "apache_beam/runners/worker/operations.py":97
 * 
 * # TODO(BEAM-9324) Remove these workarounds once upgraded to Cython 3
 * def _cast_to_operation(value):             # <<<<<<<<<<<<<<
 *   if cython.compiled:
 *     return cython.cast(Operation, value)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations._cast_to_operation", __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/worker/operations.py":105
 * 
 * # TODO(BEAM-9324) Remove these workarounds once upgraded to Cython 3
 * def _cast_to_receiver(value):             # <<<<<<<<<<<<<<
 *   if cython.compiled:
 *     return cython.cast(Receiver, value)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_3_cast_to_receiver(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_3_cast_to_receiver = {"_cast_to_receiver", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_3_cast_to_receiver, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_3_cast_to_receiver(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_cast_to_receiver (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_2_cast_to_receiver(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_2_cast_to_receiver(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__2)
  __Pyx_RefNannySetupContext("_cast_to_receiver", 0);
  __Pyx_TraceCall("_cast_to_receiver", __pyx_f[0], 105, 0, __PYX_ERR(0, 105, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":106
 * # TODO(BEAM-9324) Remove these workarounds once upgraded to Cython 3
 * def _cast_to_receiver(value):
 *   if cython.compiled:             # <<<<<<<<<<<<<<
 *     return cython.cast(Receiver, value)
 *   else:
 */
  __pyx_t_1 = (1 != 0);
  if (__pyx_t_1) {

    /* "apache_beam/runners/worker/operations.py":107
 * def _cast_to_receiver(value):
 *   if cython.compiled:
 *     return cython.cast(Receiver, value)             # <<<<<<<<<<<<<<
 *   else:
 *     return value
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)((struct __pyx_obj_11apache_beam_7runners_6common_Receiver *)__pyx_v_value)));
    __pyx_r = __pyx_v_value;
    goto __pyx_L0;

    /* "apache_beam/runners/worker/operations.py":106
 * # TODO(BEAM-9324) Remove these workarounds once upgraded to Cython 3
 * def _cast_to_receiver(value):
 *   if cython.compiled:             # <<<<<<<<<<<<<<
 *     return cython.cast(Receiver, value)
 *   else:
 */
  }

  /* "apache_beam/runners/worker/operations.py":109
 *     return cython.cast(Receiver, value)
 *   else:
 *     return value             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_value);
    __pyx_r = __pyx_v_value;
    goto __pyx_L0;
  }

  /* "apache_beam/runners/worker/operations.py":105
 * 
 * # TODO(BEAM-9324) Remove these workarounds once upgraded to Cython 3
 * def _cast_to_receiver(value):             # <<<<<<<<<<<<<<
 *   if cython.compiled:
 *     return cython.cast(Receiver, value)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations._cast_to_receiver", __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/worker/operations.py":121
 *   """
 *   @staticmethod
 *   def create(counter_factory,             # <<<<<<<<<<<<<<
 *              step_name,  # type: str
 *              output_index,
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_1create(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_1create = {"create", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_1create, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_1create(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_counter_factory = 0;
  PyObject *__pyx_v_step_name = 0;
  PyObject *__pyx_v_output_index = 0;
  PyObject *__pyx_v_consumers = 0;
  PyObject *__pyx_v_coder = 0;
  PyObject *__pyx_v_producer_type_hints = 0;
  PyObject *__pyx_v_producer_batch_converter = 0;
  PyObject *__pyx_v_output_sampler = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_counter_factory,&__pyx_n_s_step_name,&__pyx_n_s_output_index,&__pyx_n_s_consumers,&__pyx_n_s_coder,&__pyx_n_s_producer_type_hints,&__pyx_n_s_producer_batch_converter,&__pyx_n_s_output_sampler,0};
    PyObject* values[8] = {0,0,0,0,0,0,0,0};

    /* "apache_beam/runners/worker/operations.py":128
 *              producer_type_hints,
 *              producer_batch_converter, # type: Optional[BatchConverter]
 *              output_sampler=None,  # type: Optional[OutputSampler]             # <<<<<<<<<<<<<<
 *              ):
 *     # type: (...) -> ConsumerSet
 */
    values[7] = ((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  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_counter_factory)) != 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("create", 0, 7, 8, 1); __PYX_ERR(0, 121, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_output_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("create", 0, 7, 8, 2); __PYX_ERR(0, 121, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_consumers)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("create", 0, 7, 8, 3); __PYX_ERR(0, 121, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_coder)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("create", 0, 7, 8, 4); __PYX_ERR(0, 121, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_producer_type_hints)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("create", 0, 7, 8, 5); __PYX_ERR(0, 121, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_producer_batch_converter)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("create", 0, 7, 8, 6); __PYX_ERR(0, 121, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_output_sampler);
          if (value) { values[7] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create") < 0)) __PYX_ERR(0, 121, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 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_counter_factory = values[0];
    __pyx_v_step_name = values[1];
    __pyx_v_output_index = values[2];
    __pyx_v_consumers = values[3];
    __pyx_v_coder = values[4];
    __pyx_v_producer_type_hints = values[5];
    __pyx_v_producer_batch_converter = values[6];
    __pyx_v_output_sampler = values[7];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create", 0, 7, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 121, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_create(__pyx_v_counter_factory, __pyx_v_step_name, __pyx_v_output_index, __pyx_v_consumers, __pyx_v_coder, __pyx_v_producer_type_hints, __pyx_v_producer_batch_converter, __pyx_v_output_sampler);

  /* "apache_beam/runners/worker/operations.py":121
 *   """
 *   @staticmethod
 *   def create(counter_factory,             # <<<<<<<<<<<<<<
 *              step_name,  # type: str
 *              output_index,
 */

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_create(PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_step_name, PyObject *__pyx_v_output_index, PyObject *__pyx_v_consumers, PyObject *__pyx_v_coder, PyObject *__pyx_v_producer_type_hints, PyObject *__pyx_v_producer_batch_converter, PyObject *__pyx_v_output_sampler) {
  PyObject *__pyx_v_consumer = NULL;
  PyObject *__pyx_v_consumer_batch_preference = NULL;
  PyObject *__pyx_v_consumer_batch_converter = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__3)
  __Pyx_RefNannySetupContext("create", 0);
  __Pyx_TraceCall("create", __pyx_f[0], 121, 0, __PYX_ERR(0, 121, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":131
 *              ):
 *     # type: (...) -> ConsumerSet
 *     if len(consumers) == 1:             # <<<<<<<<<<<<<<
 *       consumer = consumers[0]
 * 
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_consumers); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 131, __pyx_L1_error)
  __pyx_t_2 = ((__pyx_t_1 == 1) != 0);
  if (__pyx_t_2) {

    /* "apache_beam/runners/worker/operations.py":132
 *     # type: (...) -> ConsumerSet
 *     if len(consumers) == 1:
 *       consumer = consumers[0]             # <<<<<<<<<<<<<<
 * 
 *       consumer_batch_preference = consumer.get_batching_preference()
 */
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_consumers, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 132, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_consumer = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "apache_beam/runners/worker/operations.py":134
 *       consumer = consumers[0]
 * 
 *       consumer_batch_preference = consumer.get_batching_preference()             # <<<<<<<<<<<<<<
 *       consumer_batch_converter = consumer.get_input_batch_converter()
 *       if (not consumer_batch_preference.supports_batches and
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_consumer, __pyx_n_s_get_batching_preference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 134, __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, 134, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_consumer_batch_preference = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "apache_beam/runners/worker/operations.py":135
 * 
 *       consumer_batch_preference = consumer.get_batching_preference()
 *       consumer_batch_converter = consumer.get_input_batch_converter()             # <<<<<<<<<<<<<<
 *       if (not consumer_batch_preference.supports_batches and
 *           producer_batch_converter is None and
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_consumer, __pyx_n_s_get_input_batch_converter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 135, __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, 135, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_consumer_batch_converter = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "apache_beam/runners/worker/operations.py":136
 *       consumer_batch_preference = consumer.get_batching_preference()
 *       consumer_batch_converter = consumer.get_input_batch_converter()
 *       if (not consumer_batch_preference.supports_batches and             # <<<<<<<<<<<<<<
 *           producer_batch_converter is None and
 *           consumer_batch_converter is None):
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_consumer_batch_preference, __pyx_n_s_supports_batches); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 136, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 136, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = ((!__pyx_t_6) != 0);
    if (__pyx_t_7) {
    } else {
      __pyx_t_2 = __pyx_t_7;
      goto __pyx_L5_bool_binop_done;
    }

    /* "apache_beam/runners/worker/operations.py":137
 *       consumer_batch_converter = consumer.get_input_batch_converter()
 *       if (not consumer_batch_preference.supports_batches and
 *           producer_batch_converter is None and             # <<<<<<<<<<<<<<
 *           consumer_batch_converter is None):
 *         return SingletonElementConsumerSet(
 */
    __pyx_t_7 = (__pyx_v_producer_batch_converter == Py_None);
    __pyx_t_6 = (__pyx_t_7 != 0);
    if (__pyx_t_6) {
    } else {
      __pyx_t_2 = __pyx_t_6;
      goto __pyx_L5_bool_binop_done;
    }

    /* "apache_beam/runners/worker/operations.py":138
 *       if (not consumer_batch_preference.supports_batches and
 *           producer_batch_converter is None and
 *           consumer_batch_converter is None):             # <<<<<<<<<<<<<<
 *         return SingletonElementConsumerSet(
 *             counter_factory,
 */
    __pyx_t_6 = (__pyx_v_consumer_batch_converter == Py_None);
    __pyx_t_7 = (__pyx_t_6 != 0);
    __pyx_t_2 = __pyx_t_7;
    __pyx_L5_bool_binop_done:;

    /* "apache_beam/runners/worker/operations.py":136
 *       consumer_batch_preference = consumer.get_batching_preference()
 *       consumer_batch_converter = consumer.get_input_batch_converter()
 *       if (not consumer_batch_preference.supports_batches and             # <<<<<<<<<<<<<<
 *           producer_batch_converter is None and
 *           consumer_batch_converter is None):
 */
    if (__pyx_t_2) {

      /* "apache_beam/runners/worker/operations.py":139
 *           producer_batch_converter is None and
 *           consumer_batch_converter is None):
 *         return SingletonElementConsumerSet(             # <<<<<<<<<<<<<<
 *             counter_factory,
 *             step_name,
 */
      __Pyx_XDECREF(__pyx_r);

      /* "apache_beam/runners/worker/operations.py":146
 *             coder,
 *             producer_type_hints,
 *             output_sampler)             # <<<<<<<<<<<<<<
 * 
 *     return GeneralPurposeConsumerSet(
 */
      __pyx_t_3 = PyTuple_New(7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 139, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_counter_factory);
      __Pyx_GIVEREF(__pyx_v_counter_factory);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_counter_factory);
      __Pyx_INCREF(__pyx_v_step_name);
      __Pyx_GIVEREF(__pyx_v_step_name);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_step_name);
      __Pyx_INCREF(__pyx_v_output_index);
      __Pyx_GIVEREF(__pyx_v_output_index);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_output_index);
      __Pyx_INCREF(__pyx_v_consumer);
      __Pyx_GIVEREF(__pyx_v_consumer);
      PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_consumer);
      __Pyx_INCREF(__pyx_v_coder);
      __Pyx_GIVEREF(__pyx_v_coder);
      PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_coder);
      __Pyx_INCREF(__pyx_v_producer_type_hints);
      __Pyx_GIVEREF(__pyx_v_producer_type_hints);
      PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_producer_type_hints);
      __Pyx_INCREF(__pyx_v_output_sampler);
      __Pyx_GIVEREF(__pyx_v_output_sampler);
      PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_v_output_sampler);

      /* "apache_beam/runners/worker/operations.py":139
 *           producer_batch_converter is None and
 *           consumer_batch_converter is None):
 *         return SingletonElementConsumerSet(             # <<<<<<<<<<<<<<
 *             counter_factory,
 *             step_name,
 */
      __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 139, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "apache_beam/runners/worker/operations.py":136
 *       consumer_batch_preference = consumer.get_batching_preference()
 *       consumer_batch_converter = consumer.get_input_batch_converter()
 *       if (not consumer_batch_preference.supports_batches and             # <<<<<<<<<<<<<<
 *           producer_batch_converter is None and
 *           consumer_batch_converter is None):
 */
    }

    /* "apache_beam/runners/worker/operations.py":131
 *              ):
 *     # type: (...) -> ConsumerSet
 *     if len(consumers) == 1:             # <<<<<<<<<<<<<<
 *       consumer = consumers[0]
 * 
 */
  }

  /* "apache_beam/runners/worker/operations.py":148
 *             output_sampler)
 * 
 *     return GeneralPurposeConsumerSet(             # <<<<<<<<<<<<<<
 *         counter_factory,
 *         step_name,
 */
  __Pyx_XDECREF(__pyx_r);

  /* "apache_beam/runners/worker/operations.py":156
 *         consumers,
 *         producer_batch_converter,
 *         output_sampler)             # <<<<<<<<<<<<<<
 * 
 *   def __init__(self,
 */
  __pyx_t_4 = PyTuple_New(8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_counter_factory);
  __Pyx_GIVEREF(__pyx_v_counter_factory);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_counter_factory);
  __Pyx_INCREF(__pyx_v_step_name);
  __Pyx_GIVEREF(__pyx_v_step_name);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_step_name);
  __Pyx_INCREF(__pyx_v_output_index);
  __Pyx_GIVEREF(__pyx_v_output_index);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_output_index);
  __Pyx_INCREF(__pyx_v_coder);
  __Pyx_GIVEREF(__pyx_v_coder);
  PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_coder);
  __Pyx_INCREF(__pyx_v_producer_type_hints);
  __Pyx_GIVEREF(__pyx_v_producer_type_hints);
  PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_v_producer_type_hints);
  __Pyx_INCREF(__pyx_v_consumers);
  __Pyx_GIVEREF(__pyx_v_consumers);
  PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_v_consumers);
  __Pyx_INCREF(__pyx_v_producer_batch_converter);
  __Pyx_GIVEREF(__pyx_v_producer_batch_converter);
  PyTuple_SET_ITEM(__pyx_t_4, 6, __pyx_v_producer_batch_converter);
  __Pyx_INCREF(__pyx_v_output_sampler);
  __Pyx_GIVEREF(__pyx_v_output_sampler);
  PyTuple_SET_ITEM(__pyx_t_4, 7, __pyx_v_output_sampler);

  /* "apache_beam/runners/worker/operations.py":148
 *             output_sampler)
 * 
 *     return GeneralPurposeConsumerSet(             # <<<<<<<<<<<<<<
 *         counter_factory,
 *         step_name,
 */
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "apache_beam/runners/worker/operations.py":121
 *   """
 *   @staticmethod
 *   def create(counter_factory,             # <<<<<<<<<<<<<<
 *              step_name,  # type: str
 *              output_index,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_consumer);
  __Pyx_XDECREF(__pyx_v_consumer_batch_preference);
  __Pyx_XDECREF(__pyx_v_consumer_batch_converter);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":158
 *         output_sampler)
 * 
 *   def __init__(self,             # <<<<<<<<<<<<<<
 *                counter_factory,
 *                step_name,  # type: str
 */

/* Python wrapper */
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_counter_factory = 0;
  PyObject *__pyx_v_step_name = 0;
  PyObject *__pyx_v_output_index = 0;
  PyObject *__pyx_v_consumers = 0;
  PyObject *__pyx_v_coder = 0;
  PyObject *__pyx_v_producer_type_hints = 0;
  PyObject *__pyx_v_producer_batch_converter = 0;
  PyObject *__pyx_v_output_sampler = 0;
  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_counter_factory,&__pyx_n_s_step_name,&__pyx_n_s_output_index,&__pyx_n_s_consumers,&__pyx_n_s_coder,&__pyx_n_s_producer_type_hints,&__pyx_n_s_producer_batch_converter,&__pyx_n_s_output_sampler,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_counter_factory)) != 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__", 1, 8, 8, 1); __PYX_ERR(0, 158, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_output_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 2); __PYX_ERR(0, 158, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_consumers)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 3); __PYX_ERR(0, 158, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_coder)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 4); __PYX_ERR(0, 158, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_producer_type_hints)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 5); __PYX_ERR(0, 158, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_producer_batch_converter)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 6); __PYX_ERR(0, 158, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_output_sampler)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 7); __PYX_ERR(0, 158, __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, 158, __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_counter_factory = values[0];
    __pyx_v_step_name = values[1];
    __pyx_v_output_index = values[2];
    __pyx_v_consumers = values[3];
    __pyx_v_coder = values[4];
    __pyx_v_producer_type_hints = values[5];
    __pyx_v_producer_batch_converter = values[6];
    __pyx_v_output_sampler = values[7];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 158, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_2__init__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self), __pyx_v_counter_factory, __pyx_v_step_name, __pyx_v_output_index, __pyx_v_consumers, __pyx_v_coder, __pyx_v_producer_type_hints, __pyx_v_producer_batch_converter, __pyx_v_output_sampler);

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_2__init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_step_name, PyObject *__pyx_v_output_index, PyObject *__pyx_v_consumers, PyObject *__pyx_v_coder, PyObject *__pyx_v_producer_type_hints, PyObject *__pyx_v_producer_batch_converter, PyObject *__pyx_v_output_sampler) {
  int __pyx_r;
  __Pyx_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_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 158, 0, __PYX_ERR(0, 158, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":168
 *                output_sampler
 *                ):
 *     self.opcounter = opcounters.OperationCounters(             # <<<<<<<<<<<<<<
 *         counter_factory,
 *         step_name,
 */
  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_counter_factory);
  __Pyx_GIVEREF(__pyx_v_counter_factory);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_counter_factory);
  __Pyx_INCREF(__pyx_v_step_name);
  __Pyx_GIVEREF(__pyx_v_step_name);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_step_name);
  __Pyx_INCREF(__pyx_v_coder);
  __Pyx_GIVEREF(__pyx_v_coder);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_coder);
  __Pyx_INCREF(__pyx_v_output_index);
  __Pyx_GIVEREF(__pyx_v_output_index);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_output_index);

  /* "apache_beam/runners/worker/operations.py":173
 *         coder,
 *         output_index,
 *         producer_type_hints=producer_type_hints,             # <<<<<<<<<<<<<<
 *         producer_batch_converter=producer_batch_converter)
 *     # Used in repr.
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_producer_type_hints, __pyx_v_producer_type_hints) < 0) __PYX_ERR(0, 173, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":174
 *         output_index,
 *         producer_type_hints=producer_type_hints,
 *         producer_batch_converter=producer_batch_converter)             # <<<<<<<<<<<<<<
 *     # Used in repr.
 *     self.step_name = step_name
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_producer_batch_converter, __pyx_v_producer_batch_converter) < 0) __PYX_ERR(0, 173, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":168
 *                output_sampler
 *                ):
 *     self.opcounter = opcounters.OperationCounters(             # <<<<<<<<<<<<<<
 *         counter_factory,
 *         step_name,
 */
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 168, __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->opcounter);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->opcounter));
  __pyx_v_self->opcounter = ((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "apache_beam/runners/worker/operations.py":176
 *         producer_batch_converter=producer_batch_converter)
 *     # Used in repr.
 *     self.step_name = step_name             # <<<<<<<<<<<<<<
 *     self.output_index = output_index
 *     self.coder = coder
 */
  __Pyx_INCREF(__pyx_v_step_name);
  __Pyx_GIVEREF(__pyx_v_step_name);
  __Pyx_GOTREF(__pyx_v_self->step_name);
  __Pyx_DECREF(__pyx_v_self->step_name);
  __pyx_v_self->step_name = __pyx_v_step_name;

  /* "apache_beam/runners/worker/operations.py":177
 *     # Used in repr.
 *     self.step_name = step_name
 *     self.output_index = output_index             # <<<<<<<<<<<<<<
 *     self.coder = coder
 *     self.consumers = consumers
 */
  __Pyx_INCREF(__pyx_v_output_index);
  __Pyx_GIVEREF(__pyx_v_output_index);
  __Pyx_GOTREF(__pyx_v_self->output_index);
  __Pyx_DECREF(__pyx_v_self->output_index);
  __pyx_v_self->output_index = __pyx_v_output_index;

  /* "apache_beam/runners/worker/operations.py":178
 *     self.step_name = step_name
 *     self.output_index = output_index
 *     self.coder = coder             # <<<<<<<<<<<<<<
 *     self.consumers = consumers
 *     self.output_sampler = output_sampler
 */
  __Pyx_INCREF(__pyx_v_coder);
  __Pyx_GIVEREF(__pyx_v_coder);
  __Pyx_GOTREF(__pyx_v_self->coder);
  __Pyx_DECREF(__pyx_v_self->coder);
  __pyx_v_self->coder = __pyx_v_coder;

  /* "apache_beam/runners/worker/operations.py":179
 *     self.output_index = output_index
 *     self.coder = coder
 *     self.consumers = consumers             # <<<<<<<<<<<<<<
 *     self.output_sampler = output_sampler
 *     self.element_sampler = (
 */
  if (!(likely(PyList_CheckExact(__pyx_v_consumers))||((__pyx_v_consumers) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_consumers)->tp_name), 0))) __PYX_ERR(0, 179, __pyx_L1_error)
  __pyx_t_3 = __pyx_v_consumers;
  __Pyx_INCREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->consumers);
  __Pyx_DECREF(__pyx_v_self->consumers);
  __pyx_v_self->consumers = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "apache_beam/runners/worker/operations.py":180
 *     self.coder = coder
 *     self.consumers = consumers
 *     self.output_sampler = output_sampler             # <<<<<<<<<<<<<<
 *     self.element_sampler = (
 *         output_sampler.element_sampler if output_sampler else None)
 */
  __Pyx_INCREF(__pyx_v_output_sampler);
  __Pyx_GIVEREF(__pyx_v_output_sampler);
  __Pyx_GOTREF(__pyx_v_self->output_sampler);
  __Pyx_DECREF(__pyx_v_self->output_sampler);
  __pyx_v_self->output_sampler = __pyx_v_output_sampler;

  /* "apache_beam/runners/worker/operations.py":182
 *     self.output_sampler = output_sampler
 *     self.element_sampler = (
 *         output_sampler.element_sampler if output_sampler else None)             # <<<<<<<<<<<<<<
 *     self.execution_context = None  # type: Optional[ExecutionContext]
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_output_sampler); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 182, __pyx_L1_error)
  if (__pyx_t_4) {
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_output_sampler, __pyx_n_s_element_sampler); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_3 = Py_None;
  }

  /* "apache_beam/runners/worker/operations.py":181
 *     self.consumers = consumers
 *     self.output_sampler = output_sampler
 *     self.element_sampler = (             # <<<<<<<<<<<<<<
 *         output_sampler.element_sampler if output_sampler else None)
 *     self.execution_context = None  # type: Optional[ExecutionContext]
 */
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->element_sampler);
  __Pyx_DECREF(__pyx_v_self->element_sampler);
  __pyx_v_self->element_sampler = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "apache_beam/runners/worker/operations.py":183
 *     self.element_sampler = (
 *         output_sampler.element_sampler if output_sampler else None)
 *     self.execution_context = None  # type: Optional[ExecutionContext]             # <<<<<<<<<<<<<<
 * 
 *   def try_split(self, fraction_of_remainder):
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->execution_context);
  __Pyx_DECREF(__pyx_v_self->execution_context);
  __pyx_v_self->execution_context = Py_None;

  /* "apache_beam/runners/worker/operations.py":158
 *         output_sampler)
 * 
 *   def __init__(self,             # <<<<<<<<<<<<<<
 *                counter_factory,
 *                step_name,  # type: str
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.__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/worker/operations.py":185
 *     self.execution_context = None  # type: Optional[ExecutionContext]
 * 
 *   def try_split(self, fraction_of_remainder):             # <<<<<<<<<<<<<<
 *     # type: (...) -> Optional[Any]
 *     # TODO(SDF): Consider supporting splitting each consumer individually.
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5try_split(PyObject *__pyx_v_self, PyObject *__pyx_v_fraction_of_remainder); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5try_split = {"try_split", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5try_split, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5try_split(PyObject *__pyx_v_self, PyObject *__pyx_v_fraction_of_remainder) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("try_split (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_4try_split(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self), ((PyObject *)__pyx_v_fraction_of_remainder));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_4try_split(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_fraction_of_remainder) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__4)
  __Pyx_RefNannySetupContext("try_split", 0);
  __Pyx_TraceCall("try_split", __pyx_f[0], 185, 0, __PYX_ERR(0, 185, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":192
 *     # This would require dedicated delivery of the split results to each
 *     # of the consumers separately.
 *     return None             # <<<<<<<<<<<<<<
 * 
 *   def current_element_progress(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "apache_beam/runners/worker/operations.py":185
 *     self.execution_context = None  # type: Optional[ExecutionContext]
 * 
 *   def try_split(self, fraction_of_remainder):             # <<<<<<<<<<<<<<
 *     # type: (...) -> Optional[Any]
 *     # TODO(SDF): Consider supporting splitting each consumer individually.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.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/worker/operations.py":194
 *     return None
 * 
 *   def current_element_progress(self):             # <<<<<<<<<<<<<<
 *     # type: () -> Optional[iobase.RestrictionProgress]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_7current_element_progress(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_11apache_beam_7runners_6worker_10operations_11ConsumerSet_6current_element_progress[] = "Returns the progress of the current element.\n\n    This progress should be an instance of\n    apache_beam.io.iobase.RestrictionProgress, or None if progress is unknown.\n    ";
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_7current_element_progress = {"current_element_progress", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_7current_element_progress, METH_NOARGS, __pyx_doc_11apache_beam_7runners_6worker_10operations_11ConsumerSet_6current_element_progress};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_7current_element_progress(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("current_element_progress (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_6current_element_progress(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_6current_element_progress(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__5)
  __Pyx_RefNannySetupContext("current_element_progress", 0);
  __Pyx_TraceCall("current_element_progress", __pyx_f[0], 194, 0, __PYX_ERR(0, 194, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":204
 *     # TODO(SDF): Could implement this as a weighted average, if it becomes
 *     # useful to split on.
 *     return None             # <<<<<<<<<<<<<<
 * 
 *   def update_counters_start(self, windowed_value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "apache_beam/runners/worker/operations.py":194
 *     return None
 * 
 *   def current_element_progress(self):             # <<<<<<<<<<<<<<
 *     # type: () -> Optional[iobase.RestrictionProgress]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.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/worker/operations.py":206
 *     return None
 * 
 *   def update_counters_start(self, windowed_value):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     self.opcounter.update_from(windowed_value)
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9update_counters_start(PyObject *__pyx_v_self, PyObject *__pyx_v_windowed_value); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_11ConsumerSet_update_counters_start(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_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;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__6)
  __Pyx_RefNannySetupContext("update_counters_start", 0);
  __Pyx_TraceCall("update_counters_start", __pyx_f[0], 206, 0, __PYX_ERR(0, 206, __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_update_counters_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 206, __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_6worker_10operations_11ConsumerSet_9update_counters_start)) {
        __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, 206, __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/worker/operations.py":208
 *   def update_counters_start(self, windowed_value):
 *     # type: (WindowedValue) -> None
 *     self.opcounter.update_from(windowed_value)             # <<<<<<<<<<<<<<
 * 
 *     if self.execution_context is not None:
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self->opcounter->__pyx_vtab)->update_from(__pyx_v_self->opcounter, ((PyObject *)__pyx_v_windowed_value), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":210
 *     self.opcounter.update_from(windowed_value)
 * 
 *     if self.execution_context is not None:             # <<<<<<<<<<<<<<
 *       self.execution_context.output_sampler = self.output_sampler
 * 
 */
  __pyx_t_5 = (__pyx_v_self->execution_context != Py_None);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "apache_beam/runners/worker/operations.py":211
 * 
 *     if self.execution_context is not None:
 *       self.execution_context.output_sampler = self.output_sampler             # <<<<<<<<<<<<<<
 * 
 *     # The following code is optimized by inlining a function call. Because this
 */
    __pyx_t_1 = __pyx_v_self->output_sampler;
    __Pyx_INCREF(__pyx_t_1);
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->execution_context, __pyx_n_s_output_sampler, __pyx_t_1) < 0) __PYX_ERR(0, 211, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/runners/worker/operations.py":210
 *     self.opcounter.update_from(windowed_value)
 * 
 *     if self.execution_context is not None:             # <<<<<<<<<<<<<<
 *       self.execution_context.output_sampler = self.output_sampler
 * 
 */
  }

  /* "apache_beam/runners/worker/operations.py":219
 *     # is that some samples might be dropped, but it is better than the
 *     # alternative which is double sampling the same element.
 *     if self.element_sampler is not None:             # <<<<<<<<<<<<<<
 *       if not self.element_sampler.has_element:
 *         self.element_sampler.el = windowed_value
 */
  __pyx_t_6 = (__pyx_v_self->element_sampler != Py_None);
  __pyx_t_5 = (__pyx_t_6 != 0);
  if (__pyx_t_5) {

    /* "apache_beam/runners/worker/operations.py":220
 *     # alternative which is double sampling the same element.
 *     if self.element_sampler is not None:
 *       if not self.element_sampler.has_element:             # <<<<<<<<<<<<<<
 *         self.element_sampler.el = windowed_value
 *         self.element_sampler.has_element = True
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->element_sampler, __pyx_n_s_has_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 220, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 220, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = ((!__pyx_t_5) != 0);
    if (__pyx_t_6) {

      /* "apache_beam/runners/worker/operations.py":221
 *     if self.element_sampler is not None:
 *       if not self.element_sampler.has_element:
 *         self.element_sampler.el = windowed_value             # <<<<<<<<<<<<<<
 *         self.element_sampler.has_element = True
 * 
 */
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->element_sampler, __pyx_n_s_el, ((PyObject *)__pyx_v_windowed_value)) < 0) __PYX_ERR(0, 221, __pyx_L1_error)

      /* "apache_beam/runners/worker/operations.py":222
 *       if not self.element_sampler.has_element:
 *         self.element_sampler.el = windowed_value
 *         self.element_sampler.has_element = True             # <<<<<<<<<<<<<<
 * 
 *   def update_counters_finish(self):
 */
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->element_sampler, __pyx_n_s_has_element, Py_True) < 0) __PYX_ERR(0, 222, __pyx_L1_error)

      /* "apache_beam/runners/worker/operations.py":220
 *     # alternative which is double sampling the same element.
 *     if self.element_sampler is not None:
 *       if not self.element_sampler.has_element:             # <<<<<<<<<<<<<<
 *         self.element_sampler.el = windowed_value
 *         self.element_sampler.has_element = True
 */
    }

    /* "apache_beam/runners/worker/operations.py":219
 *     # is that some samples might be dropped, but it is better than the
 *     # alternative which is double sampling the same element.
 *     if self.element_sampler is not None:             # <<<<<<<<<<<<<<
 *       if not self.element_sampler.has_element:
 *         self.element_sampler.el = windowed_value
 */
  }

  /* "apache_beam/runners/worker/operations.py":206
 *     return None
 * 
 *   def update_counters_start(self, windowed_value):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     self.opcounter.update_from(windowed_value)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.update_counters_start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9update_counters_start(PyObject *__pyx_v_self, PyObject *__pyx_v_windowed_value); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9update_counters_start = {"update_counters_start", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9update_counters_start, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9update_counters_start(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("update_counters_start (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, 206, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_8update_counters_start(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self), ((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_6worker_10operations_11ConsumerSet_8update_counters_start(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_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("update_counters_start", 0);
  __Pyx_TraceCall("update_counters_start (wrapper)", __pyx_f[0], 206, 0, __PYX_ERR(0, 206, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_11ConsumerSet_update_counters_start(__pyx_v_self, __pyx_v_windowed_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.update_counters_start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":224
 *         self.element_sampler.has_element = True
 * 
 *   def update_counters_finish(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     self.opcounter.update_collect()
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_11update_counters_finish(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_11ConsumerSet_update_counters_finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_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("update_counters_finish", 0);
  __Pyx_TraceCall("update_counters_finish", __pyx_f[0], 224, 0, __PYX_ERR(0, 224, __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_update_counters_finish); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __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_6worker_10operations_11ConsumerSet_11update_counters_finish)) {
        __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, 224, __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/worker/operations.py":226
 *   def update_counters_finish(self):
 *     # type: () -> None
 *     self.opcounter.update_collect()             # <<<<<<<<<<<<<<
 * 
 *   def update_counters_batch(self, windowed_batch):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self->opcounter->__pyx_vtab)->update_collect(__pyx_v_self->opcounter, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":224
 *         self.element_sampler.has_element = True
 * 
 *   def update_counters_finish(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     self.opcounter.update_collect()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.update_counters_finish", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_11update_counters_finish(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_11update_counters_finish = {"update_counters_finish", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_11update_counters_finish, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_11update_counters_finish(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("update_counters_finish (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_10update_counters_finish(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_10update_counters_finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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("update_counters_finish", 0);
  __Pyx_TraceCall("update_counters_finish (wrapper)", __pyx_f[0], 224, 0, __PYX_ERR(0, 224, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_11ConsumerSet_update_counters_finish(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.update_counters_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/worker/operations.py":228
 *     self.opcounter.update_collect()
 * 
 *   def update_counters_batch(self, windowed_batch):             # <<<<<<<<<<<<<<
 *     # type: (WindowedBatch) -> None
 *     self.opcounter.update_from_batch(windowed_batch)
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_13update_counters_batch(PyObject *__pyx_v_self, PyObject *__pyx_v_windowed_batch); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_11ConsumerSet_update_counters_batch(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_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("update_counters_batch", 0);
  __Pyx_TraceCall("update_counters_batch", __pyx_f[0], 228, 0, __PYX_ERR(0, 228, __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_update_counters_batch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 228, __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_6worker_10operations_11ConsumerSet_13update_counters_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, 228, __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/worker/operations.py":230
 *   def update_counters_batch(self, windowed_batch):
 *     # type: (WindowedBatch) -> None
 *     self.opcounter.update_from_batch(windowed_batch)             # <<<<<<<<<<<<<<
 * 
 *   def __repr__(self):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self->opcounter->__pyx_vtab)->update_from_batch(__pyx_v_self->opcounter, ((PyObject *)__pyx_v_windowed_batch), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":228
 *     self.opcounter.update_collect()
 * 
 *   def update_counters_batch(self, windowed_batch):             # <<<<<<<<<<<<<<
 *     # type: (WindowedBatch) -> None
 *     self.opcounter.update_from_batch(windowed_batch)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.update_counters_batch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_13update_counters_batch(PyObject *__pyx_v_self, PyObject *__pyx_v_windowed_batch); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_13update_counters_batch = {"update_counters_batch", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_13update_counters_batch, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_13update_counters_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("update_counters_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, 228, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_12update_counters_batch(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self), ((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_6worker_10operations_11ConsumerSet_12update_counters_batch(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch) {
  PyObject *__pyx_r = NULL;
  __Pyx_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("update_counters_batch", 0);
  __Pyx_TraceCall("update_counters_batch (wrapper)", __pyx_f[0], 228, 0, __PYX_ERR(0, 228, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_11ConsumerSet_update_counters_batch(__pyx_v_self, __pyx_v_windowed_batch, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.update_counters_batch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":232
 *     self.opcounter.update_from_batch(windowed_batch)
 * 
 *   def __repr__(self):             # <<<<<<<<<<<<<<
 *     return '%s[%s.out%s, coder=%s, len(consumers)=%s]' % (
 *         self.__class__.__name__,
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14__repr__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14__repr__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 232, 0, __PYX_ERR(0, 232, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":233
 * 
 *   def __repr__(self):
 *     return '%s[%s.out%s, coder=%s, len(consumers)=%s]' % (             # <<<<<<<<<<<<<<
 *         self.__class__.__name__,
 *         self.step_name,
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;

  /* "apache_beam/runners/worker/operations.py":234
 *   def __repr__(self):
 *     return '%s[%s.out%s, coder=%s, len(consumers)=%s]' % (
 *         self.__class__.__name__,             # <<<<<<<<<<<<<<
 *         self.step_name,
 *         self.output_index,
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__9);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__9);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u__9);

  /* "apache_beam/runners/worker/operations.py":235
 *     return '%s[%s.out%s, coder=%s, len(consumers)=%s]' % (
 *         self.__class__.__name__,
 *         self.step_name,             # <<<<<<<<<<<<<<
 *         self.output_index,
 *         self.coder,
 */
  __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_self->step_name), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u_out);
  __pyx_t_2 += 4;
  __Pyx_GIVEREF(__pyx_kp_u_out);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_kp_u_out);

  /* "apache_beam/runners/worker/operations.py":236
 *         self.__class__.__name__,
 *         self.step_name,
 *         self.output_index,             # <<<<<<<<<<<<<<
 *         self.coder,
 *         len(self.consumers))
 */
  __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_self->output_index), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u_coder_2);
  __pyx_t_2 += 8;
  __Pyx_GIVEREF(__pyx_kp_u_coder_2);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_kp_u_coder_2);

  /* "apache_beam/runners/worker/operations.py":237
 *         self.step_name,
 *         self.output_index,
 *         self.coder,             # <<<<<<<<<<<<<<
 *         len(self.consumers))
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_self->coder), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u_len_consumers);
  __pyx_t_2 += 17;
  __Pyx_GIVEREF(__pyx_kp_u_len_consumers);
  PyTuple_SET_ITEM(__pyx_t_1, 7, __pyx_kp_u_len_consumers);

  /* "apache_beam/runners/worker/operations.py":238
 *         self.output_index,
 *         self.coder,
 *         len(self.consumers))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_4 = __pyx_v_self->consumers;
  __Pyx_INCREF(__pyx_t_4);
  if (unlikely(__pyx_t_4 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 238, __pyx_L1_error)
  }
  __pyx_t_6 = PyList_GET_SIZE(__pyx_t_4); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 238, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_6, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 8, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__10);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__10);
  PyTuple_SET_ITEM(__pyx_t_1, 9, __pyx_kp_u__10);

  /* "apache_beam/runners/worker/operations.py":233
 * 
 *   def __repr__(self):
 *     return '%s[%s.out%s, coder=%s, len(consumers)=%s]' % (             # <<<<<<<<<<<<<<
 *         self.__class__.__name__,
 *         self.step_name,
 */
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 10, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "apache_beam/runners/worker/operations.py":232
 *     self.opcounter.update_from_batch(windowed_batch)
 * 
 *   def __repr__(self):             # <<<<<<<<<<<<<<
 *     return '%s[%s.out%s, coder=%s, len(consumers)=%s]' % (
 *         self.__class__.__name__,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.pxd":33
 * cdef class ConsumerSet(Receiver):
 *   cdef list consumers
 *   cdef readonly opcounters.OperationCounters opcounter             # <<<<<<<<<<<<<<
 *   cdef public step_name
 *   cdef public output_index
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9opcounter_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9opcounter_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9opcounter___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9opcounter___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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[1], 33, 0, __PYX_ERR(1, 33, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->opcounter));
  __pyx_r = ((PyObject *)__pyx_v_self->opcounter);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.opcounter.__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/worker/operations.pxd":34
 *   cdef list consumers
 *   cdef readonly opcounters.OperationCounters opcounter
 *   cdef public step_name             # <<<<<<<<<<<<<<
 *   cdef public output_index
 *   cdef public coder
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9step_name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9step_name_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9step_name___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9step_name___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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[1], 34, 0, __PYX_ERR(1, 34, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->step_name);
  __pyx_r = __pyx_v_self->step_name;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.step_name.__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_6worker_10operations_11ConsumerSet_9step_name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9step_name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9step_name_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9step_name_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_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[1], 34, 0, __PYX_ERR(1, 34, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->step_name);
  __Pyx_DECREF(__pyx_v_self->step_name);
  __pyx_v_self->step_name = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.step_name.__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_6worker_10operations_11ConsumerSet_9step_name_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9step_name_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9step_name_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self));

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9step_name_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self) {
  int __pyx_r;
  __Pyx_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[1], 34, 0, __PYX_ERR(1, 34, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->step_name);
  __Pyx_DECREF(__pyx_v_self->step_name);
  __pyx_v_self->step_name = Py_None;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.step_name.__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/worker/operations.pxd":35
 *   cdef readonly opcounters.OperationCounters opcounter
 *   cdef public step_name
 *   cdef public output_index             # <<<<<<<<<<<<<<
 *   cdef public coder
 *   cdef public object output_sampler
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_12output_index_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_12output_index_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_12output_index___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_12output_index___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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[1], 35, 0, __PYX_ERR(1, 35, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->output_index);
  __pyx_r = __pyx_v_self->output_index;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.output_index.__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_6worker_10operations_11ConsumerSet_12output_index_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_12output_index_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_12output_index_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_12output_index_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_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[1], 35, 0, __PYX_ERR(1, 35, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->output_index);
  __Pyx_DECREF(__pyx_v_self->output_index);
  __pyx_v_self->output_index = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.output_index.__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_6worker_10operations_11ConsumerSet_12output_index_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_12output_index_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_12output_index_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self));

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_12output_index_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self) {
  int __pyx_r;
  __Pyx_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[1], 35, 0, __PYX_ERR(1, 35, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->output_index);
  __Pyx_DECREF(__pyx_v_self->output_index);
  __pyx_v_self->output_index = Py_None;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.output_index.__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/worker/operations.pxd":36
 *   cdef public step_name
 *   cdef public output_index
 *   cdef public coder             # <<<<<<<<<<<<<<
 *   cdef public object output_sampler
 *   cdef public object element_sampler
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5coder_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5coder_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5coder___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5coder___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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[1], 36, 0, __PYX_ERR(1, 36, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->coder);
  __pyx_r = __pyx_v_self->coder;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.coder.__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_6worker_10operations_11ConsumerSet_5coder_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5coder_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5coder_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5coder_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_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[1], 36, 0, __PYX_ERR(1, 36, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->coder);
  __Pyx_DECREF(__pyx_v_self->coder);
  __pyx_v_self->coder = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.coder.__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_6worker_10operations_11ConsumerSet_5coder_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5coder_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5coder_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self));

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5coder_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self) {
  int __pyx_r;
  __Pyx_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[1], 36, 0, __PYX_ERR(1, 36, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->coder);
  __Pyx_DECREF(__pyx_v_self->coder);
  __pyx_v_self->coder = Py_None;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.coder.__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/worker/operations.pxd":37
 *   cdef public output_index
 *   cdef public coder
 *   cdef public object output_sampler             # <<<<<<<<<<<<<<
 *   cdef public object element_sampler
 *   cdef public object execution_context
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14output_sampler_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14output_sampler_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14output_sampler___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14output_sampler___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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[1], 37, 0, __PYX_ERR(1, 37, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->output_sampler);
  __pyx_r = __pyx_v_self->output_sampler;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.output_sampler.__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_6worker_10operations_11ConsumerSet_14output_sampler_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14output_sampler_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14output_sampler_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14output_sampler_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_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[1], 37, 0, __PYX_ERR(1, 37, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->output_sampler);
  __Pyx_DECREF(__pyx_v_self->output_sampler);
  __pyx_v_self->output_sampler = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.output_sampler.__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_6worker_10operations_11ConsumerSet_14output_sampler_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14output_sampler_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14output_sampler_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self));

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14output_sampler_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self) {
  int __pyx_r;
  __Pyx_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[1], 37, 0, __PYX_ERR(1, 37, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->output_sampler);
  __Pyx_DECREF(__pyx_v_self->output_sampler);
  __pyx_v_self->output_sampler = Py_None;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.output_sampler.__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/worker/operations.pxd":38
 *   cdef public coder
 *   cdef public object output_sampler
 *   cdef public object element_sampler             # <<<<<<<<<<<<<<
 *   cdef public object execution_context
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15element_sampler_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15element_sampler_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15element_sampler___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15element_sampler___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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[1], 38, 0, __PYX_ERR(1, 38, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->element_sampler);
  __pyx_r = __pyx_v_self->element_sampler;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.element_sampler.__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_6worker_10operations_11ConsumerSet_15element_sampler_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15element_sampler_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15element_sampler_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15element_sampler_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_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[1], 38, 0, __PYX_ERR(1, 38, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->element_sampler);
  __Pyx_DECREF(__pyx_v_self->element_sampler);
  __pyx_v_self->element_sampler = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.element_sampler.__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_6worker_10operations_11ConsumerSet_15element_sampler_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15element_sampler_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15element_sampler_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self));

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15element_sampler_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self) {
  int __pyx_r;
  __Pyx_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[1], 38, 0, __PYX_ERR(1, 38, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->element_sampler);
  __Pyx_DECREF(__pyx_v_self->element_sampler);
  __pyx_v_self->element_sampler = Py_None;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.element_sampler.__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/worker/operations.pxd":39
 *   cdef public object output_sampler
 *   cdef public object element_sampler
 *   cdef public object execution_context             # <<<<<<<<<<<<<<
 * 
 *   cpdef update_counters_start(self, WindowedValue windowed_value)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17execution_context_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17execution_context_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17execution_context___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17execution_context___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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[1], 39, 0, __PYX_ERR(1, 39, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->execution_context);
  __pyx_r = __pyx_v_self->execution_context;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.execution_context.__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_6worker_10operations_11ConsumerSet_17execution_context_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17execution_context_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17execution_context_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17execution_context_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_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[1], 39, 0, __PYX_ERR(1, 39, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->execution_context);
  __Pyx_DECREF(__pyx_v_self->execution_context);
  __pyx_v_self->execution_context = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.execution_context.__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_6worker_10operations_11ConsumerSet_17execution_context_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17execution_context_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17execution_context_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self));

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17execution_context_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self) {
  int __pyx_r;
  __Pyx_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[1], 39, 0, __PYX_ERR(1, 39, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->execution_context);
  __Pyx_DECREF(__pyx_v_self->execution_context);
  __pyx_v_self->execution_context = Py_None;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.execution_context.__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_6worker_10operations_11ConsumerSet_17__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17__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_6worker_10operations_11ConsumerSet_16__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_16__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_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__11)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error));

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self.coder, self.consumers, self.element_sampler, self.execution_context, self.opcounter, self.output_index, self.output_sampler, self.step_name)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(8); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->coder);
  __Pyx_GIVEREF(__pyx_v_self->coder);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->coder);
  __Pyx_INCREF(__pyx_v_self->consumers);
  __Pyx_GIVEREF(__pyx_v_self->consumers);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->consumers);
  __Pyx_INCREF(__pyx_v_self->element_sampler);
  __Pyx_GIVEREF(__pyx_v_self->element_sampler);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->element_sampler);
  __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(((PyObject *)__pyx_v_self->opcounter));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->opcounter));
  PyTuple_SET_ITEM(__pyx_t_1, 4, ((PyObject *)__pyx_v_self->opcounter));
  __Pyx_INCREF(__pyx_v_self->output_index);
  __Pyx_GIVEREF(__pyx_v_self->output_index);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_v_self->output_index);
  __Pyx_INCREF(__pyx_v_self->output_sampler);
  __Pyx_GIVEREF(__pyx_v_self->output_sampler);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_v_self->output_sampler);
  __Pyx_INCREF(__pyx_v_self->step_name);
  __Pyx_GIVEREF(__pyx_v_self->step_name);
  PyTuple_SET_ITEM(__pyx_t_1, 7, __pyx_v_self->step_name);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self.coder, self.consumers, self.element_sampler, self.execution_context, self.opcounter, self.output_index, self.output_sampler, self.step_name)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self.coder, self.consumers, self.element_sampler, self.execution_context, self.opcounter, self.output_index, self.output_sampler, self.step_name)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         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(2, 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(2, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.coder is not None or self.consumers is not None or self.element_sampler is not None or self.execution_context is not None or self.opcounter is not None or self.output_index is not None or self.output_sampler is not None or self.step_name is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self.coder, self.consumers, self.element_sampler, self.execution_context, self.opcounter, self.output_index, self.output_sampler, self.step_name)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.coder is not None or self.consumers is not None or self.element_sampler is not None or self.execution_context is not None or self.opcounter is not None or self.output_index is not None or self.output_sampler is not None or self.step_name is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_ConsumerSet, (type(self), 0x94398cf, None), state
 */
  /*else*/ {
    __pyx_t_2 = (__pyx_v_self->coder != 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->consumers != ((PyObject*)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->element_sampler != 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 = (((PyObject *)__pyx_v_self->opcounter) != 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->output_index != 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->output_sampler != 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);
    __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.coder is not None or self.consumers is not None or self.element_sampler is not None or self.execution_context is not None or self.opcounter is not None or self.output_index is not None or self.output_sampler is not None or self.step_name is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_ConsumerSet, (type(self), 0x94398cf, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self.coder is not None or self.consumers is not None or self.element_sampler is not None or self.execution_context is not None or self.opcounter is not None or self.output_index is not None or self.output_sampler is not None or self.step_name is not None
 *     if use_setstate:
 *         return __pyx_unpickle_ConsumerSet, (type(self), 0x94398cf, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_ConsumerSet, (type(self), 0x94398cf, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_ConsumerSet); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_155424975);
    __Pyx_GIVEREF(__pyx_int_155424975);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_155424975);
    __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(2, 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.coder is not None or self.consumers is not None or self.element_sampler is not None or self.execution_context is not None or self.opcounter is not None or self.output_index is not None or self.output_sampler is not None or self.step_name is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_ConsumerSet, (type(self), 0x94398cf, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_ConsumerSet, (type(self), 0x94398cf, None), state
 *     else:
 *         return __pyx_unpickle_ConsumerSet, (type(self), 0x94398cf, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_ConsumerSet__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_ConsumerSet); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_155424975);
    __Pyx_GIVEREF(__pyx_int_155424975);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_155424975);
    __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(2, 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.worker.operations.ConsumerSet.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_ConsumerSet, (type(self), 0x94398cf, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ConsumerSet__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_19__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_19__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_19__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_19__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_6worker_10operations_11ConsumerSet_18__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_18__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__12)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[2], 16, 0, __PYX_ERR(2, 16, __pyx_L1_error));

  /* "(tree fragment)":17
 *         return __pyx_unpickle_ConsumerSet, (type(self), 0x94398cf, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_ConsumerSet__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(2, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_ConsumerSet__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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_ConsumerSet, (type(self), 0x94398cf, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ConsumerSet__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":244
 *   """ConsumerSet representing a single consumer that can only process elements
 *   (not batches)."""
 *   def __init__(self,             # <<<<<<<<<<<<<<
 *                counter_factory,
 *                step_name,
 */

/* Python wrapper */
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_counter_factory = 0;
  PyObject *__pyx_v_step_name = 0;
  PyObject *__pyx_v_output_index = 0;
  PyObject *__pyx_v_consumer = 0;
  PyObject *__pyx_v_coder = 0;
  PyObject *__pyx_v_producer_type_hints = 0;
  PyObject *__pyx_v_output_sampler = 0;
  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_counter_factory,&__pyx_n_s_step_name,&__pyx_n_s_output_index,&__pyx_n_s_consumer,&__pyx_n_s_coder,&__pyx_n_s_producer_type_hints,&__pyx_n_s_output_sampler,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_counter_factory)) != 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__", 1, 7, 7, 1); __PYX_ERR(0, 244, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_output_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, 2); __PYX_ERR(0, 244, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_consumer)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, 3); __PYX_ERR(0, 244, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_coder)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, 4); __PYX_ERR(0, 244, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_producer_type_hints)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, 5); __PYX_ERR(0, 244, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_output_sampler)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, 6); __PYX_ERR(0, 244, __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, 244, __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_counter_factory = values[0];
    __pyx_v_step_name = values[1];
    __pyx_v_output_index = values[2];
    __pyx_v_consumer = values[3];
    __pyx_v_coder = values[4];
    __pyx_v_producer_type_hints = values[5];
    __pyx_v_output_sampler = values[6];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 244, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.SingletonElementConsumerSet.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet___init__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *)__pyx_v_self), __pyx_v_counter_factory, __pyx_v_step_name, __pyx_v_output_index, __pyx_v_consumer, __pyx_v_coder, __pyx_v_producer_type_hints, __pyx_v_output_sampler);

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_step_name, PyObject *__pyx_v_output_index, PyObject *__pyx_v_consumer, PyObject *__pyx_v_coder, PyObject *__pyx_v_producer_type_hints, PyObject *__pyx_v_output_sampler) {
  int __pyx_r;
  __Pyx_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_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 244, 0, __PYX_ERR(0, 244, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":253
 *                output_sampler
 *                ):
 *     super().__init__(             # <<<<<<<<<<<<<<
 *         counter_factory,
 *         step_name,
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet));
  __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, 253, __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, 253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "apache_beam/runners/worker/operations.py":256
 *         counter_factory,
 *         step_name,
 *         output_index, [consumer],             # <<<<<<<<<<<<<<
 *         coder,
 *         producer_type_hints,
 */
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_consumer);
  __Pyx_GIVEREF(__pyx_v_consumer);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_consumer);

  /* "apache_beam/runners/worker/operations.py":260
 *         producer_type_hints,
 *         None,
 *         output_sampler)             # <<<<<<<<<<<<<<
 *     self.consumer = consumer
 * 
 */
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  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_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[9] = {__pyx_t_4, __pyx_v_counter_factory, __pyx_v_step_name, __pyx_v_output_index, __pyx_t_3, __pyx_v_coder, __pyx_v_producer_type_hints, Py_None, __pyx_v_output_sampler};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 8+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[9] = {__pyx_t_4, __pyx_v_counter_factory, __pyx_v_step_name, __pyx_v_output_index, __pyx_t_3, __pyx_v_coder, __pyx_v_producer_type_hints, Py_None, __pyx_v_output_sampler};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 8+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(8+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 253, __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_counter_factory);
    __Pyx_GIVEREF(__pyx_v_counter_factory);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_counter_factory);
    __Pyx_INCREF(__pyx_v_step_name);
    __Pyx_GIVEREF(__pyx_v_step_name);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_step_name);
    __Pyx_INCREF(__pyx_v_output_index);
    __Pyx_GIVEREF(__pyx_v_output_index);
    PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_output_index);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_5, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_coder);
    __Pyx_GIVEREF(__pyx_v_coder);
    PyTuple_SET_ITEM(__pyx_t_6, 4+__pyx_t_5, __pyx_v_coder);
    __Pyx_INCREF(__pyx_v_producer_type_hints);
    __Pyx_GIVEREF(__pyx_v_producer_type_hints);
    PyTuple_SET_ITEM(__pyx_t_6, 5+__pyx_t_5, __pyx_v_producer_type_hints);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_6, 6+__pyx_t_5, Py_None);
    __Pyx_INCREF(__pyx_v_output_sampler);
    __Pyx_GIVEREF(__pyx_v_output_sampler);
    PyTuple_SET_ITEM(__pyx_t_6, 7+__pyx_t_5, __pyx_v_output_sampler);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __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;

  /* "apache_beam/runners/worker/operations.py":261
 *         None,
 *         output_sampler)
 *     self.consumer = consumer             # <<<<<<<<<<<<<<
 * 
 *   def receive(self, windowed_value):
 */
  if (!(likely(((__pyx_v_consumer) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_consumer, __pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation))))) __PYX_ERR(0, 261, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_consumer;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->consumer);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->consumer));
  __pyx_v_self->consumer = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":244
 *   """ConsumerSet representing a single consumer that can only process elements
 *   (not batches)."""
 *   def __init__(self,             # <<<<<<<<<<<<<<
 *                counter_factory,
 *                step_name,
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.SingletonElementConsumerSet.__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/worker/operations.py":263
 *     self.consumer = consumer
 * 
 *   def receive(self, windowed_value):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     self.update_counters_start(windowed_value)
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_3receive(PyObject *__pyx_v_self, PyObject *__pyx_v_windowed_value); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_receive(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__13)
  __Pyx_RefNannySetupContext("receive", 0);
  __Pyx_TraceCall("receive", __pyx_f[0], 263, 0, __PYX_ERR(0, 263, __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, 263, __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_6worker_10operations_27SingletonElementConsumerSet_3receive)) {
        __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, 263, __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/worker/operations.py":265
 *   def receive(self, windowed_value):
 *     # type: (WindowedValue) -> None
 *     self.update_counters_start(windowed_value)             # <<<<<<<<<<<<<<
 *     self.consumer.process(windowed_value)
 *     self.update_counters_finish()
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.update_counters_start(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self), __pyx_v_windowed_value, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":266
 *     # type: (WindowedValue) -> None
 *     self.update_counters_start(windowed_value)
 *     self.consumer.process(windowed_value)             # <<<<<<<<<<<<<<
 *     self.update_counters_finish()
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self->consumer->__pyx_vtab)->process(__pyx_v_self->consumer, __pyx_v_windowed_value, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":267
 *     self.update_counters_start(windowed_value)
 *     self.consumer.process(windowed_value)
 *     self.update_counters_finish()             # <<<<<<<<<<<<<<
 * 
 *   def receive_batch(self, windowed_batch):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.update_counters_finish(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":263
 *     self.consumer = consumer
 * 
 *   def receive(self, windowed_value):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     self.update_counters_start(windowed_value)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_3receive(PyObject *__pyx_v_self, PyObject *__pyx_v_windowed_value); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_3receive = {"receive", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_3receive, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_3receive(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, 263, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_2receive(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *)__pyx_v_self), ((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_6worker_10operations_27SingletonElementConsumerSet_2receive(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__13)
  __Pyx_RefNannySetupContext("receive", 0);
  __Pyx_TraceCall("receive (wrapper)", __pyx_f[0], 263, 0, __PYX_ERR(0, 263, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_receive(__pyx_v_self, __pyx_v_windowed_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":269
 *     self.update_counters_finish()
 * 
 *   def receive_batch(self, windowed_batch):             # <<<<<<<<<<<<<<
 *     raise AssertionError(
 *         "SingletonElementConsumerSet.receive_batch is not implemented")
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_5receive_batch(PyObject *__pyx_v_self, PyObject *__pyx_v_windowed_batch); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_receive_batch(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__14)
  __Pyx_RefNannySetupContext("receive_batch", 0);
  __Pyx_TraceCall("receive_batch", __pyx_f[0], 269, 0, __PYX_ERR(0, 269, __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, 269, __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_6worker_10operations_27SingletonElementConsumerSet_5receive_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, 269, __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/worker/operations.py":270
 * 
 *   def receive_batch(self, windowed_batch):
 *     raise AssertionError(             # <<<<<<<<<<<<<<
 *         "SingletonElementConsumerSet.receive_batch is not implemented")
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AssertionError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __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, 270, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":269
 *     self.update_counters_finish()
 * 
 *   def receive_batch(self, windowed_batch):             # <<<<<<<<<<<<<<
 *     raise AssertionError(
 *         "SingletonElementConsumerSet.receive_batch is not implemented")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive_batch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_5receive_batch(PyObject *__pyx_v_self, PyObject *__pyx_v_windowed_batch); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_5receive_batch = {"receive_batch", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_5receive_batch, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_5receive_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, 269, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_4receive_batch(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *)__pyx_v_self), ((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_6worker_10operations_27SingletonElementConsumerSet_4receive_batch(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch) {
  PyObject *__pyx_r = NULL;
  __Pyx_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("receive_batch", 0);
  __Pyx_TraceCall("receive_batch (wrapper)", __pyx_f[0], 269, 0, __PYX_ERR(0, 269, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_receive_batch(__pyx_v_self, __pyx_v_windowed_batch, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive_batch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":273
 *         "SingletonElementConsumerSet.receive_batch is not implemented")
 * 
 *   def flush(self):             # <<<<<<<<<<<<<<
 *     # SingletonElementConsumerSet has no buffer to flush
 *     pass
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_7flush(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_flush(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__16)
  __Pyx_RefNannySetupContext("flush", 0);
  __Pyx_TraceCall("flush", __pyx_f[0], 273, 0, __PYX_ERR(0, 273, __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, 273, __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_6worker_10operations_27SingletonElementConsumerSet_7flush)) {
        __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, 273, __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/worker/operations.py":275
 *   def flush(self):
 *     # SingletonElementConsumerSet has no buffer to flush
 *     pass             # <<<<<<<<<<<<<<
 * 
 *   def try_split(self, fraction_of_remainder):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.SingletonElementConsumerSet.flush", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":273
 *         "SingletonElementConsumerSet.receive_batch is not implemented")
 * 
 *   def flush(self):             # <<<<<<<<<<<<<<
 *     # SingletonElementConsumerSet has no buffer to flush
 *     pass
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_7flush(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_7flush = {"flush", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_7flush, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_7flush(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_6worker_10operations_27SingletonElementConsumerSet_6flush(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_6flush(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__16)
  __Pyx_RefNannySetupContext("flush", 0);
  __Pyx_TraceCall("flush (wrapper)", __pyx_f[0], 273, 0, __PYX_ERR(0, 273, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_flush(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.SingletonElementConsumerSet.flush", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":277
 *     pass
 * 
 *   def try_split(self, fraction_of_remainder):             # <<<<<<<<<<<<<<
 *     # type: (...) -> Optional[Any]
 *     return self.consumer.try_split(fraction_of_remainder)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_9try_split(PyObject *__pyx_v_self, PyObject *__pyx_v_fraction_of_remainder); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_9try_split = {"try_split", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_9try_split, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_9try_split(PyObject *__pyx_v_self, PyObject *__pyx_v_fraction_of_remainder) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("try_split (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_8try_split(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *)__pyx_v_self), ((PyObject *)__pyx_v_fraction_of_remainder));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_8try_split(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self, PyObject *__pyx_v_fraction_of_remainder) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__17)
  __Pyx_RefNannySetupContext("try_split", 0);
  __Pyx_TraceCall("try_split", __pyx_f[0], 277, 0, __PYX_ERR(0, 277, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":279
 *   def try_split(self, fraction_of_remainder):
 *     # type: (...) -> Optional[Any]
 *     return self.consumer.try_split(fraction_of_remainder)             # <<<<<<<<<<<<<<
 * 
 *   def current_element_progress(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->consumer), __pyx_n_s_try_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 279, __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_fraction_of_remainder) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_fraction_of_remainder);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/runners/worker/operations.py":277
 *     pass
 * 
 *   def try_split(self, fraction_of_remainder):             # <<<<<<<<<<<<<<
 *     # type: (...) -> Optional[Any]
 *     return self.consumer.try_split(fraction_of_remainder)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.SingletonElementConsumerSet.try_split", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":281
 *     return self.consumer.try_split(fraction_of_remainder)
 * 
 *   def current_element_progress(self):             # <<<<<<<<<<<<<<
 *     return self.consumer.current_element_progress()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_11current_element_progress(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_11current_element_progress = {"current_element_progress", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_11current_element_progress, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_11current_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_6worker_10operations_27SingletonElementConsumerSet_10current_element_progress(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_10current_element_progress(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__18)
  __Pyx_RefNannySetupContext("current_element_progress", 0);
  __Pyx_TraceCall("current_element_progress", __pyx_f[0], 281, 0, __PYX_ERR(0, 281, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":282
 * 
 *   def current_element_progress(self):
 *     return self.consumer.current_element_progress()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->consumer), __pyx_n_s_current_element_progress); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 282, __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, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/runners/worker/operations.py":281
 *     return self.consumer.try_split(fraction_of_remainder)
 * 
 *   def current_element_progress(self):             # <<<<<<<<<<<<<<
 *     return self.consumer.current_element_progress()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.SingletonElementConsumerSet.current_element_progress", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_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_6worker_10operations_27SingletonElementConsumerSet_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_13__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_13__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_6worker_10operations_27SingletonElementConsumerSet_12__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_12__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_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__19)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error));

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self.coder, self.consumer, self.consumers, self.element_sampler, self.execution_context, self.opcounter, self.output_index, self.output_sampler, self.step_name)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(9); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.coder);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.coder);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.coder);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->consumer));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->consumer));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self->consumer));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.consumers);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.consumers);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base.consumers);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.element_sampler);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.element_sampler);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->__pyx_base.element_sampler);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.execution_context);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.execution_context);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_v_self->__pyx_base.execution_context);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.opcounter));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.opcounter));
  PyTuple_SET_ITEM(__pyx_t_1, 5, ((PyObject *)__pyx_v_self->__pyx_base.opcounter));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.output_index);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.output_index);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_v_self->__pyx_base.output_index);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.output_sampler);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.output_sampler);
  PyTuple_SET_ITEM(__pyx_t_1, 7, __pyx_v_self->__pyx_base.output_sampler);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.step_name);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.step_name);
  PyTuple_SET_ITEM(__pyx_t_1, 8, __pyx_v_self->__pyx_base.step_name);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self.coder, self.consumer, self.consumers, self.element_sampler, self.execution_context, self.opcounter, self.output_index, self.output_sampler, self.step_name)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self.coder, self.consumer, self.consumers, self.element_sampler, self.execution_context, self.opcounter, self.output_index, self.output_sampler, self.step_name)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         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(2, 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(2, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.coder is not None or self.consumer is not None or self.consumers is not None or self.element_sampler is not None or self.execution_context is not None or self.opcounter is not None or self.output_index is not None or self.output_sampler is not None or self.step_name is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self.coder, self.consumer, self.consumers, self.element_sampler, self.execution_context, self.opcounter, self.output_index, self.output_sampler, self.step_name)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.coder is not None or self.consumer is not None or self.consumers is not None or self.element_sampler is not None or self.execution_context is not None or self.opcounter is not None or self.output_index is not None or self.output_sampler is not None or self.step_name is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_SingletonElementConsumerSet, (type(self), 0x98fe48c, None), state
 */
  /*else*/ {
    __pyx_t_2 = (__pyx_v_self->__pyx_base.coder != 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->consumer) != 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->__pyx_base.consumers != ((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->__pyx_base.element_sampler != 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->__pyx_base.execution_context != 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.opcounter) != 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->__pyx_base.output_index != 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.output_sampler != 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->__pyx_base.step_name != 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.coder is not None or self.consumer is not None or self.consumers is not None or self.element_sampler is not None or self.execution_context is not None or self.opcounter is not None or self.output_index is not None or self.output_sampler is not None or self.step_name is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_SingletonElementConsumerSet, (type(self), 0x98fe48c, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self.coder is not None or self.consumer is not None or self.consumers is not None or self.element_sampler is not None or self.execution_context is not None or self.opcounter is not None or self.output_index is not None or self.output_sampler is not None or self.step_name is not None
 *     if use_setstate:
 *         return __pyx_unpickle_SingletonElementConsumerSet, (type(self), 0x98fe48c, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_SingletonElementConsumerSet, (type(self), 0x98fe48c, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_SingletonElementC); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_160425100);
    __Pyx_GIVEREF(__pyx_int_160425100);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_160425100);
    __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(2, 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.coder is not None or self.consumer is not None or self.consumers is not None or self.element_sampler is not None or self.execution_context is not None or self.opcounter is not None or self.output_index is not None or self.output_sampler is not None or self.step_name is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_SingletonElementConsumerSet, (type(self), 0x98fe48c, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_SingletonElementConsumerSet, (type(self), 0x98fe48c, None), state
 *     else:
 *         return __pyx_unpickle_SingletonElementConsumerSet, (type(self), 0x98fe48c, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_SingletonElementConsumerSet__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_SingletonElementC); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_160425100);
    __Pyx_GIVEREF(__pyx_int_160425100);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_160425100);
    __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(2, 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.worker.operations.SingletonElementConsumerSet.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_SingletonElementConsumerSet, (type(self), 0x98fe48c, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_SingletonElementConsumerSet__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_15__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_15__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_6worker_10operations_27SingletonElementConsumerSet_14__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_14__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_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("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[2], 16, 0, __PYX_ERR(2, 16, __pyx_L1_error));

  /* "(tree fragment)":17
 *         return __pyx_unpickle_SingletonElementConsumerSet, (type(self), 0x98fe48c, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_SingletonElementConsumerSet__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(2, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_SingletonElementConsumerSet__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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_SingletonElementConsumerSet, (type(self), 0x98fe48c, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_SingletonElementConsumerSet__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.SingletonElementConsumerSet.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":290
 *   MAX_BATCH_SIZE = 4096
 * 
 *   def __init__(self,             # <<<<<<<<<<<<<<
 *                counter_factory,
 *                step_name,  # type: str
 */

/* Python wrapper */
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_counter_factory = 0;
  PyObject *__pyx_v_step_name = 0;
  PyObject *__pyx_v_output_index = 0;
  PyObject *__pyx_v_coder = 0;
  PyObject *__pyx_v_producer_type_hints = 0;
  PyObject *__pyx_v_consumers = 0;
  PyObject *__pyx_v_producer_batch_converter = 0;
  PyObject *__pyx_v_output_sampler = 0;
  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_counter_factory,&__pyx_n_s_step_name,&__pyx_n_s_output_index,&__pyx_n_s_coder,&__pyx_n_s_producer_type_hints,&__pyx_n_s_consumers,&__pyx_n_s_producer_batch_converter,&__pyx_n_s_output_sampler,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_counter_factory)) != 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__", 1, 8, 8, 1); __PYX_ERR(0, 290, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_output_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 2); __PYX_ERR(0, 290, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_coder)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 3); __PYX_ERR(0, 290, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_producer_type_hints)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 4); __PYX_ERR(0, 290, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_consumers)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 5); __PYX_ERR(0, 290, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_producer_batch_converter)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 6); __PYX_ERR(0, 290, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_output_sampler)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 7); __PYX_ERR(0, 290, __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, 290, __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_counter_factory = values[0];
    __pyx_v_step_name = values[1];
    __pyx_v_output_index = values[2];
    __pyx_v_coder = values[3];
    __pyx_v_producer_type_hints = values[4];
    __pyx_v_consumers = values[5];
    __pyx_v_producer_batch_converter = values[6];
    __pyx_v_output_sampler = values[7];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 290, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.GeneralPurposeConsumerSet.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet___init__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *)__pyx_v_self), __pyx_v_counter_factory, __pyx_v_step_name, __pyx_v_output_index, __pyx_v_coder, __pyx_v_producer_type_hints, __pyx_v_consumers, __pyx_v_producer_batch_converter, __pyx_v_output_sampler);

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

/* "apache_beam/runners/worker/operations.py":319
 *     self.passthrough_batch_consumers: List[Operation] = []
 *     other_batch_consumers: DefaultDict[
 *         BatchConverter, List[Operation]] = collections.defaultdict(lambda: [])             # <<<<<<<<<<<<<<
 * 
 *     for consumer in consumers:
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_8__init___lambda(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_8__init___lambda = {"lambda", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_8__init___lambda, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_8__init___lambda(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda(__pyx_self);

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

static PyObject *__pyx_lambda_funcdef_lambda(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lambda", 0);
  __Pyx_TraceCall("lambda", __pyx_f[0], 319, 0, __PYX_ERR(0, 319, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.GeneralPurposeConsumerSet.__init__.lambda", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":290
 *   MAX_BATCH_SIZE = 4096
 * 
 *   def __init__(self,             # <<<<<<<<<<<<<<
 *                counter_factory,
 *                step_name,  # type: str
 */

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_v_self, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_step_name, PyObject *__pyx_v_output_index, PyObject *__pyx_v_coder, PyObject *__pyx_v_producer_type_hints, PyObject *__pyx_v_consumers, PyObject *__pyx_v_producer_batch_converter, PyObject *__pyx_v_output_sampler) {
  PyObject *__pyx_v_other_batch_consumers = NULL;
  PyObject *__pyx_v_consumer = NULL;
  PyObject *__pyx_v_consumer_batch_converter = NULL;
  int __pyx_r;
  __Pyx_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;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 290, 0, __PYX_ERR(0, 290, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":299
 *                producer_batch_converter,
 *                output_sampler):
 *     super().__init__(             # <<<<<<<<<<<<<<
 *         counter_factory,
 *         step_name,
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet));
  __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, 299, __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, 299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "apache_beam/runners/worker/operations.py":307
 *         producer_type_hints,
 *         producer_batch_converter,
 *         output_sampler)             # <<<<<<<<<<<<<<
 * 
 *     self.producer_batch_converter = producer_batch_converter
 */
  __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[9] = {__pyx_t_3, __pyx_v_counter_factory, __pyx_v_step_name, __pyx_v_output_index, __pyx_v_consumers, __pyx_v_coder, __pyx_v_producer_type_hints, __pyx_v_producer_batch_converter, __pyx_v_output_sampler};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 8+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 299, __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[9] = {__pyx_t_3, __pyx_v_counter_factory, __pyx_v_step_name, __pyx_v_output_index, __pyx_v_consumers, __pyx_v_coder, __pyx_v_producer_type_hints, __pyx_v_producer_batch_converter, __pyx_v_output_sampler};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 8+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 299, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(8+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 299, __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_counter_factory);
    __Pyx_GIVEREF(__pyx_v_counter_factory);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_counter_factory);
    __Pyx_INCREF(__pyx_v_step_name);
    __Pyx_GIVEREF(__pyx_v_step_name);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_step_name);
    __Pyx_INCREF(__pyx_v_output_index);
    __Pyx_GIVEREF(__pyx_v_output_index);
    PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_output_index);
    __Pyx_INCREF(__pyx_v_consumers);
    __Pyx_GIVEREF(__pyx_v_consumers);
    PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_4, __pyx_v_consumers);
    __Pyx_INCREF(__pyx_v_coder);
    __Pyx_GIVEREF(__pyx_v_coder);
    PyTuple_SET_ITEM(__pyx_t_5, 4+__pyx_t_4, __pyx_v_coder);
    __Pyx_INCREF(__pyx_v_producer_type_hints);
    __Pyx_GIVEREF(__pyx_v_producer_type_hints);
    PyTuple_SET_ITEM(__pyx_t_5, 5+__pyx_t_4, __pyx_v_producer_type_hints);
    __Pyx_INCREF(__pyx_v_producer_batch_converter);
    __Pyx_GIVEREF(__pyx_v_producer_batch_converter);
    PyTuple_SET_ITEM(__pyx_t_5, 6+__pyx_t_4, __pyx_v_producer_batch_converter);
    __Pyx_INCREF(__pyx_v_output_sampler);
    __Pyx_GIVEREF(__pyx_v_output_sampler);
    PyTuple_SET_ITEM(__pyx_t_5, 7+__pyx_t_4, __pyx_v_output_sampler);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 299, __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/worker/operations.py":309
 *         output_sampler)
 * 
 *     self.producer_batch_converter = producer_batch_converter             # <<<<<<<<<<<<<<
 * 
 *     # Partition consumers into three groups:
 */
  __Pyx_INCREF(__pyx_v_producer_batch_converter);
  __Pyx_GIVEREF(__pyx_v_producer_batch_converter);
  __Pyx_GOTREF(__pyx_v_self->producer_batch_converter);
  __Pyx_DECREF(__pyx_v_self->producer_batch_converter);
  __pyx_v_self->producer_batch_converter = __pyx_v_producer_batch_converter;

  /* "apache_beam/runners/worker/operations.py":316
 *     #   matches the output of the producer)
 *     # - consumers that will be passed converted batches
 *     self.element_consumers: List[Operation] = []             # <<<<<<<<<<<<<<
 *     self.passthrough_batch_consumers: List[Operation] = []
 *     other_batch_consumers: DefaultDict[
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->element_consumers);
  __Pyx_DECREF(__pyx_v_self->element_consumers);
  __pyx_v_self->element_consumers = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":317
 *     # - consumers that will be passed converted batches
 *     self.element_consumers: List[Operation] = []
 *     self.passthrough_batch_consumers: List[Operation] = []             # <<<<<<<<<<<<<<
 *     other_batch_consumers: DefaultDict[
 *         BatchConverter, List[Operation]] = collections.defaultdict(lambda: [])
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->passthrough_batch_consumers);
  __Pyx_DECREF(__pyx_v_self->passthrough_batch_consumers);
  __pyx_v_self->passthrough_batch_consumers = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":319
 *     self.passthrough_batch_consumers: List[Operation] = []
 *     other_batch_consumers: DefaultDict[
 *         BatchConverter, List[Operation]] = collections.defaultdict(lambda: [])             # <<<<<<<<<<<<<<
 * 
 *     for consumer in consumers:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_collections); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_defaultdict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_8__init___lambda, 0, __pyx_n_s_init___locals_lambda, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  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_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_other_batch_consumers = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":321
 *         BatchConverter, List[Operation]] = collections.defaultdict(lambda: [])
 * 
 *     for consumer in consumers:             # <<<<<<<<<<<<<<
 *       if not consumer.get_batching_preference().supports_batches:
 *         self.element_consumers.append(consumer)
 */
  if (likely(PyList_CheckExact(__pyx_v_consumers)) || PyTuple_CheckExact(__pyx_v_consumers)) {
    __pyx_t_1 = __pyx_v_consumers; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_consumers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 321, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 321, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_7)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 321, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 321, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      } else {
        if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 321, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 321, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      }
    } else {
      __pyx_t_5 = __pyx_t_7(__pyx_t_1);
      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, 321, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_XDECREF_SET(__pyx_v_consumer, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "apache_beam/runners/worker/operations.py":322
 * 
 *     for consumer in consumers:
 *       if not consumer.get_batching_preference().supports_batches:             # <<<<<<<<<<<<<<
 *         self.element_consumers.append(consumer)
 *       elif (consumer.get_input_batch_converter() ==
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_consumer, __pyx_n_s_get_batching_preference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __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_5 = (__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_5)) __PYX_ERR(0, 322, __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_supports_batches); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 322, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_9 = ((!__pyx_t_8) != 0);
    if (__pyx_t_9) {

      /* "apache_beam/runners/worker/operations.py":323
 *     for consumer in consumers:
 *       if not consumer.get_batching_preference().supports_batches:
 *         self.element_consumers.append(consumer)             # <<<<<<<<<<<<<<
 *       elif (consumer.get_input_batch_converter() ==
 *             self.producer_batch_converter):
 */
      if (unlikely(__pyx_v_self->element_consumers == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
        __PYX_ERR(0, 323, __pyx_L1_error)
      }
      __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_self->element_consumers, __pyx_v_consumer); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 323, __pyx_L1_error)

      /* "apache_beam/runners/worker/operations.py":322
 * 
 *     for consumer in consumers:
 *       if not consumer.get_batching_preference().supports_batches:             # <<<<<<<<<<<<<<
 *         self.element_consumers.append(consumer)
 *       elif (consumer.get_input_batch_converter() ==
 */
      goto __pyx_L5;
    }

    /* "apache_beam/runners/worker/operations.py":324
 *       if not consumer.get_batching_preference().supports_batches:
 *         self.element_consumers.append(consumer)
 *       elif (consumer.get_input_batch_converter() ==             # <<<<<<<<<<<<<<
 *             self.producer_batch_converter):
 *         self.passthrough_batch_consumers.append(consumer)
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_consumer, __pyx_n_s_get_input_batch_converter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 324, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(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_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 324, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "apache_beam/runners/worker/operations.py":325
 *         self.element_consumers.append(consumer)
 *       elif (consumer.get_input_batch_converter() ==
 *             self.producer_batch_converter):             # <<<<<<<<<<<<<<
 *         self.passthrough_batch_consumers.append(consumer)
 *       else:
 */
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_v_self->producer_batch_converter, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 324, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/runners/worker/operations.py":324
 *       if not consumer.get_batching_preference().supports_batches:
 *         self.element_consumers.append(consumer)
 *       elif (consumer.get_input_batch_converter() ==             # <<<<<<<<<<<<<<
 *             self.producer_batch_converter):
 *         self.passthrough_batch_consumers.append(consumer)
 */
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 324, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_9) {

      /* "apache_beam/runners/worker/operations.py":326
 *       elif (consumer.get_input_batch_converter() ==
 *             self.producer_batch_converter):
 *         self.passthrough_batch_consumers.append(consumer)             # <<<<<<<<<<<<<<
 *       else:
 *         # Batch consumer with a mismatched batch type
 */
      if (unlikely(__pyx_v_self->passthrough_batch_consumers == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
        __PYX_ERR(0, 326, __pyx_L1_error)
      }
      __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_self->passthrough_batch_consumers, __pyx_v_consumer); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 326, __pyx_L1_error)

      /* "apache_beam/runners/worker/operations.py":324
 *       if not consumer.get_batching_preference().supports_batches:
 *         self.element_consumers.append(consumer)
 *       elif (consumer.get_input_batch_converter() ==             # <<<<<<<<<<<<<<
 *             self.producer_batch_converter):
 *         self.passthrough_batch_consumers.append(consumer)
 */
      goto __pyx_L5;
    }

    /* "apache_beam/runners/worker/operations.py":329
 *       else:
 *         # Batch consumer with a mismatched batch type
 *         if consumer.get_batching_preference().supports_elements:             # <<<<<<<<<<<<<<
 *           # Pass it elements if we can
 *           self.element_consumers.append(consumer)
 */
    /*else*/ {
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_consumer, __pyx_n_s_get_batching_preference); 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_5 = (__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_5)) __PYX_ERR(0, 329, __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_supports_elements); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 329, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 329, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_9) {

        /* "apache_beam/runners/worker/operations.py":331
 *         if consumer.get_batching_preference().supports_elements:
 *           # Pass it elements if we can
 *           self.element_consumers.append(consumer)             # <<<<<<<<<<<<<<
 *         else:
 *           # As a last resort, explode and rebatch
 */
        if (unlikely(__pyx_v_self->element_consumers == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
          __PYX_ERR(0, 331, __pyx_L1_error)
        }
        __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_self->element_consumers, __pyx_v_consumer); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 331, __pyx_L1_error)

        /* "apache_beam/runners/worker/operations.py":329
 *       else:
 *         # Batch consumer with a mismatched batch type
 *         if consumer.get_batching_preference().supports_elements:             # <<<<<<<<<<<<<<
 *           # Pass it elements if we can
 *           self.element_consumers.append(consumer)
 */
        goto __pyx_L6;
      }

      /* "apache_beam/runners/worker/operations.py":334
 *         else:
 *           # As a last resort, explode and rebatch
 *           consumer_batch_converter = consumer.get_input_batch_converter()             # <<<<<<<<<<<<<<
 *           # This consumer supports batches, it must have a batch converter
 *           assert consumer_batch_converter is not None
 */
      /*else*/ {
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_consumer, __pyx_n_s_get_input_batch_converter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 334, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_3 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(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_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 334, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF_SET(__pyx_v_consumer_batch_converter, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "apache_beam/runners/worker/operations.py":336
 *           consumer_batch_converter = consumer.get_input_batch_converter()
 *           # This consumer supports batches, it must have a batch converter
 *           assert consumer_batch_converter is not None             # <<<<<<<<<<<<<<
 *           other_batch_consumers[consumer_batch_converter].append(consumer)
 * 
 */
        #ifndef CYTHON_WITHOUT_ASSERTIONS
        if (unlikely(__pyx_assertions_enabled())) {
          __pyx_t_9 = (__pyx_v_consumer_batch_converter != Py_None);
          if (unlikely(!(__pyx_t_9 != 0))) {
            PyErr_SetNone(PyExc_AssertionError);
            __PYX_ERR(0, 336, __pyx_L1_error)
          }
        }
        #endif

        /* "apache_beam/runners/worker/operations.py":337
 *           # This consumer supports batches, it must have a batch converter
 *           assert consumer_batch_converter is not None
 *           other_batch_consumers[consumer_batch_converter].append(consumer)             # <<<<<<<<<<<<<<
 * 
 *     self.other_batch_consumers: Dict[BatchConverter, List[Operation]] = dict(
 */
        __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_other_batch_consumers, __pyx_v_consumer_batch_converter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 337, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_10 = __Pyx_PyObject_Append(__pyx_t_2, __pyx_v_consumer); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 337, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __pyx_L6:;
    }
    __pyx_L5:;

    /* "apache_beam/runners/worker/operations.py":321
 *         BatchConverter, List[Operation]] = collections.defaultdict(lambda: [])
 * 
 *     for consumer in consumers:             # <<<<<<<<<<<<<<
 *       if not consumer.get_batching_preference().supports_batches:
 *         self.element_consumers.append(consumer)
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":339
 *           other_batch_consumers[consumer_batch_converter].append(consumer)
 * 
 *     self.other_batch_consumers: Dict[BatchConverter, List[Operation]] = dict(             # <<<<<<<<<<<<<<
 *         other_batch_consumers)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_v_other_batch_consumers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->other_batch_consumers);
  __Pyx_DECREF(__pyx_v_self->other_batch_consumers);
  __pyx_v_self->other_batch_consumers = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":343
 * 
 *     self.has_batch_consumers = (
 *         self.passthrough_batch_consumers or self.other_batch_consumers)             # <<<<<<<<<<<<<<
 *     self._batched_elements: List[Any] = []
 * 
 */
  __pyx_t_8 = (__pyx_v_self->passthrough_batch_consumers != Py_None)&&(PyList_GET_SIZE(__pyx_v_self->passthrough_batch_consumers) != 0);
  if (!__pyx_t_8) {
  } else {
    __pyx_t_9 = __pyx_t_8;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_self->other_batch_consumers); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 343, __pyx_L1_error)
  __pyx_t_9 = __pyx_t_8;
  __pyx_L7_bool_binop_done:;

  /* "apache_beam/runners/worker/operations.py":342
 *         other_batch_consumers)
 * 
 *     self.has_batch_consumers = (             # <<<<<<<<<<<<<<
 *         self.passthrough_batch_consumers or self.other_batch_consumers)
 *     self._batched_elements: List[Any] = []
 */
  __pyx_v_self->has_batch_consumers = __pyx_t_9;

  /* "apache_beam/runners/worker/operations.py":344
 *     self.has_batch_consumers = (
 *         self.passthrough_batch_consumers or self.other_batch_consumers)
 *     self._batched_elements: List[Any] = []             # <<<<<<<<<<<<<<
 * 
 *   def receive(self, windowed_value):
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_batched_elements);
  __Pyx_DECREF(__pyx_v_self->_batched_elements);
  __pyx_v_self->_batched_elements = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":290
 *   MAX_BATCH_SIZE = 4096
 * 
 *   def __init__(self,             # <<<<<<<<<<<<<<
 *                counter_factory,
 *                step_name,  # type: str
 */

  /* 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.worker.operations.GeneralPurposeConsumerSet.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_other_batch_consumers);
  __Pyx_XDECREF(__pyx_v_consumer);
  __Pyx_XDECREF(__pyx_v_consumer_batch_converter);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":346
 *     self._batched_elements: List[Any] = []
 * 
 *   def receive(self, windowed_value):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 * 
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_3receive(PyObject *__pyx_v_self, PyObject *__pyx_v_windowed_value); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_receive(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_consumer = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  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__21)
  __Pyx_RefNannySetupContext("receive", 0);
  __Pyx_TraceCall("receive", __pyx_f[0], 346, 0, __PYX_ERR(0, 346, __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, 346, __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_6worker_10operations_25GeneralPurposeConsumerSet_3receive)) {
        __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, 346, __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/worker/operations.py":349
 *     # type: (WindowedValue) -> None
 * 
 *     self.update_counters_start(windowed_value)             # <<<<<<<<<<<<<<
 * 
 *     for consumer in self.element_consumers:
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.update_counters_start(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self), __pyx_v_windowed_value, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":351
 *     self.update_counters_start(windowed_value)
 * 
 *     for consumer in self.element_consumers:             # <<<<<<<<<<<<<<
 *       _cast_to_operation(consumer).process(windowed_value)
 * 
 */
  if (unlikely(__pyx_v_self->element_consumers == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 351, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_v_self->element_consumers; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
  for (;;) {
    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, 351, __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, 351, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_consumer, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "apache_beam/runners/worker/operations.py":352
 * 
 *     for consumer in self.element_consumers:
 *       _cast_to_operation(consumer).process(windowed_value)             # <<<<<<<<<<<<<<
 * 
 *     # TODO: Do this branching when contstructing ConsumerSet
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_cast_to_operation); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 352, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(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_v_consumer) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_consumer);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 352, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_process); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 352, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    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_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, ((PyObject *)__pyx_v_windowed_value)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_windowed_value));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 352, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/runners/worker/operations.py":351
 *     self.update_counters_start(windowed_value)
 * 
 *     for consumer in self.element_consumers:             # <<<<<<<<<<<<<<
 *       _cast_to_operation(consumer).process(windowed_value)
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":355
 * 
 *     # TODO: Do this branching when contstructing ConsumerSet
 *     if self.has_batch_consumers:             # <<<<<<<<<<<<<<
 *       self._batched_elements.append(windowed_value)
 *       if len(self._batched_elements) >= self.MAX_BATCH_SIZE:
 */
  __pyx_t_7 = (__pyx_v_self->has_batch_consumers != 0);
  if (__pyx_t_7) {

    /* "apache_beam/runners/worker/operations.py":356
 *     # TODO: Do this branching when contstructing ConsumerSet
 *     if self.has_batch_consumers:
 *       self._batched_elements.append(windowed_value)             # <<<<<<<<<<<<<<
 *       if len(self._batched_elements) >= self.MAX_BATCH_SIZE:
 *         self.flush()
 */
    if (unlikely(__pyx_v_self->_batched_elements == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
      __PYX_ERR(0, 356, __pyx_L1_error)
    }
    __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_self->_batched_elements, ((PyObject *)__pyx_v_windowed_value)); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 356, __pyx_L1_error)

    /* "apache_beam/runners/worker/operations.py":357
 *     if self.has_batch_consumers:
 *       self._batched_elements.append(windowed_value)
 *       if len(self._batched_elements) >= self.MAX_BATCH_SIZE:             # <<<<<<<<<<<<<<
 *         self.flush()
 * 
 */
    __pyx_t_1 = __pyx_v_self->_batched_elements;
    __Pyx_INCREF(__pyx_t_1);
    if (unlikely(__pyx_t_1 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      __PYX_ERR(0, 357, __pyx_L1_error)
    }
    __pyx_t_5 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 357, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 357, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_MAX_BATCH_SIZE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 357, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 357, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 357, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_7) {

      /* "apache_beam/runners/worker/operations.py":358
 *       self._batched_elements.append(windowed_value)
 *       if len(self._batched_elements) >= self.MAX_BATCH_SIZE:
 *         self.flush()             # <<<<<<<<<<<<<<
 * 
 *     # TODO(https://github.com/apache/beam/issues/21655): Properly estimate
 */
      __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.flush(((struct __pyx_obj_11apache_beam_7runners_6common_Receiver *)__pyx_v_self), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 358, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "apache_beam/runners/worker/operations.py":357
 *     if self.has_batch_consumers:
 *       self._batched_elements.append(windowed_value)
 *       if len(self._batched_elements) >= self.MAX_BATCH_SIZE:             # <<<<<<<<<<<<<<
 *         self.flush()
 * 
 */
    }

    /* "apache_beam/runners/worker/operations.py":355
 * 
 *     # TODO: Do this branching when contstructing ConsumerSet
 *     if self.has_batch_consumers:             # <<<<<<<<<<<<<<
 *       self._batched_elements.append(windowed_value)
 *       if len(self._batched_elements) >= self.MAX_BATCH_SIZE:
 */
  }

  /* "apache_beam/runners/worker/operations.py":362
 *     # TODO(https://github.com/apache/beam/issues/21655): Properly estimate
 *     # sizes in the batch-consumer only case, this undercounts large iterables
 *     self.update_counters_finish()             # <<<<<<<<<<<<<<
 * 
 *   def receive_batch(self, windowed_batch):
 */
  __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.update_counters_finish(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "apache_beam/runners/worker/operations.py":346
 *     self._batched_elements: List[Any] = []
 * 
 *   def receive(self, windowed_value):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.GeneralPurposeConsumerSet.receive", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_consumer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_3receive(PyObject *__pyx_v_self, PyObject *__pyx_v_windowed_value); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_3receive = {"receive", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_3receive, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_3receive(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, 346, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_2receive(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *)__pyx_v_self), ((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_6worker_10operations_25GeneralPurposeConsumerSet_2receive(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__21)
  __Pyx_RefNannySetupContext("receive", 0);
  __Pyx_TraceCall("receive (wrapper)", __pyx_f[0], 346, 0, __PYX_ERR(0, 346, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_receive(__pyx_v_self, __pyx_v_windowed_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.GeneralPurposeConsumerSet.receive", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":364
 *     self.update_counters_finish()
 * 
 *   def receive_batch(self, windowed_batch):             # <<<<<<<<<<<<<<
 *     if self.element_consumers:
 *       for wv in windowed_batch.as_windowed_values(
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_5receive_batch(PyObject *__pyx_v_self, PyObject *__pyx_v_windowed_batch); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_receive_batch(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_wv = NULL;
  PyObject *__pyx_v_consumer = NULL;
  PyObject *__pyx_v_consumer_batch_converter = NULL;
  PyObject *__pyx_v_consumers = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_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;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  Py_ssize_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  int __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_UCS4 __pyx_t_15;
  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__22)
  __Pyx_RefNannySetupContext("receive_batch", 0);
  __Pyx_TraceCall("receive_batch", __pyx_f[0], 364, 0, __PYX_ERR(0, 364, __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, 364, __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_6worker_10operations_25GeneralPurposeConsumerSet_5receive_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, 364, __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/worker/operations.py":365
 * 
 *   def receive_batch(self, windowed_batch):
 *     if self.element_consumers:             # <<<<<<<<<<<<<<
 *       for wv in windowed_batch.as_windowed_values(
 *           self.producer_batch_converter.explode_batch):
 */
  __pyx_t_5 = (__pyx_v_self->element_consumers != Py_None)&&(PyList_GET_SIZE(__pyx_v_self->element_consumers) != 0);
  if (__pyx_t_5) {

    /* "apache_beam/runners/worker/operations.py":366
 *   def receive_batch(self, windowed_batch):
 *     if self.element_consumers:
 *       for wv in windowed_batch.as_windowed_values(             # <<<<<<<<<<<<<<
 *           self.producer_batch_converter.explode_batch):
 *         for consumer in self.element_consumers:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_windowed_batch), __pyx_n_s_as_windowed_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 366, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "apache_beam/runners/worker/operations.py":367
 *     if self.element_consumers:
 *       for wv in windowed_batch.as_windowed_values(
 *           self.producer_batch_converter.explode_batch):             # <<<<<<<<<<<<<<
 *         for consumer in self.element_consumers:
 *           _cast_to_operation(consumer).process(wv)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->producer_batch_converter, __pyx_n_s_explode_batch); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 367, __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, 366, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/runners/worker/operations.py":366
 *   def receive_batch(self, windowed_batch):
 *     if self.element_consumers:
 *       for wv in windowed_batch.as_windowed_values(             # <<<<<<<<<<<<<<
 *           self.producer_batch_converter.explode_batch):
 *         for consumer in self.element_consumers:
 */
    if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
      __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 366, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 366, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    for (;;) {
      if (likely(!__pyx_t_7)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_6 >= 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_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 366, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 366, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          if (__pyx_t_6 >= 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_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 366, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 366, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_7(__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, 366, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_v_wv, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "apache_beam/runners/worker/operations.py":368
 *       for wv in windowed_batch.as_windowed_values(
 *           self.producer_batch_converter.explode_batch):
 *         for consumer in self.element_consumers:             # <<<<<<<<<<<<<<
 *           _cast_to_operation(consumer).process(wv)
 * 
 */
      if (unlikely(__pyx_v_self->element_consumers == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
        __PYX_ERR(0, 368, __pyx_L1_error)
      }
      __pyx_t_1 = __pyx_v_self->element_consumers; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0;
      for (;;) {
        if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 368, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 368, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_XDECREF_SET(__pyx_v_consumer, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "apache_beam/runners/worker/operations.py":369
 *           self.producer_batch_converter.explode_batch):
 *         for consumer in self.element_consumers:
 *           _cast_to_operation(consumer).process(wv)             # <<<<<<<<<<<<<<
 * 
 *     for consumer in self.passthrough_batch_consumers:
 */
        __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_cast_to_operation); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 369, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_10 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(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_4 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_v_consumer) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_consumer);
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 369, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_process); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 369, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
          }
        }
        __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_4, __pyx_v_wv) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_wv);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 369, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "apache_beam/runners/worker/operations.py":368
 *       for wv in windowed_batch.as_windowed_values(
 *           self.producer_batch_converter.explode_batch):
 *         for consumer in self.element_consumers:             # <<<<<<<<<<<<<<
 *           _cast_to_operation(consumer).process(wv)
 * 
 */
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "apache_beam/runners/worker/operations.py":366
 *   def receive_batch(self, windowed_batch):
 *     if self.element_consumers:
 *       for wv in windowed_batch.as_windowed_values(             # <<<<<<<<<<<<<<
 *           self.producer_batch_converter.explode_batch):
 *         for consumer in self.element_consumers:
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/runners/worker/operations.py":365
 * 
 *   def receive_batch(self, windowed_batch):
 *     if self.element_consumers:             # <<<<<<<<<<<<<<
 *       for wv in windowed_batch.as_windowed_values(
 *           self.producer_batch_converter.explode_batch):
 */
  }

  /* "apache_beam/runners/worker/operations.py":371
 *           _cast_to_operation(consumer).process(wv)
 * 
 *     for consumer in self.passthrough_batch_consumers:             # <<<<<<<<<<<<<<
 *       _cast_to_operation(consumer).process_batch(windowed_batch)
 * 
 */
  if (unlikely(__pyx_v_self->passthrough_batch_consumers == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 371, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_v_self->passthrough_batch_consumers; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0;
  for (;;) {
    if (__pyx_t_6 >= 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_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 371, __pyx_L1_error)
    #else
    __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_consumer, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "apache_beam/runners/worker/operations.py":372
 * 
 *     for consumer in self.passthrough_batch_consumers:
 *       _cast_to_operation(consumer).process_batch(windowed_batch)             # <<<<<<<<<<<<<<
 * 
 *     for (consumer_batch_converter,
 */
    __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_cast_to_operation); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
      }
    }
    __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_4, __pyx_v_consumer) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_consumer);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_process_batch); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_3, ((PyObject *)__pyx_v_windowed_batch)) : __Pyx_PyObject_CallOneArg(__pyx_t_9, ((PyObject *)__pyx_v_windowed_batch));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/runners/worker/operations.py":371
 *           _cast_to_operation(consumer).process(wv)
 * 
 *     for consumer in self.passthrough_batch_consumers:             # <<<<<<<<<<<<<<
 *       _cast_to_operation(consumer).process_batch(windowed_batch)
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":374
 *       _cast_to_operation(consumer).process_batch(windowed_batch)
 * 
 *     for (consumer_batch_converter,             # <<<<<<<<<<<<<<
 *          consumers) in self.other_batch_consumers.items():
 *       # Explode and rebatch into the new batch type (ouch!)
 */
  __pyx_t_6 = 0;

  /* "apache_beam/runners/worker/operations.py":375
 * 
 *     for (consumer_batch_converter,
 *          consumers) in self.other_batch_consumers.items():             # <<<<<<<<<<<<<<
 *       # Explode and rebatch into the new batch type (ouch!)
 *       # TODO: Register direct conversions for equivalent batch types
 */
  if (unlikely(__pyx_v_self->other_batch_consumers == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
    __PYX_ERR(0, 375, __pyx_L1_error)
  }

  /* "apache_beam/runners/worker/operations.py":374
 *       _cast_to_operation(consumer).process_batch(windowed_batch)
 * 
 *     for (consumer_batch_converter,             # <<<<<<<<<<<<<<
 *          consumers) in self.other_batch_consumers.items():
 *       # Explode and rebatch into the new batch type (ouch!)
 */
  __pyx_t_1 = __Pyx_dict_iterator(__pyx_v_self->other_batch_consumers, 1, __pyx_n_s_items, (&__pyx_t_8), (&__pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __pyx_t_2 = __pyx_t_1;
  __pyx_t_1 = 0;
  while (1) {

    /* "apache_beam/runners/worker/operations.py":375
 * 
 *     for (consumer_batch_converter,
 *          consumers) in self.other_batch_consumers.items():             # <<<<<<<<<<<<<<
 *       # Explode and rebatch into the new batch type (ouch!)
 *       # TODO: Register direct conversions for equivalent batch types
 */
    __pyx_t_12 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_8, &__pyx_t_6, &__pyx_t_1, &__pyx_t_9, NULL, __pyx_t_11);
    if (unlikely(__pyx_t_12 == 0)) break;
    if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 375, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_t_9);

    /* "apache_beam/runners/worker/operations.py":374
 *       _cast_to_operation(consumer).process_batch(windowed_batch)
 * 
 *     for (consumer_batch_converter,             # <<<<<<<<<<<<<<
 *          consumers) in self.other_batch_consumers.items():
 *       # Explode and rebatch into the new batch type (ouch!)
 */
    __Pyx_XDECREF_SET(__pyx_v_consumer_batch_converter, __pyx_t_1);
    __pyx_t_1 = 0;
    __Pyx_XDECREF_SET(__pyx_v_consumers, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "apache_beam/runners/worker/operations.py":379
 *       # TODO: Register direct conversions for equivalent batch types
 * 
 *       for consumer in consumers:             # <<<<<<<<<<<<<<
 *         warnings.warn(
 *             f"Input to operation {consumer} must be rebatched from type "
 */
    if (likely(PyList_CheckExact(__pyx_v_consumers)) || PyTuple_CheckExact(__pyx_v_consumers)) {
      __pyx_t_9 = __pyx_v_consumers; __Pyx_INCREF(__pyx_t_9); __pyx_t_13 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_13 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_v_consumers); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 379, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_7 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 379, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_7)) {
        if (likely(PyList_CheckExact(__pyx_t_9))) {
          if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_9)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_13); __Pyx_INCREF(__pyx_t_1); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 379, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_9, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 379, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_13); __Pyx_INCREF(__pyx_t_1); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 379, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_9, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 379, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_7(__pyx_t_9);
        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, 379, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_v_consumer, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "apache_beam/runners/worker/operations.py":380
 * 
 *       for consumer in consumers:
 *         warnings.warn(             # <<<<<<<<<<<<<<
 *             f"Input to operation {consumer} must be rebatched from type "
 *             f"{self.producer_batch_converter.batch_type!r} to "
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_warnings); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 380, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_warn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 380, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "apache_beam/runners/worker/operations.py":381
 *       for consumer in consumers:
 *         warnings.warn(
 *             f"Input to operation {consumer} must be rebatched from type "             # <<<<<<<<<<<<<<
 *             f"{self.producer_batch_converter.batch_type!r} to "
 *             f"{consumer_batch_converter.batch_type!r}.\n"
 */
      __pyx_t_3 = PyTuple_New(7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 381, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_14 = 0;
      __pyx_t_15 = 127;
      __Pyx_INCREF(__pyx_kp_u_Input_to_operation);
      __pyx_t_14 += 19;
      __Pyx_GIVEREF(__pyx_kp_u_Input_to_operation);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Input_to_operation);
      __pyx_t_10 = __Pyx_PyObject_FormatSimple(__pyx_v_consumer, __pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 381, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) : __pyx_t_15;
      __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_10);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_10);
      __pyx_t_10 = 0;
      __Pyx_INCREF(__pyx_kp_u_must_be_rebatched_from_type);
      __pyx_t_14 += 29;
      __Pyx_GIVEREF(__pyx_kp_u_must_be_rebatched_from_type);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_must_be_rebatched_from_type);

      /* "apache_beam/runners/worker/operations.py":382
 *         warnings.warn(
 *             f"Input to operation {consumer} must be rebatched from type "
 *             f"{self.producer_batch_converter.batch_type!r} to "             # <<<<<<<<<<<<<<
 *             f"{consumer_batch_converter.batch_type!r}.\n"
 *             "This is very inefficient, consider re-structuring your pipeline "
 */
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->producer_batch_converter, __pyx_n_s_batch_type); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 382, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_16 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_10), __pyx_empty_unicode); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 382, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 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_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16);
      __Pyx_GIVEREF(__pyx_t_16);
      PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_16);
      __pyx_t_16 = 0;
      __Pyx_INCREF(__pyx_kp_u_to);
      __pyx_t_14 += 4;
      __Pyx_GIVEREF(__pyx_kp_u_to);
      PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_kp_u_to);

      /* "apache_beam/runners/worker/operations.py":383
 *             f"Input to operation {consumer} must be rebatched from type "
 *             f"{self.producer_batch_converter.batch_type!r} to "
 *             f"{consumer_batch_converter.batch_type!r}.\n"             # <<<<<<<<<<<<<<
 *             "This is very inefficient, consider re-structuring your pipeline "
 *             "or adding a DoFn to directly convert between these types.",
 */
      __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_consumer_batch_converter, __pyx_n_s_batch_type); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 383, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __pyx_t_10 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_16), __pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 383, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) : __pyx_t_15;
      __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_10);
      PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_t_10);
      __pyx_t_10 = 0;
      __Pyx_INCREF(__pyx_kp_u_This_is_very_inefficient_consid);
      __pyx_t_14 += 123;
      __Pyx_GIVEREF(__pyx_kp_u_This_is_very_inefficient_consid);
      PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_kp_u_This_is_very_inefficient_consid);

      /* "apache_beam/runners/worker/operations.py":381
 *       for consumer in consumers:
 *         warnings.warn(
 *             f"Input to operation {consumer} must be rebatched from type "             # <<<<<<<<<<<<<<
 *             f"{self.producer_batch_converter.batch_type!r} to "
 *             f"{consumer_batch_converter.batch_type!r}.\n"
 */
      __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_3, 7, __pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 381, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "apache_beam/runners/worker/operations.py":386
 *             "This is very inefficient, consider re-structuring your pipeline "
 *             "or adding a DoFn to directly convert between these types.",
 *             InefficientExecutionWarning)             # <<<<<<<<<<<<<<
 *         _cast_to_operation(consumer).process_batch(
 *             windowed_batch.with_values(
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_InefficientExecutionWarning); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 386, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_16 = NULL;
      __pyx_t_12 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_16)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_16);
          __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[3] = {__pyx_t_16, __pyx_t_10, __pyx_t_3};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 380, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_t_10, __pyx_t_3};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 380, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else
      #endif
      {
        __pyx_t_17 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 380, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_17);
        if (__pyx_t_16) {
          __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_16); __pyx_t_16 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_17, 0+__pyx_t_12, __pyx_t_10);
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_17, 1+__pyx_t_12, __pyx_t_3);
        __pyx_t_10 = 0;
        __pyx_t_3 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 380, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "apache_beam/runners/worker/operations.py":387
 *             "or adding a DoFn to directly convert between these types.",
 *             InefficientExecutionWarning)
 *         _cast_to_operation(consumer).process_batch(             # <<<<<<<<<<<<<<
 *             windowed_batch.with_values(
 *                 consumer_batch_converter.produce_batch(
 */
      __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_cast_to_operation); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 387, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __pyx_t_3 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_17))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_17);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_17, function);
        }
      }
      __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_17, __pyx_t_3, __pyx_v_consumer) : __Pyx_PyObject_CallOneArg(__pyx_t_17, __pyx_v_consumer);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 387, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_process_batch); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 387, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "apache_beam/runners/worker/operations.py":389
 *         _cast_to_operation(consumer).process_batch(
 *             windowed_batch.with_values(
 *                 consumer_batch_converter.produce_batch(             # <<<<<<<<<<<<<<
 *                     self.producer_batch_converter.explode_batch(
 *                         windowed_batch.values))))
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_consumer_batch_converter, __pyx_n_s_produce_batch); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 389, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);

      /* "apache_beam/runners/worker/operations.py":390
 *             windowed_batch.with_values(
 *                 consumer_batch_converter.produce_batch(
 *                     self.producer_batch_converter.explode_batch(             # <<<<<<<<<<<<<<
 *                         windowed_batch.values))))
 * 
 */
      __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->producer_batch_converter, __pyx_n_s_explode_batch); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 390, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);

      /* "apache_beam/runners/worker/operations.py":391
 *                 consumer_batch_converter.produce_batch(
 *                     self.producer_batch_converter.explode_batch(
 *                         windowed_batch.values))))             # <<<<<<<<<<<<<<
 * 
 *     self.update_counters_batch(windowed_batch)
 */
      __pyx_t_18 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_windowed_batch), __pyx_n_s_values); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 391, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      __pyx_t_19 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_16))) {
        __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_16);
        if (likely(__pyx_t_19)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
          __Pyx_INCREF(__pyx_t_19);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_16, function);
        }
      }
      __pyx_t_10 = (__pyx_t_19) ? __Pyx_PyObject_Call2Args(__pyx_t_16, __pyx_t_19, __pyx_t_18) : __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_18);
      __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 390, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __pyx_t_16 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_16)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_16);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      __pyx_t_4 = (__pyx_t_16) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_16, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_10);
      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 389, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "apache_beam/runners/worker/operations.py":388
 *             InefficientExecutionWarning)
 *         _cast_to_operation(consumer).process_batch(
 *             windowed_batch.with_values(             # <<<<<<<<<<<<<<
 *                 consumer_batch_converter.produce_batch(
 *                     self.producer_batch_converter.explode_batch(
 */
      __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedBatch *)__pyx_v_windowed_batch->__pyx_vtab)->with_values(__pyx_v_windowed_batch, __pyx_t_4, 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 388, __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_17))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_17);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_17, function);
        }
      }
      __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_17, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_17, __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, 387, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "apache_beam/runners/worker/operations.py":379
 *       # TODO: Register direct conversions for equivalent batch types
 * 
 *       for consumer in consumers:             # <<<<<<<<<<<<<<
 *         warnings.warn(
 *             f"Input to operation {consumer} must be rebatched from type "
 */
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":393
 *                         windowed_batch.values))))
 * 
 *     self.update_counters_batch(windowed_batch)             # <<<<<<<<<<<<<<
 * 
 *   def flush(self):
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.update_counters_batch(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self), __pyx_v_windowed_batch, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":364
 *     self.update_counters_finish()
 * 
 *   def receive_batch(self, windowed_batch):             # <<<<<<<<<<<<<<
 *     if self.element_consumers:
 *       for wv in windowed_batch.as_windowed_values(
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.GeneralPurposeConsumerSet.receive_batch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_wv);
  __Pyx_XDECREF(__pyx_v_consumer);
  __Pyx_XDECREF(__pyx_v_consumer_batch_converter);
  __Pyx_XDECREF(__pyx_v_consumers);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_5receive_batch(PyObject *__pyx_v_self, PyObject *__pyx_v_windowed_batch); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_5receive_batch = {"receive_batch", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_5receive_batch, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_5receive_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, 364, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_4receive_batch(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *)__pyx_v_self), ((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_6worker_10operations_25GeneralPurposeConsumerSet_4receive_batch(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__22)
  __Pyx_RefNannySetupContext("receive_batch", 0);
  __Pyx_TraceCall("receive_batch (wrapper)", __pyx_f[0], 364, 0, __PYX_ERR(0, 364, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_receive_batch(__pyx_v_self, __pyx_v_windowed_batch, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.GeneralPurposeConsumerSet.receive_batch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":395
 *     self.update_counters_batch(windowed_batch)
 * 
 *   def flush(self):             # <<<<<<<<<<<<<<
 *     if not self.has_batch_consumers or not self._batched_elements:
 *       return
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_7flush(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_flush(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_batch_converter = NULL;
  PyObject *__pyx_v_consumers = NULL;
  PyObject *__pyx_v_windowed_batch = NULL;
  PyObject *__pyx_v_consumer = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_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;
  int __pyx_t_6;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  Py_ssize_t __pyx_t_13;
  PyObject *(*__pyx_t_14)(PyObject *);
  Py_ssize_t __pyx_t_15;
  PyObject *(*__pyx_t_16)(PyObject *);
  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__23)
  __Pyx_RefNannySetupContext("flush", 0);
  __Pyx_TraceCall("flush", __pyx_f[0], 395, 0, __PYX_ERR(0, 395, __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, 395, __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_6worker_10operations_25GeneralPurposeConsumerSet_7flush)) {
        __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, 395, __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/worker/operations.py":396
 * 
 *   def flush(self):
 *     if not self.has_batch_consumers or not self._batched_elements:             # <<<<<<<<<<<<<<
 *       return
 * 
 */
  __pyx_t_6 = ((!(__pyx_v_self->has_batch_consumers != 0)) != 0);
  if (!__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = (__pyx_v_self->_batched_elements != Py_None)&&(PyList_GET_SIZE(__pyx_v_self->_batched_elements) != 0);
  __pyx_t_7 = ((!__pyx_t_6) != 0);
  __pyx_t_5 = __pyx_t_7;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {

    /* "apache_beam/runners/worker/operations.py":397
 *   def flush(self):
 *     if not self.has_batch_consumers or not self._batched_elements:
 *       return             # <<<<<<<<<<<<<<
 * 
 *     for batch_converter, consumers in self.other_batch_consumers.items():
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "apache_beam/runners/worker/operations.py":396
 * 
 *   def flush(self):
 *     if not self.has_batch_consumers or not self._batched_elements:             # <<<<<<<<<<<<<<
 *       return
 * 
 */
  }

  /* "apache_beam/runners/worker/operations.py":399
 *       return
 * 
 *     for batch_converter, consumers in self.other_batch_consumers.items():             # <<<<<<<<<<<<<<
 *       for windowed_batch in WindowedBatch.from_windowed_values(
 *           self._batched_elements, produce_fn=batch_converter.produce_batch):
 */
  __pyx_t_8 = 0;
  if (unlikely(__pyx_v_self->other_batch_consumers == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
    __PYX_ERR(0, 399, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_self->other_batch_consumers, 1, __pyx_n_s_items, (&__pyx_t_9), (&__pyx_t_10)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_1);
  __pyx_t_1 = __pyx_t_2;
  __pyx_t_2 = 0;
  while (1) {
    __pyx_t_11 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_9, &__pyx_t_8, &__pyx_t_2, &__pyx_t_3, NULL, __pyx_t_10);
    if (unlikely(__pyx_t_11 == 0)) break;
    if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 399, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_batch_converter, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_consumers, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "apache_beam/runners/worker/operations.py":400
 * 
 *     for batch_converter, consumers in self.other_batch_consumers.items():
 *       for windowed_batch in WindowedBatch.from_windowed_values(             # <<<<<<<<<<<<<<
 *           self._batched_elements, produce_fn=batch_converter.produce_batch):
 *         for consumer in consumers:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch), __pyx_n_s_from_windowed_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 400, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);

    /* "apache_beam/runners/worker/operations.py":401
 *     for batch_converter, consumers in self.other_batch_consumers.items():
 *       for windowed_batch in WindowedBatch.from_windowed_values(
 *           self._batched_elements, produce_fn=batch_converter.produce_batch):             # <<<<<<<<<<<<<<
 *         for consumer in consumers:
 *           _cast_to_operation(consumer).process_batch(windowed_batch)
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 400, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_self->_batched_elements);
    __Pyx_GIVEREF(__pyx_v_self->_batched_elements);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->_batched_elements);
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 401, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_batch_converter, __pyx_n_s_produce_batch); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 401, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_produce_fn, __pyx_t_12) < 0) __PYX_ERR(0, 401, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "apache_beam/runners/worker/operations.py":400
 * 
 *     for batch_converter, consumers in self.other_batch_consumers.items():
 *       for windowed_batch in WindowedBatch.from_windowed_values(             # <<<<<<<<<<<<<<
 *           self._batched_elements, produce_fn=batch_converter.produce_batch):
 *         for consumer in consumers:
 */
    __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 400, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_t_12)) || PyTuple_CheckExact(__pyx_t_12)) {
      __pyx_t_4 = __pyx_t_12; __Pyx_INCREF(__pyx_t_4); __pyx_t_13 = 0;
      __pyx_t_14 = NULL;
    } else {
      __pyx_t_13 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 400, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_14 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 400, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    for (;;) {
      if (likely(!__pyx_t_14)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_12 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_13); __Pyx_INCREF(__pyx_t_12); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 400, __pyx_L1_error)
          #else
          __pyx_t_12 = PySequence_ITEM(__pyx_t_4, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 400, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          #endif
        } else {
          if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_13); __Pyx_INCREF(__pyx_t_12); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 400, __pyx_L1_error)
          #else
          __pyx_t_12 = PySequence_ITEM(__pyx_t_4, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 400, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          #endif
        }
      } else {
        __pyx_t_12 = __pyx_t_14(__pyx_t_4);
        if (unlikely(!__pyx_t_12)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 400, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_12);
      }
      __Pyx_XDECREF_SET(__pyx_v_windowed_batch, __pyx_t_12);
      __pyx_t_12 = 0;

      /* "apache_beam/runners/worker/operations.py":402
 *       for windowed_batch in WindowedBatch.from_windowed_values(
 *           self._batched_elements, produce_fn=batch_converter.produce_batch):
 *         for consumer in consumers:             # <<<<<<<<<<<<<<
 *           _cast_to_operation(consumer).process_batch(windowed_batch)
 * 
 */
      if (likely(PyList_CheckExact(__pyx_v_consumers)) || PyTuple_CheckExact(__pyx_v_consumers)) {
        __pyx_t_12 = __pyx_v_consumers; __Pyx_INCREF(__pyx_t_12); __pyx_t_15 = 0;
        __pyx_t_16 = NULL;
      } else {
        __pyx_t_15 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_v_consumers); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 402, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_16 = Py_TYPE(__pyx_t_12)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 402, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_16)) {
          if (likely(PyList_CheckExact(__pyx_t_12))) {
            if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_12)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_2 = PyList_GET_ITEM(__pyx_t_12, __pyx_t_15); __Pyx_INCREF(__pyx_t_2); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 402, __pyx_L1_error)
            #else
            __pyx_t_2 = PySequence_ITEM(__pyx_t_12, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 402, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            #endif
          } else {
            if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_12)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_15); __Pyx_INCREF(__pyx_t_2); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 402, __pyx_L1_error)
            #else
            __pyx_t_2 = PySequence_ITEM(__pyx_t_12, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 402, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            #endif
          }
        } else {
          __pyx_t_2 = __pyx_t_16(__pyx_t_12);
          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, 402, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_XDECREF_SET(__pyx_v_consumer, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "apache_beam/runners/worker/operations.py":403
 *           self._batched_elements, produce_fn=batch_converter.produce_batch):
 *         for consumer in consumers:
 *           _cast_to_operation(consumer).process_batch(windowed_batch)             # <<<<<<<<<<<<<<
 * 
 *     for consumer in self.passthrough_batch_consumers:
 */
        __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_cast_to_operation); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 403, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_17);
        __pyx_t_18 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_17))) {
          __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_17);
          if (likely(__pyx_t_18)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
            __Pyx_INCREF(__pyx_t_18);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_17, function);
          }
        }
        __pyx_t_3 = (__pyx_t_18) ? __Pyx_PyObject_Call2Args(__pyx_t_17, __pyx_t_18, __pyx_v_consumer) : __Pyx_PyObject_CallOneArg(__pyx_t_17, __pyx_v_consumer);
        __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 403, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_process_batch); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 403, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_17);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_17))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_17);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_17, function);
          }
        }
        __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_17, __pyx_t_3, __pyx_v_windowed_batch) : __Pyx_PyObject_CallOneArg(__pyx_t_17, __pyx_v_windowed_batch);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 403, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "apache_beam/runners/worker/operations.py":402
 *       for windowed_batch in WindowedBatch.from_windowed_values(
 *           self._batched_elements, produce_fn=batch_converter.produce_batch):
 *         for consumer in consumers:             # <<<<<<<<<<<<<<
 *           _cast_to_operation(consumer).process_batch(windowed_batch)
 * 
 */
      }
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

      /* "apache_beam/runners/worker/operations.py":400
 * 
 *     for batch_converter, consumers in self.other_batch_consumers.items():
 *       for windowed_batch in WindowedBatch.from_windowed_values(             # <<<<<<<<<<<<<<
 *           self._batched_elements, produce_fn=batch_converter.produce_batch):
 *         for consumer in consumers:
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":405
 *           _cast_to_operation(consumer).process_batch(windowed_batch)
 * 
 *     for consumer in self.passthrough_batch_consumers:             # <<<<<<<<<<<<<<
 *       for windowed_batch in WindowedBatch.from_windowed_values(
 *           self._batched_elements,
 */
  if (unlikely(__pyx_v_self->passthrough_batch_consumers == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 405, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_v_self->passthrough_batch_consumers; __Pyx_INCREF(__pyx_t_1); __pyx_t_9 = 0;
  for (;;) {
    if (__pyx_t_9 >= 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_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 405, __pyx_L1_error)
    #else
    __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 405, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_consumer, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "apache_beam/runners/worker/operations.py":406
 * 
 *     for consumer in self.passthrough_batch_consumers:
 *       for windowed_batch in WindowedBatch.from_windowed_values(             # <<<<<<<<<<<<<<
 *           self._batched_elements,
 *           produce_fn=self.producer_batch_converter.produce_batch):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch), __pyx_n_s_from_windowed_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 406, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);

    /* "apache_beam/runners/worker/operations.py":407
 *     for consumer in self.passthrough_batch_consumers:
 *       for windowed_batch in WindowedBatch.from_windowed_values(
 *           self._batched_elements,             # <<<<<<<<<<<<<<
 *           produce_fn=self.producer_batch_converter.produce_batch):
 *         _cast_to_operation(consumer).process_batch(windowed_batch)
 */
    __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 406, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_INCREF(__pyx_v_self->_batched_elements);
    __Pyx_GIVEREF(__pyx_v_self->_batched_elements);
    PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_self->_batched_elements);

    /* "apache_beam/runners/worker/operations.py":408
 *       for windowed_batch in WindowedBatch.from_windowed_values(
 *           self._batched_elements,
 *           produce_fn=self.producer_batch_converter.produce_batch):             # <<<<<<<<<<<<<<
 *         _cast_to_operation(consumer).process_batch(windowed_batch)
 * 
 */
    __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 408, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->producer_batch_converter, __pyx_n_s_produce_batch); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 408, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_produce_fn, __pyx_t_17) < 0) __PYX_ERR(0, 408, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;

    /* "apache_beam/runners/worker/operations.py":406
 * 
 *     for consumer in self.passthrough_batch_consumers:
 *       for windowed_batch in WindowedBatch.from_windowed_values(             # <<<<<<<<<<<<<<
 *           self._batched_elements,
 *           produce_fn=self.producer_batch_converter.produce_batch):
 */
    __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_12, __pyx_t_2); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 406, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (likely(PyList_CheckExact(__pyx_t_17)) || PyTuple_CheckExact(__pyx_t_17)) {
      __pyx_t_2 = __pyx_t_17; __Pyx_INCREF(__pyx_t_2); __pyx_t_8 = 0;
      __pyx_t_14 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_17); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 406, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_14 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 406, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    for (;;) {
      if (likely(!__pyx_t_14)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_17 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_17); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 406, __pyx_L1_error)
          #else
          __pyx_t_17 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 406, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_17);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_17 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_17); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 406, __pyx_L1_error)
          #else
          __pyx_t_17 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 406, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_17);
          #endif
        }
      } else {
        __pyx_t_17 = __pyx_t_14(__pyx_t_2);
        if (unlikely(!__pyx_t_17)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 406, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_17);
      }
      __Pyx_XDECREF_SET(__pyx_v_windowed_batch, __pyx_t_17);
      __pyx_t_17 = 0;

      /* "apache_beam/runners/worker/operations.py":409
 *           self._batched_elements,
 *           produce_fn=self.producer_batch_converter.produce_batch):
 *         _cast_to_operation(consumer).process_batch(windowed_batch)             # <<<<<<<<<<<<<<
 * 
 *     self._batched_elements = []
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_cast_to_operation); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 409, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(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_12 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_v_consumer) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_consumer);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 409, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_process_batch); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 409, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_12 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_12)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_12);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      __pyx_t_17 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_12, __pyx_v_windowed_batch) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_windowed_batch);
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 409, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;

      /* "apache_beam/runners/worker/operations.py":406
 * 
 *     for consumer in self.passthrough_batch_consumers:
 *       for windowed_batch in WindowedBatch.from_windowed_values(             # <<<<<<<<<<<<<<
 *           self._batched_elements,
 *           produce_fn=self.producer_batch_converter.produce_batch):
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/runners/worker/operations.py":405
 *           _cast_to_operation(consumer).process_batch(windowed_batch)
 * 
 *     for consumer in self.passthrough_batch_consumers:             # <<<<<<<<<<<<<<
 *       for windowed_batch in WindowedBatch.from_windowed_values(
 *           self._batched_elements,
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":411
 *         _cast_to_operation(consumer).process_batch(windowed_batch)
 * 
 *     self._batched_elements = []             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_batched_elements);
  __Pyx_DECREF(__pyx_v_self->_batched_elements);
  __pyx_v_self->_batched_elements = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":395
 *     self.update_counters_batch(windowed_batch)
 * 
 *   def flush(self):             # <<<<<<<<<<<<<<
 *     if not self.has_batch_consumers or not self._batched_elements:
 *       return
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.GeneralPurposeConsumerSet.flush", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_batch_converter);
  __Pyx_XDECREF(__pyx_v_consumers);
  __Pyx_XDECREF(__pyx_v_windowed_batch);
  __Pyx_XDECREF(__pyx_v_consumer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_7flush(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_7flush = {"flush", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_7flush, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_7flush(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_6worker_10operations_25GeneralPurposeConsumerSet_6flush(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_6flush(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__23)
  __Pyx_RefNannySetupContext("flush", 0);
  __Pyx_TraceCall("flush (wrapper)", __pyx_f[0], 395, 0, __PYX_ERR(0, 395, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_flush(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.GeneralPurposeConsumerSet.flush", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_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_6worker_10operations_25GeneralPurposeConsumerSet_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_9__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_9__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_6worker_10operations_25GeneralPurposeConsumerSet_8__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_8__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_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__24)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error));

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._batched_elements, self.coder, self.consumers, self.element_consumers, self.element_sampler, self.execution_context, self.has_batch_consumers, self.opcounter, self.other_batch_consumers, self.output_index, self.output_sampler, self.passthrough_batch_consumers, self.producer_batch_converter, self.step_name)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->has_batch_consumers); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(14); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_self->_batched_elements);
  __Pyx_GIVEREF(__pyx_v_self->_batched_elements);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->_batched_elements);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.coder);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.coder);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->__pyx_base.coder);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.consumers);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.consumers);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_self->__pyx_base.consumers);
  __Pyx_INCREF(__pyx_v_self->element_consumers);
  __Pyx_GIVEREF(__pyx_v_self->element_consumers);
  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_self->element_consumers);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.element_sampler);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.element_sampler);
  PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_self->__pyx_base.element_sampler);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.execution_context);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.execution_context);
  PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_v_self->__pyx_base.execution_context);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.opcounter));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.opcounter));
  PyTuple_SET_ITEM(__pyx_t_2, 7, ((PyObject *)__pyx_v_self->__pyx_base.opcounter));
  __Pyx_INCREF(__pyx_v_self->other_batch_consumers);
  __Pyx_GIVEREF(__pyx_v_self->other_batch_consumers);
  PyTuple_SET_ITEM(__pyx_t_2, 8, __pyx_v_self->other_batch_consumers);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.output_index);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.output_index);
  PyTuple_SET_ITEM(__pyx_t_2, 9, __pyx_v_self->__pyx_base.output_index);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.output_sampler);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.output_sampler);
  PyTuple_SET_ITEM(__pyx_t_2, 10, __pyx_v_self->__pyx_base.output_sampler);
  __Pyx_INCREF(__pyx_v_self->passthrough_batch_consumers);
  __Pyx_GIVEREF(__pyx_v_self->passthrough_batch_consumers);
  PyTuple_SET_ITEM(__pyx_t_2, 11, __pyx_v_self->passthrough_batch_consumers);
  __Pyx_INCREF(__pyx_v_self->producer_batch_converter);
  __Pyx_GIVEREF(__pyx_v_self->producer_batch_converter);
  PyTuple_SET_ITEM(__pyx_t_2, 12, __pyx_v_self->producer_batch_converter);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.step_name);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.step_name);
  PyTuple_SET_ITEM(__pyx_t_2, 13, __pyx_v_self->__pyx_base.step_name);
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._batched_elements, self.coder, self.consumers, self.element_consumers, self.element_sampler, self.execution_context, self.has_batch_consumers, self.opcounter, self.other_batch_consumers, self.output_index, self.output_sampler, self.passthrough_batch_consumers, self.producer_batch_converter, self.step_name)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":7
 *     state = (self._batched_elements, self.coder, self.consumers, self.element_consumers, self.element_sampler, self.execution_context, self.has_batch_consumers, self.opcounter, self.other_batch_consumers, self.output_index, self.output_sampler, self.passthrough_batch_consumers, self.producer_batch_converter, self.step_name)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         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(2, 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(2, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._batched_elements is not None or self.coder is not None or self.consumers is not None or self.element_consumers is not None or self.element_sampler is not None or self.execution_context is not None or self.opcounter is not None or self.other_batch_consumers is not None or self.output_index is not None or self.output_sampler is not None or self.passthrough_batch_consumers is not None or self.producer_batch_converter is not None or self.step_name is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._batched_elements, self.coder, self.consumers, self.element_consumers, self.element_sampler, self.execution_context, self.has_batch_consumers, self.opcounter, self.other_batch_consumers, self.output_index, self.output_sampler, self.passthrough_batch_consumers, self.producer_batch_converter, self.step_name)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._batched_elements is not None or self.coder is not None or self.consumers is not None or self.element_consumers is not None or self.element_sampler is not None or self.execution_context is not None or self.opcounter is not None or self.other_batch_consumers is not None or self.output_index is not None or self.output_sampler is not None or self.passthrough_batch_consumers is not None or self.producer_batch_converter is not None or self.step_name is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_GeneralPurposeConsumerSet, (type(self), 0x331df85, None), state
 */
  /*else*/ {
    __pyx_t_3 = (__pyx_v_self->_batched_elements != ((PyObject*)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->__pyx_base.coder != 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->__pyx_base.consumers != ((PyObject*)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->element_consumers != ((PyObject*)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->__pyx_base.element_sampler != 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->__pyx_base.execution_context != 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->__pyx_base.opcounter) != 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->other_batch_consumers != ((PyObject*)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->__pyx_base.output_index != 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->__pyx_base.output_sampler != 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->passthrough_batch_consumers != ((PyObject*)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->producer_batch_converter != 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->__pyx_base.step_name != 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._batched_elements is not None or self.coder is not None or self.consumers is not None or self.element_consumers is not None or self.element_sampler is not None or self.execution_context is not None or self.opcounter is not None or self.other_batch_consumers is not None or self.output_index is not None or self.output_sampler is not None or self.passthrough_batch_consumers is not None or self.producer_batch_converter is not None or self.step_name is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_GeneralPurposeConsumerSet, (type(self), 0x331df85, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self._batched_elements is not None or self.coder is not None or self.consumers is not None or self.element_consumers is not None or self.element_sampler is not None or self.execution_context is not None or self.opcounter is not None or self.other_batch_consumers is not None or self.output_index is not None or self.output_sampler is not None or self.passthrough_batch_consumers is not None or self.producer_batch_converter is not None or self.step_name is not None
 *     if use_setstate:
 *         return __pyx_unpickle_GeneralPurposeConsumerSet, (type(self), 0x331df85, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_GeneralPurposeConsumerSet, (type(self), 0x331df85, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_GeneralPurposeCon); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_53600133);
    __Pyx_GIVEREF(__pyx_int_53600133);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_53600133);
    __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(2, 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._batched_elements is not None or self.coder is not None or self.consumers is not None or self.element_consumers is not None or self.element_sampler is not None or self.execution_context is not None or self.opcounter is not None or self.other_batch_consumers is not None or self.output_index is not None or self.output_sampler is not None or self.passthrough_batch_consumers is not None or self.producer_batch_converter is not None or self.step_name is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_GeneralPurposeConsumerSet, (type(self), 0x331df85, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_GeneralPurposeConsumerSet, (type(self), 0x331df85, None), state
 *     else:
 *         return __pyx_unpickle_GeneralPurposeConsumerSet, (type(self), 0x331df85, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_GeneralPurposeConsumerSet__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_GeneralPurposeCon); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_53600133);
    __Pyx_GIVEREF(__pyx_int_53600133);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_53600133);
    __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(2, 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.worker.operations.GeneralPurposeConsumerSet.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_GeneralPurposeConsumerSet, (type(self), 0x331df85, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_GeneralPurposeConsumerSet__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_11__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_11__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_6worker_10operations_25GeneralPurposeConsumerSet_10__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_10__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__25)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[2], 16, 0, __PYX_ERR(2, 16, __pyx_L1_error));

  /* "(tree fragment)":17
 *         return __pyx_unpickle_GeneralPurposeConsumerSet, (type(self), 0x331df85, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_GeneralPurposeConsumerSet__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(2, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_GeneralPurposeConsumerSet__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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_GeneralPurposeConsumerSet, (type(self), 0x331df85, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_GeneralPurposeConsumerSet__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.GeneralPurposeConsumerSet.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":421
 *   """
 * 
 *   def __init__(self,             # <<<<<<<<<<<<<<
 *                name_context,  # type: common.NameContext
 *                spec,
 */

/* Python wrapper */
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation___init__[] = "Initializes a worker operation instance.\n\n    Args:\n      name_context: A NameContext instance, with the name information for this\n        operation.\n      spec: A operation_specs.Worker* instance.\n      counter_factory: The CounterFactory to use for our counters.\n      state_sampler: The StateSampler for the current operation.\n    ";
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_11apache_beam_7runners_6worker_10operations_9Operation___init__;
#endif
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name_context = 0;
  PyObject *__pyx_v_spec = 0;
  PyObject *__pyx_v_counter_factory = 0;
  PyObject *__pyx_v_state_sampler = 0;
  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_name_context,&__pyx_n_s_spec,&__pyx_n_s_counter_factory,&__pyx_n_s_state_sampler,0};
    PyObject* values[4] = {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  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_name_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_spec)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 1); __PYX_ERR(0, 421, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_counter_factory)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 2); __PYX_ERR(0, 421, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_state_sampler)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 3); __PYX_ERR(0, 421, __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, 421, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      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);
    }
    __pyx_v_name_context = values[0];
    __pyx_v_spec = values[1];
    __pyx_v_counter_factory = values[2];
    __pyx_v_state_sampler = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 421, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation___init__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler);

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_name_context, PyObject *__pyx_v_spec, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_state_sampler) {
  int __pyx_r;
  __Pyx_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 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 421, 0, __PYX_ERR(0, 421, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":436
 *       state_sampler: The StateSampler for the current operation.
 *     """
 *     assert isinstance(name_context, common.NameContext)             # <<<<<<<<<<<<<<
 *     self.name_context = name_context
 * 
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_common); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 436, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_NameContext); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 436, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_3 = PyObject_IsInstance(__pyx_v_name_context, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 436, __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, 436, __pyx_L1_error)
    }
  }
  #endif

  /* "apache_beam/runners/worker/operations.py":437
 *     """
 *     assert isinstance(name_context, common.NameContext)
 *     self.name_context = name_context             # <<<<<<<<<<<<<<
 * 
 *     self.spec = spec
 */
  __Pyx_INCREF(__pyx_v_name_context);
  __Pyx_GIVEREF(__pyx_v_name_context);
  __Pyx_GOTREF(__pyx_v_self->name_context);
  __Pyx_DECREF(__pyx_v_self->name_context);
  __pyx_v_self->name_context = __pyx_v_name_context;

  /* "apache_beam/runners/worker/operations.py":439
 *     self.name_context = name_context
 * 
 *     self.spec = spec             # <<<<<<<<<<<<<<
 *     self.counter_factory = counter_factory
 *     self.execution_context = None  # type: Optional[ExecutionContext]
 */
  __Pyx_INCREF(__pyx_v_spec);
  __Pyx_GIVEREF(__pyx_v_spec);
  __Pyx_GOTREF(__pyx_v_self->spec);
  __Pyx_DECREF(__pyx_v_self->spec);
  __pyx_v_self->spec = __pyx_v_spec;

  /* "apache_beam/runners/worker/operations.py":440
 * 
 *     self.spec = spec
 *     self.counter_factory = counter_factory             # <<<<<<<<<<<<<<
 *     self.execution_context = None  # type: Optional[ExecutionContext]
 *     self.consumers = collections.defaultdict(
 */
  __Pyx_INCREF(__pyx_v_counter_factory);
  __Pyx_GIVEREF(__pyx_v_counter_factory);
  __Pyx_GOTREF(__pyx_v_self->counter_factory);
  __Pyx_DECREF(__pyx_v_self->counter_factory);
  __pyx_v_self->counter_factory = __pyx_v_counter_factory;

  /* "apache_beam/runners/worker/operations.py":441
 *     self.spec = spec
 *     self.counter_factory = counter_factory
 *     self.execution_context = None  # type: Optional[ExecutionContext]             # <<<<<<<<<<<<<<
 *     self.consumers = collections.defaultdict(
 *         list)  # type: DefaultDict[int, List[Operation]]
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->execution_context);
  __Pyx_DECREF(__pyx_v_self->execution_context);
  __pyx_v_self->execution_context = Py_None;

  /* "apache_beam/runners/worker/operations.py":442
 *     self.counter_factory = counter_factory
 *     self.execution_context = None  # type: Optional[ExecutionContext]
 *     self.consumers = collections.defaultdict(             # <<<<<<<<<<<<<<
 *         list)  # type: DefaultDict[int, List[Operation]]
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_collections); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_defaultdict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":443
 *     self.execution_context = None  # type: Optional[ExecutionContext]
 *     self.consumers = collections.defaultdict(
 *         list)  # type: DefaultDict[int, List[Operation]]             # <<<<<<<<<<<<<<
 * 
 *     # These are overwritten in the legacy harness.
 */
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_1, ((PyObject *)(&PyList_Type))) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)(&PyList_Type)));
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "apache_beam/runners/worker/operations.py":442
 *     self.counter_factory = counter_factory
 *     self.execution_context = None  # type: Optional[ExecutionContext]
 *     self.consumers = collections.defaultdict(             # <<<<<<<<<<<<<<
 *         list)  # type: DefaultDict[int, List[Operation]]
 * 
 */
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->consumers);
  __Pyx_DECREF(__pyx_v_self->consumers);
  __pyx_v_self->consumers = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":446
 * 
 *     # These are overwritten in the legacy harness.
 *     self.metrics_container = MetricsContainer(self.name_context.metrics_name())             # <<<<<<<<<<<<<<
 * 
 *     self.state_sampler = state_sampler
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_MetricsContainer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->name_context, __pyx_n_s_metrics_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 446, __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_1 = (__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_1)) __PYX_ERR(0, 446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(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_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->metrics_container);
  __Pyx_DECREF(__pyx_v_self->metrics_container);
  __pyx_v_self->metrics_container = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":448
 *     self.metrics_container = MetricsContainer(self.name_context.metrics_name())
 * 
 *     self.state_sampler = state_sampler             # <<<<<<<<<<<<<<
 *     self.scoped_start_state = self.state_sampler.scoped_state(
 *         self.name_context, 'start', metrics_container=self.metrics_container)
 */
  __Pyx_INCREF(__pyx_v_state_sampler);
  __Pyx_GIVEREF(__pyx_v_state_sampler);
  __Pyx_GOTREF(__pyx_v_self->state_sampler);
  __Pyx_DECREF(__pyx_v_self->state_sampler);
  __pyx_v_self->state_sampler = __pyx_v_state_sampler;

  /* "apache_beam/runners/worker/operations.py":449
 * 
 *     self.state_sampler = state_sampler
 *     self.scoped_start_state = self.state_sampler.scoped_state(             # <<<<<<<<<<<<<<
 *         self.name_context, 'start', metrics_container=self.metrics_container)
 *     self.scoped_process_state = self.state_sampler.scoped_state(
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->state_sampler, __pyx_n_s_scoped_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "apache_beam/runners/worker/operations.py":450
 *     self.state_sampler = state_sampler
 *     self.scoped_start_state = self.state_sampler.scoped_state(
 *         self.name_context, 'start', metrics_container=self.metrics_container)             # <<<<<<<<<<<<<<
 *     self.scoped_process_state = self.state_sampler.scoped_state(
 *         self.name_context, 'process', metrics_container=self.metrics_container)
 */
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_self->name_context);
  __Pyx_GIVEREF(__pyx_v_self->name_context);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self->name_context);
  __Pyx_INCREF(__pyx_n_u_start);
  __Pyx_GIVEREF(__pyx_n_u_start);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_n_u_start);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_metrics_container, __pyx_v_self->metrics_container) < 0) __PYX_ERR(0, 450, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":449
 * 
 *     self.state_sampler = state_sampler
 *     self.scoped_start_state = self.state_sampler.scoped_state(             # <<<<<<<<<<<<<<
 *         self.name_context, 'start', metrics_container=self.metrics_container)
 *     self.scoped_process_state = self.state_sampler.scoped_state(
 */
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_5);
  __Pyx_GOTREF(__pyx_v_self->scoped_start_state);
  __Pyx_DECREF(__pyx_v_self->scoped_start_state);
  __pyx_v_self->scoped_start_state = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "apache_beam/runners/worker/operations.py":451
 *     self.scoped_start_state = self.state_sampler.scoped_state(
 *         self.name_context, 'start', metrics_container=self.metrics_container)
 *     self.scoped_process_state = self.state_sampler.scoped_state(             # <<<<<<<<<<<<<<
 *         self.name_context, 'process', metrics_container=self.metrics_container)
 *     self.scoped_finish_state = self.state_sampler.scoped_state(
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->state_sampler, __pyx_n_s_scoped_state); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "apache_beam/runners/worker/operations.py":452
 *         self.name_context, 'start', metrics_container=self.metrics_container)
 *     self.scoped_process_state = self.state_sampler.scoped_state(
 *         self.name_context, 'process', metrics_container=self.metrics_container)             # <<<<<<<<<<<<<<
 *     self.scoped_finish_state = self.state_sampler.scoped_state(
 *         self.name_context, 'finish', metrics_container=self.metrics_container)
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->name_context);
  __Pyx_GIVEREF(__pyx_v_self->name_context);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->name_context);
  __Pyx_INCREF(__pyx_n_u_process);
  __Pyx_GIVEREF(__pyx_n_u_process);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_u_process);
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_metrics_container, __pyx_v_self->metrics_container) < 0) __PYX_ERR(0, 452, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":451
 *     self.scoped_start_state = self.state_sampler.scoped_state(
 *         self.name_context, 'start', metrics_container=self.metrics_container)
 *     self.scoped_process_state = self.state_sampler.scoped_state(             # <<<<<<<<<<<<<<
 *         self.name_context, 'process', metrics_container=self.metrics_container)
 *     self.scoped_finish_state = self.state_sampler.scoped_state(
 */
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->scoped_process_state);
  __Pyx_DECREF(__pyx_v_self->scoped_process_state);
  __pyx_v_self->scoped_process_state = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":453
 *     self.scoped_process_state = self.state_sampler.scoped_state(
 *         self.name_context, 'process', metrics_container=self.metrics_container)
 *     self.scoped_finish_state = self.state_sampler.scoped_state(             # <<<<<<<<<<<<<<
 *         self.name_context, 'finish', metrics_container=self.metrics_container)
 *     # TODO(ccy): the '-abort' state can be added when the abort is supported in
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->state_sampler, __pyx_n_s_scoped_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "apache_beam/runners/worker/operations.py":454
 *         self.name_context, 'process', metrics_container=self.metrics_container)
 *     self.scoped_finish_state = self.state_sampler.scoped_state(
 *         self.name_context, 'finish', metrics_container=self.metrics_container)             # <<<<<<<<<<<<<<
 *     # TODO(ccy): the '-abort' state can be added when the abort is supported in
 *     # Operations.
 */
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_self->name_context);
  __Pyx_GIVEREF(__pyx_v_self->name_context);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self->name_context);
  __Pyx_INCREF(__pyx_n_u_finish);
  __Pyx_GIVEREF(__pyx_n_u_finish);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_n_u_finish);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_metrics_container, __pyx_v_self->metrics_container) < 0) __PYX_ERR(0, 454, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":453
 *     self.scoped_process_state = self.state_sampler.scoped_state(
 *         self.name_context, 'process', metrics_container=self.metrics_container)
 *     self.scoped_finish_state = self.state_sampler.scoped_state(             # <<<<<<<<<<<<<<
 *         self.name_context, 'finish', metrics_container=self.metrics_container)
 *     # TODO(ccy): the '-abort' state can be added when the abort is supported in
 */
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_5);
  __Pyx_GOTREF(__pyx_v_self->scoped_finish_state);
  __Pyx_DECREF(__pyx_v_self->scoped_finish_state);
  __pyx_v_self->scoped_finish_state = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "apache_beam/runners/worker/operations.py":457
 *     # TODO(ccy): the '-abort' state can be added when the abort is supported in
 *     # Operations.
 *     self.receivers = []  # type: List[ConsumerSet]             # <<<<<<<<<<<<<<
 *     # Legacy workers cannot call setup() until after setting additional state
 *     # on the operation.
 */
  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __Pyx_GOTREF(__pyx_v_self->receivers);
  __Pyx_DECREF(__pyx_v_self->receivers);
  __pyx_v_self->receivers = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "apache_beam/runners/worker/operations.py":460
 *     # Legacy workers cannot call setup() until after setting additional state
 *     # on the operation.
 *     self.setup_done = False             # <<<<<<<<<<<<<<
 *     self.step_name = None  # type: Optional[str]
 *     self.data_sampler: Optional[DataSampler] = None
 */
  __pyx_v_self->setup_done = 0;

  /* "apache_beam/runners/worker/operations.py":461
 *     # on the operation.
 *     self.setup_done = False
 *     self.step_name = None  # type: Optional[str]             # <<<<<<<<<<<<<<
 *     self.data_sampler: Optional[DataSampler] = None
 * 
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->step_name);
  __Pyx_DECREF(__pyx_v_self->step_name);
  __pyx_v_self->step_name = Py_None;

  /* "apache_beam/runners/worker/operations.py":462
 *     self.setup_done = False
 *     self.step_name = None  # type: Optional[str]
 *     self.data_sampler: Optional[DataSampler] = None             # <<<<<<<<<<<<<<
 * 
 *   def setup(self, data_sampler=None):
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->data_sampler);
  __Pyx_DECREF(__pyx_v_self->data_sampler);
  __pyx_v_self->data_sampler = Py_None;

  /* "apache_beam/runners/worker/operations.py":421
 *   """
 * 
 *   def __init__(self,             # <<<<<<<<<<<<<<
 *                name_context,  # type: common.NameContext
 *                spec,
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.__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/worker/operations.py":464
 *     self.data_sampler: Optional[DataSampler] = None
 * 
 *   def setup(self, data_sampler=None):             # <<<<<<<<<<<<<<
 *     # type: (Optional[DataSampler]) -> None
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_3setup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_2setup[] = "Set up operation.\n\n    This must be called before any other methods of the operation.";
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_3setup = {"setup", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_3setup, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_2setup};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_3setup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data_sampler = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setup (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data_sampler,0};
    PyObject* values[1] = {0};
    values[0] = ((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  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_data_sampler);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setup") < 0)) __PYX_ERR(0, 464, __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_data_sampler = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setup", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 464, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.setup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_2setup(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), __pyx_v_data_sampler);

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

/* "apache_beam/runners/worker/operations.py":481
 *       if getattr(self.spec, 'output_coders', None):
 * 
 *         def get_output_sampler(output_num):             # <<<<<<<<<<<<<<
 *           if data_sampler is None:
 *             return None
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_5setup_1get_output_sampler(PyObject *__pyx_self, PyObject *__pyx_v_output_num); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_5setup_1get_output_sampler = {"get_output_sampler", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_5setup_1get_output_sampler, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_5setup_1get_output_sampler(PyObject *__pyx_self, PyObject *__pyx_v_output_num) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_output_sampler (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_5setup_get_output_sampler(__pyx_self, ((PyObject *)__pyx_v_output_num));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_5setup_get_output_sampler(PyObject *__pyx_self, PyObject *__pyx_v_output_num) {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup *__pyx_cur_scope;
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_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;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_output_sampler", 0);
  __pyx_outer_scope = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_TraceCall("get_output_sampler", __pyx_f[0], 481, 0, __PYX_ERR(0, 481, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":482
 * 
 *         def get_output_sampler(output_num):
 *           if data_sampler is None:             # <<<<<<<<<<<<<<
 *             return None
 *           return data_sampler.sampler_for_output(transform_id, output_num)
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_data_sampler)) { __Pyx_RaiseClosureNameError("data_sampler"); __PYX_ERR(0, 482, __pyx_L1_error) }
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v_data_sampler == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "apache_beam/runners/worker/operations.py":483
 *         def get_output_sampler(output_num):
 *           if data_sampler is None:
 *             return None             # <<<<<<<<<<<<<<
 *           return data_sampler.sampler_for_output(transform_id, output_num)
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "apache_beam/runners/worker/operations.py":482
 * 
 *         def get_output_sampler(output_num):
 *           if data_sampler is None:             # <<<<<<<<<<<<<<
 *             return None
 *           return data_sampler.sampler_for_output(transform_id, output_num)
 */
  }

  /* "apache_beam/runners/worker/operations.py":484
 *           if data_sampler is None:
 *             return None
 *           return data_sampler.sampler_for_output(transform_id, output_num)             # <<<<<<<<<<<<<<
 * 
 *         self.receivers = [
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_data_sampler)) { __Pyx_RaiseClosureNameError("data_sampler"); __PYX_ERR(0, 484, __pyx_L1_error) }
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_data_sampler, __pyx_n_s_sampler_for_output); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (unlikely(!__pyx_cur_scope->__pyx_v_transform_id)) { __Pyx_RaiseClosureNameError("transform_id"); __PYX_ERR(0, 484, __pyx_L1_error) }
  __pyx_t_5 = NULL;
  __pyx_t_6 = 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_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_cur_scope->__pyx_v_transform_id, __pyx_v_output_num};
    __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 484, __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[3] = {__pyx_t_5, __pyx_cur_scope->__pyx_v_transform_id, __pyx_v_output_num};
    __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 484, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 484, __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_cur_scope->__pyx_v_transform_id);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_transform_id);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_cur_scope->__pyx_v_transform_id);
    __Pyx_INCREF(__pyx_v_output_num);
    __Pyx_GIVEREF(__pyx_v_output_num);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_output_num);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 484, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 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/worker/operations.py":481
 *       if getattr(self.spec, 'output_coders', None):
 * 
 *         def get_output_sampler(output_num):             # <<<<<<<<<<<<<<
 *           if data_sampler is None:
 *             return None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.setup.get_output_sampler", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":464
 *     self.data_sampler: Optional[DataSampler] = None
 * 
 *   def setup(self, data_sampler=None):             # <<<<<<<<<<<<<<
 *     # type: (Optional[DataSampler]) -> None
 * 
 */

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_2setup(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_data_sampler) {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup *__pyx_cur_scope;
  PyObject *__pyx_v_get_output_sampler = 0;
  PyObject *__pyx_7genexpr__pyx_v_i = NULL;
  PyObject *__pyx_7genexpr__pyx_v_coder = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_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;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_t_19;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  int __pyx_t_22;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__26)
  __Pyx_RefNannySetupContext("setup", 0);
  __pyx_cur_scope = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup *)__pyx_tp_new_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup(__pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 464, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("setup", __pyx_f[0], 464, 0, __PYX_ERR(0, 464, __pyx_L1_error));
  __pyx_cur_scope->__pyx_v_data_sampler = __pyx_v_data_sampler;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_data_sampler);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_data_sampler);

  /* "apache_beam/runners/worker/operations.py":470
 * 
 *     This must be called before any other methods of the operation."""
 *     with self.scoped_start_state:             # <<<<<<<<<<<<<<
 *       self.data_sampler = data_sampler
 *       self.debug_logging_enabled = logging.getLogger().isEnabledFor(
 */
  /*with:*/ {
    __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->scoped_start_state, __pyx_n_s_exit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 470, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->scoped_start_state, __pyx_n_s_enter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 470, __pyx_L3_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_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, 470, __pyx_L3_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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/worker/operations.py":471
 *     This must be called before any other methods of the operation."""
 *     with self.scoped_start_state:
 *       self.data_sampler = data_sampler             # <<<<<<<<<<<<<<
 *       self.debug_logging_enabled = logging.getLogger().isEnabledFor(
 *           logging.DEBUG)
 */
          __Pyx_INCREF(__pyx_cur_scope->__pyx_v_data_sampler);
          __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_data_sampler);
          __Pyx_GOTREF(__pyx_v_self->data_sampler);
          __Pyx_DECREF(__pyx_v_self->data_sampler);
          __pyx_v_self->data_sampler = __pyx_cur_scope->__pyx_v_data_sampler;

          /* "apache_beam/runners/worker/operations.py":472
 *     with self.scoped_start_state:
 *       self.data_sampler = data_sampler
 *       self.debug_logging_enabled = logging.getLogger().isEnabledFor(             # <<<<<<<<<<<<<<
 *           logging.DEBUG)
 *       transform_id = self.name_context.transform_id
 */
          __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_logging); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 472, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 472, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = NULL;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
            __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8);
            if (likely(__pyx_t_4)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
              __Pyx_INCREF(__pyx_t_4);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_8, function);
            }
          }
          __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 472, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_isEnabledFor); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 472, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "apache_beam/runners/worker/operations.py":473
 *       self.data_sampler = data_sampler
 *       self.debug_logging_enabled = logging.getLogger().isEnabledFor(
 *           logging.DEBUG)             # <<<<<<<<<<<<<<
 *       transform_id = self.name_context.transform_id
 * 
 */
          __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_logging); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 473, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DEBUG); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 473, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __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_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_4);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 472, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

          /* "apache_beam/runners/worker/operations.py":472
 *     with self.scoped_start_state:
 *       self.data_sampler = data_sampler
 *       self.debug_logging_enabled = logging.getLogger().isEnabledFor(             # <<<<<<<<<<<<<<
 *           logging.DEBUG)
 *       transform_id = self.name_context.transform_id
 */
          __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 472, __pyx_L7_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_v_self->debug_logging_enabled = __pyx_t_9;

          /* "apache_beam/runners/worker/operations.py":474
 *       self.debug_logging_enabled = logging.getLogger().isEnabledFor(
 *           logging.DEBUG)
 *       transform_id = self.name_context.transform_id             # <<<<<<<<<<<<<<
 * 
 *       # Everything except WorkerSideInputSource, which is not a
 */
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->name_context, __pyx_n_s_transform_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 474, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GIVEREF(__pyx_t_2);
          __pyx_cur_scope->__pyx_v_transform_id = __pyx_t_2;
          __pyx_t_2 = 0;

          /* "apache_beam/runners/worker/operations.py":479
 *       # top-level operation, should have output_coders
 *       #TODO(pabloem): Define better what step name is used here.
 *       if getattr(self.spec, 'output_coders', None):             # <<<<<<<<<<<<<<
 * 
 *         def get_output_sampler(output_num):
 */
          __pyx_t_2 = __pyx_v_self->spec;
          __Pyx_INCREF(__pyx_t_2);
          __pyx_t_8 = __Pyx_GetAttr3(__pyx_t_2, __pyx_n_u_output_coders, Py_None); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 479, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 479, __pyx_L7_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (__pyx_t_9) {

            /* "apache_beam/runners/worker/operations.py":481
 *       if getattr(self.spec, 'output_coders', None):
 * 
 *         def get_output_sampler(output_num):             # <<<<<<<<<<<<<<
 *           if data_sampler is None:
 *             return None
 */
            __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_5setup_1get_output_sampler, 0, __pyx_n_s_setup_locals_get_output_sampler, ((PyObject*)__pyx_cur_scope), __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 481, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_8);
            __pyx_v_get_output_sampler = __pyx_t_8;
            __pyx_t_8 = 0;

            /* "apache_beam/runners/worker/operations.py":486
 *           return data_sampler.sampler_for_output(transform_id, output_num)
 * 
 *         self.receivers = [             # <<<<<<<<<<<<<<
 *             ConsumerSet.create(
 *                 self.counter_factory,
 */
            { /* enter inner scope */
              __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 486, __pyx_L16_error)
              __Pyx_GOTREF(__pyx_t_8);
              __Pyx_INCREF(__pyx_int_0);
              __pyx_t_2 = __pyx_int_0;

              /* "apache_beam/runners/worker/operations.py":496
 *                 self.get_output_batch_converter(),
 *                 get_output_sampler(i)) for i,
 *             coder in enumerate(self.spec.output_coders)             # <<<<<<<<<<<<<<
 *         ]
 *     self.setup_done = True
 */
              __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->spec, __pyx_n_s_output_coders); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 496, __pyx_L16_error)
              __Pyx_GOTREF(__pyx_t_4);
              if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
                __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_10 = 0;
                __pyx_t_11 = NULL;
              } else {
                __pyx_t_10 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 496, __pyx_L16_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_11 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 496, __pyx_L16_error)
              }
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              for (;;) {
                if (likely(!__pyx_t_11)) {
                  if (likely(PyList_CheckExact(__pyx_t_3))) {
                    if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_3)) break;
                    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_10); __Pyx_INCREF(__pyx_t_4); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 496, __pyx_L16_error)
                    #else
                    __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 496, __pyx_L16_error)
                    __Pyx_GOTREF(__pyx_t_4);
                    #endif
                  } else {
                    if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
                    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                    __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_10); __Pyx_INCREF(__pyx_t_4); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 496, __pyx_L16_error)
                    #else
                    __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 496, __pyx_L16_error)
                    __Pyx_GOTREF(__pyx_t_4);
                    #endif
                  }
                } else {
                  __pyx_t_4 = __pyx_t_11(__pyx_t_3);
                  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, 496, __pyx_L16_error)
                    }
                    break;
                  }
                  __Pyx_GOTREF(__pyx_t_4);
                }
                __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_coder, __pyx_t_4);
                __pyx_t_4 = 0;

                /* "apache_beam/runners/worker/operations.py":495
 *                 self._get_runtime_performance_hints(),
 *                 self.get_output_batch_converter(),
 *                 get_output_sampler(i)) for i,             # <<<<<<<<<<<<<<
 *             coder in enumerate(self.spec.output_coders)
 *         ]
 */
                __Pyx_INCREF(__pyx_t_2);
                __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_i, __pyx_t_2);

                /* "apache_beam/runners/worker/operations.py":496
 *                 self.get_output_batch_converter(),
 *                 get_output_sampler(i)) for i,
 *             coder in enumerate(self.spec.output_coders)             # <<<<<<<<<<<<<<
 *         ]
 *     self.setup_done = True
 */
                __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 496, __pyx_L16_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_2);
                __pyx_t_2 = __pyx_t_4;
                __pyx_t_4 = 0;

                /* "apache_beam/runners/worker/operations.py":487
 * 
 *         self.receivers = [
 *             ConsumerSet.create(             # <<<<<<<<<<<<<<
 *                 self.counter_factory,
 *                 self.name_context.logging_name(),
 */
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet), __pyx_n_s_create); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 487, __pyx_L16_error)
                __Pyx_GOTREF(__pyx_t_12);

                /* "apache_beam/runners/worker/operations.py":489
 *             ConsumerSet.create(
 *                 self.counter_factory,
 *                 self.name_context.logging_name(),             # <<<<<<<<<<<<<<
 *                 i,
 *                 self.consumers[i],
 */
                __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->name_context, __pyx_n_s_logging_name); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 489, __pyx_L16_error)
                __Pyx_GOTREF(__pyx_t_14);
                __pyx_t_15 = NULL;
                if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) {
                  __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_14);
                  if (likely(__pyx_t_15)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
                    __Pyx_INCREF(__pyx_t_15);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_14, function);
                  }
                }
                __pyx_t_13 = (__pyx_t_15) ? __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_t_15) : __Pyx_PyObject_CallNoArg(__pyx_t_14);
                __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
                if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 489, __pyx_L16_error)
                __Pyx_GOTREF(__pyx_t_13);
                __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

                /* "apache_beam/runners/worker/operations.py":491
 *                 self.name_context.logging_name(),
 *                 i,
 *                 self.consumers[i],             # <<<<<<<<<<<<<<
 *                 coder,
 *                 self._get_runtime_performance_hints(),
 */
                __pyx_t_14 = __Pyx_PyObject_GetItem(__pyx_v_self->consumers, __pyx_7genexpr__pyx_v_i); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 491, __pyx_L16_error)
                __Pyx_GOTREF(__pyx_t_14);

                /* "apache_beam/runners/worker/operations.py":493
 *                 self.consumers[i],
 *                 coder,
 *                 self._get_runtime_performance_hints(),             # <<<<<<<<<<<<<<
 *                 self.get_output_batch_converter(),
 *                 get_output_sampler(i)) for i,
 */
                __pyx_t_16 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_runtime_performance_hints); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 493, __pyx_L16_error)
                __Pyx_GOTREF(__pyx_t_16);
                __pyx_t_17 = NULL;
                if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_16))) {
                  __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_16);
                  if (likely(__pyx_t_17)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
                    __Pyx_INCREF(__pyx_t_17);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_16, function);
                  }
                }
                __pyx_t_15 = (__pyx_t_17) ? __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_17) : __Pyx_PyObject_CallNoArg(__pyx_t_16);
                __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
                if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 493, __pyx_L16_error)
                __Pyx_GOTREF(__pyx_t_15);
                __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

                /* "apache_beam/runners/worker/operations.py":494
 *                 coder,
 *                 self._get_runtime_performance_hints(),
 *                 self.get_output_batch_converter(),             # <<<<<<<<<<<<<<
 *                 get_output_sampler(i)) for i,
 *             coder in enumerate(self.spec.output_coders)
 */
                __pyx_t_17 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_output_batch_converter); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 494, __pyx_L16_error)
                __Pyx_GOTREF(__pyx_t_17);
                __pyx_t_18 = NULL;
                if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_17))) {
                  __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_17);
                  if (likely(__pyx_t_18)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
                    __Pyx_INCREF(__pyx_t_18);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_17, function);
                  }
                }
                __pyx_t_16 = (__pyx_t_18) ? __Pyx_PyObject_CallOneArg(__pyx_t_17, __pyx_t_18) : __Pyx_PyObject_CallNoArg(__pyx_t_17);
                __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
                if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 494, __pyx_L16_error)
                __Pyx_GOTREF(__pyx_t_16);
                __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;

                /* "apache_beam/runners/worker/operations.py":495
 *                 self._get_runtime_performance_hints(),
 *                 self.get_output_batch_converter(),
 *                 get_output_sampler(i)) for i,             # <<<<<<<<<<<<<<
 *             coder in enumerate(self.spec.output_coders)
 *         ]
 */
                __pyx_t_17 = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_5setup_get_output_sampler(__pyx_v_get_output_sampler, __pyx_7genexpr__pyx_v_i); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 495, __pyx_L16_error)
                __Pyx_GOTREF(__pyx_t_17);
                __pyx_t_18 = NULL;
                __pyx_t_19 = 0;
                if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_18)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_18);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_19 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[9] = {__pyx_t_18, __pyx_v_self->counter_factory, __pyx_t_13, __pyx_7genexpr__pyx_v_i, __pyx_t_14, __pyx_7genexpr__pyx_v_coder, __pyx_t_15, __pyx_t_16, __pyx_t_17};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_19, 8+__pyx_t_19); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 487, __pyx_L16_error)
                  __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
                  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
                  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[9] = {__pyx_t_18, __pyx_v_self->counter_factory, __pyx_t_13, __pyx_7genexpr__pyx_v_i, __pyx_t_14, __pyx_7genexpr__pyx_v_coder, __pyx_t_15, __pyx_t_16, __pyx_t_17};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_19, 8+__pyx_t_19); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 487, __pyx_L16_error)
                  __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
                  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
                  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
                } else
                #endif
                {
                  __pyx_t_20 = PyTuple_New(8+__pyx_t_19); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 487, __pyx_L16_error)
                  __Pyx_GOTREF(__pyx_t_20);
                  if (__pyx_t_18) {
                    __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_18); __pyx_t_18 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_self->counter_factory);
                  __Pyx_GIVEREF(__pyx_v_self->counter_factory);
                  PyTuple_SET_ITEM(__pyx_t_20, 0+__pyx_t_19, __pyx_v_self->counter_factory);
                  __Pyx_GIVEREF(__pyx_t_13);
                  PyTuple_SET_ITEM(__pyx_t_20, 1+__pyx_t_19, __pyx_t_13);
                  __Pyx_INCREF(__pyx_7genexpr__pyx_v_i);
                  __Pyx_GIVEREF(__pyx_7genexpr__pyx_v_i);
                  PyTuple_SET_ITEM(__pyx_t_20, 2+__pyx_t_19, __pyx_7genexpr__pyx_v_i);
                  __Pyx_GIVEREF(__pyx_t_14);
                  PyTuple_SET_ITEM(__pyx_t_20, 3+__pyx_t_19, __pyx_t_14);
                  __Pyx_INCREF(__pyx_7genexpr__pyx_v_coder);
                  __Pyx_GIVEREF(__pyx_7genexpr__pyx_v_coder);
                  PyTuple_SET_ITEM(__pyx_t_20, 4+__pyx_t_19, __pyx_7genexpr__pyx_v_coder);
                  __Pyx_GIVEREF(__pyx_t_15);
                  PyTuple_SET_ITEM(__pyx_t_20, 5+__pyx_t_19, __pyx_t_15);
                  __Pyx_GIVEREF(__pyx_t_16);
                  PyTuple_SET_ITEM(__pyx_t_20, 6+__pyx_t_19, __pyx_t_16);
                  __Pyx_GIVEREF(__pyx_t_17);
                  PyTuple_SET_ITEM(__pyx_t_20, 7+__pyx_t_19, __pyx_t_17);
                  __pyx_t_13 = 0;
                  __pyx_t_14 = 0;
                  __pyx_t_15 = 0;
                  __pyx_t_16 = 0;
                  __pyx_t_17 = 0;
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_20, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 487, __pyx_L16_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                if (unlikely(__Pyx_ListComp_Append(__pyx_t_8, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 486, __pyx_L16_error)
                __Pyx_DECREF(__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_XDECREF(__pyx_7genexpr__pyx_v_coder); __pyx_7genexpr__pyx_v_coder = 0;
              __Pyx_XDECREF(__pyx_7genexpr__pyx_v_i); __pyx_7genexpr__pyx_v_i = 0;
              goto __pyx_L19_exit_scope;
              __pyx_L16_error:;
              __Pyx_XDECREF(__pyx_7genexpr__pyx_v_coder); __pyx_7genexpr__pyx_v_coder = 0;
              __Pyx_XDECREF(__pyx_7genexpr__pyx_v_i); __pyx_7genexpr__pyx_v_i = 0;
              goto __pyx_L7_error;
              __pyx_L19_exit_scope:;
            } /* exit inner scope */

            /* "apache_beam/runners/worker/operations.py":486
 *           return data_sampler.sampler_for_output(transform_id, output_num)
 * 
 *         self.receivers = [             # <<<<<<<<<<<<<<
 *             ConsumerSet.create(
 *                 self.counter_factory,
 */
            __Pyx_GIVEREF(__pyx_t_8);
            __Pyx_GOTREF(__pyx_v_self->receivers);
            __Pyx_DECREF(__pyx_v_self->receivers);
            __pyx_v_self->receivers = ((PyObject*)__pyx_t_8);
            __pyx_t_8 = 0;

            /* "apache_beam/runners/worker/operations.py":479
 *       # top-level operation, should have output_coders
 *       #TODO(pabloem): Define better what step name is used here.
 *       if getattr(self.spec, 'output_coders', None):             # <<<<<<<<<<<<<<
 * 
 *         def get_output_sampler(output_num):
 */
          }

          /* "apache_beam/runners/worker/operations.py":470
 * 
 *     This must be called before any other methods of the operation."""
 *     with self.scoped_start_state:             # <<<<<<<<<<<<<<
 *       self.data_sampler = data_sampler
 *       self.debug_logging_enabled = logging.getLogger().isEnabledFor(
 */
        }
        __Pyx_XDECREF(__pyx_t_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_12); __pyx_t_12 = 0;
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
        __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        /*except:*/ {
          __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.setup", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 470, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_4 = PyTuple_Pack(3, __pyx_t_8, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 470, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_21 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 470, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_21);
          __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_21);
          __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
          if (__pyx_t_9 < 0) __PYX_ERR(0, 470, __pyx_L9_except_error)
          __pyx_t_22 = ((!(__pyx_t_9 != 0)) != 0);
          if (__pyx_t_22) {
            __Pyx_GIVEREF(__pyx_t_8);
            __Pyx_GIVEREF(__pyx_t_2);
            __Pyx_XGIVEREF(__pyx_t_3);
            __Pyx_ErrRestoreWithState(__pyx_t_8, __pyx_t_2, __pyx_t_3);
            __pyx_t_8 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; 
            __PYX_ERR(0, 470, __pyx_L9_except_error)
          }
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          goto __pyx_L8_exception_handled;
        }
        __pyx_L9_except_error:;
        __Pyx_XGIVEREF(__pyx_t_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_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_1) {
          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__29, NULL);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 470, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        goto __pyx_L6;
      }
      __pyx_L6:;
    }
    goto __pyx_L23;
    __pyx_L3_error:;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L1_error;
    __pyx_L23:;
  }

  /* "apache_beam/runners/worker/operations.py":498
 *             coder in enumerate(self.spec.output_coders)
 *         ]
 *     self.setup_done = True             # <<<<<<<<<<<<<<
 * 
 *   def start(self):
 */
  __pyx_v_self->setup_done = 1;

  /* "apache_beam/runners/worker/operations.py":464
 *     self.data_sampler: Optional[DataSampler] = None
 * 
 *   def setup(self, data_sampler=None):             # <<<<<<<<<<<<<<
 *     # type: (Optional[DataSampler]) -> None
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_20);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.setup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_get_output_sampler);
  __Pyx_XDECREF(__pyx_7genexpr__pyx_v_i);
  __Pyx_XDECREF(__pyx_7genexpr__pyx_v_coder);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":500
 *     self.setup_done = True
 * 
 *   def start(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 * 
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_5start(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_start(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_receiver = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_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;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__30)
  __Pyx_RefNannySetupContext("start", 0);
  __Pyx_TraceCall("start", __pyx_f[0], 500, 0, __PYX_ERR(0, 500, __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_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __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_6worker_10operations_9Operation_5start)) {
        __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, 500, __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/worker/operations.py":504
 * 
 *     """Start operation."""
 *     if not self.setup_done:             # <<<<<<<<<<<<<<
 *       # For legacy workers.
 *       self.setup(self.data_sampler)
 */
  __pyx_t_5 = ((!(__pyx_v_self->setup_done != 0)) != 0);
  if (__pyx_t_5) {

    /* "apache_beam/runners/worker/operations.py":506
 *     if not self.setup_done:
 *       # For legacy workers.
 *       self.setup(self.data_sampler)             # <<<<<<<<<<<<<<
 * 
 *     # The ExecutionContext is per instruction and so cannot be set at
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setup); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 506, __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_self->data_sampler) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_self->data_sampler);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/runners/worker/operations.py":504
 * 
 *     """Start operation."""
 *     if not self.setup_done:             # <<<<<<<<<<<<<<
 *       # For legacy workers.
 *       self.setup(self.data_sampler)
 */
  }

  /* "apache_beam/runners/worker/operations.py":510
 *     # The ExecutionContext is per instruction and so cannot be set at
 *     # initialization time.
 *     if self.data_sampler is not None:             # <<<<<<<<<<<<<<
 *       for receiver in self.receivers:
 *         receiver.execution_context = self.execution_context
 */
  __pyx_t_5 = (__pyx_v_self->data_sampler != Py_None);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "apache_beam/runners/worker/operations.py":511
 *     # initialization time.
 *     if self.data_sampler is not None:
 *       for receiver in self.receivers:             # <<<<<<<<<<<<<<
 *         receiver.execution_context = self.execution_context
 * 
 */
    if (unlikely(__pyx_v_self->receivers == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(0, 511, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_v_self->receivers; __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = 0;
    for (;;) {
      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, 511, __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, 511, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_receiver, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "apache_beam/runners/worker/operations.py":512
 *     if self.data_sampler is not None:
 *       for receiver in self.receivers:
 *         receiver.execution_context = self.execution_context             # <<<<<<<<<<<<<<
 * 
 *   def get_batching_preference(self):
 */
      __pyx_t_2 = __pyx_v_self->execution_context;
      __Pyx_INCREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_receiver, __pyx_n_s_execution_context, __pyx_t_2) < 0) __PYX_ERR(0, 512, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "apache_beam/runners/worker/operations.py":511
 *     # initialization time.
 *     if self.data_sampler is not None:
 *       for receiver in self.receivers:             # <<<<<<<<<<<<<<
 *         receiver.execution_context = self.execution_context
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/runners/worker/operations.py":510
 *     # The ExecutionContext is per instruction and so cannot be set at
 *     # initialization time.
 *     if self.data_sampler is not None:             # <<<<<<<<<<<<<<
 *       for receiver in self.receivers:
 *         receiver.execution_context = self.execution_context
 */
  }

  /* "apache_beam/runners/worker/operations.py":500
 *     self.setup_done = True
 * 
 *   def start(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_receiver);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_5start(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_4start[] = "Start operation.";
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_5start = {"start", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_5start, METH_NOARGS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_4start};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_5start(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_6worker_10operations_9Operation_4start(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_4start(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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("start", 0);
  __Pyx_TraceCall("start (wrapper)", __pyx_f[0], 500, 0, __PYX_ERR(0, 500, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_start(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":514
 *         receiver.execution_context = self.execution_context
 * 
 *   def get_batching_preference(self):             # <<<<<<<<<<<<<<
 *     # By default operations don't support batching, require Receiver to unbatch
 *     return common.BatchingPreference.BATCH_FORBIDDEN
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_7get_batching_preference(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_7get_batching_preference = {"get_batching_preference", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_7get_batching_preference, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_7get_batching_preference(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_batching_preference (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_6get_batching_preference(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_6get_batching_preference(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__31)
  __Pyx_RefNannySetupContext("get_batching_preference", 0);
  __Pyx_TraceCall("get_batching_preference", __pyx_f[0], 514, 0, __PYX_ERR(0, 514, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":516
 *   def get_batching_preference(self):
 *     # By default operations don't support batching, require Receiver to unbatch
 *     return common.BatchingPreference.BATCH_FORBIDDEN             # <<<<<<<<<<<<<<
 * 
 *   def get_input_batch_converter(self) -> Optional[BatchConverter]:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_common); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_BatchingPreference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 516, __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_BATCH_FORBIDDEN); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/runners/worker/operations.py":514
 *         receiver.execution_context = self.execution_context
 * 
 *   def get_batching_preference(self):             # <<<<<<<<<<<<<<
 *     # By default operations don't support batching, require Receiver to unbatch
 *     return common.BatchingPreference.BATCH_FORBIDDEN
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.get_batching_preference", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":518
 *     return common.BatchingPreference.BATCH_FORBIDDEN
 * 
 *   def get_input_batch_converter(self) -> Optional[BatchConverter]:             # <<<<<<<<<<<<<<
 *     """Returns a batch type converter if this operation can accept a batch,
 *     otherwise None."""
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9get_input_batch_converter(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_8get_input_batch_converter[] = "Returns a batch type converter if this operation can accept a batch,\n    otherwise None.";
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_9get_input_batch_converter = {"get_input_batch_converter", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9get_input_batch_converter, METH_NOARGS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_8get_input_batch_converter};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9get_input_batch_converter(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_input_batch_converter (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_8get_input_batch_converter(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_8get_input_batch_converter(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__32)
  __Pyx_RefNannySetupContext("get_input_batch_converter", 0);
  __Pyx_TraceCall("get_input_batch_converter", __pyx_f[0], 518, 0, __PYX_ERR(0, 518, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":521
 *     """Returns a batch type converter if this operation can accept a batch,
 *     otherwise None."""
 *     return None             # <<<<<<<<<<<<<<
 * 
 *   def get_output_batch_converter(self) -> Optional[BatchConverter]:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "apache_beam/runners/worker/operations.py":518
 *     return common.BatchingPreference.BATCH_FORBIDDEN
 * 
 *   def get_input_batch_converter(self) -> Optional[BatchConverter]:             # <<<<<<<<<<<<<<
 *     """Returns a batch type converter if this operation can accept a batch,
 *     otherwise None."""
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.get_input_batch_converter", __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/worker/operations.py":523
 *     return None
 * 
 *   def get_output_batch_converter(self) -> Optional[BatchConverter]:             # <<<<<<<<<<<<<<
 *     """Returns a batch type converter if this operation can produce a batch,
 *     otherwise None."""
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_11get_output_batch_converter(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_10get_output_batch_converter[] = "Returns a batch type converter if this operation can produce a batch,\n    otherwise None.";
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_11get_output_batch_converter = {"get_output_batch_converter", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_11get_output_batch_converter, METH_NOARGS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_10get_output_batch_converter};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_11get_output_batch_converter(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_output_batch_converter (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_10get_output_batch_converter(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_10get_output_batch_converter(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__33)
  __Pyx_RefNannySetupContext("get_output_batch_converter", 0);
  __Pyx_TraceCall("get_output_batch_converter", __pyx_f[0], 523, 0, __PYX_ERR(0, 523, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":526
 *     """Returns a batch type converter if this operation can produce a batch,
 *     otherwise None."""
 *     return None             # <<<<<<<<<<<<<<
 * 
 *   def process(self, o):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "apache_beam/runners/worker/operations.py":523
 *     return None
 * 
 *   def get_output_batch_converter(self) -> Optional[BatchConverter]:             # <<<<<<<<<<<<<<
 *     """Returns a batch type converter if this operation can produce a batch,
 *     otherwise None."""
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.get_output_batch_converter", __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/worker/operations.py":528
 *     return None
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 * 
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_13process(PyObject *__pyx_v_self, PyObject *__pyx_v_o); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_process(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__34)
  __Pyx_RefNannySetupContext("process", 0);
  __Pyx_TraceCall("process", __pyx_f[0], 528, 0, __PYX_ERR(0, 528, __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, 528, __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_6worker_10operations_9Operation_13process)) {
        __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_o)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_o));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 528, __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/worker/operations.py":531
 *     # type: (WindowedValue) -> None
 * 
 *     """Process element in operation."""             # <<<<<<<<<<<<<<
 *     pass
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":528
 *     return None
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_13process(PyObject *__pyx_v_self, PyObject *__pyx_v_o); /*proto*/
static char __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_12process[] = "Process element in operation.";
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_13process = {"process", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_13process, METH_O, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_12process};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_13process(PyObject *__pyx_v_self, PyObject *__pyx_v_o) {
  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_o), __pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, 1, "o", 0))) __PYX_ERR(0, 528, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_12process(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_v_o));

  /* 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_6worker_10operations_9Operation_12process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o) {
  PyObject *__pyx_r = NULL;
  __Pyx_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("process", 0);
  __Pyx_TraceCall("process (wrapper)", __pyx_f[0], 528, 0, __PYX_ERR(0, 528, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_process(__pyx_v_self, __pyx_v_o, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":534
 *     pass
 * 
 *   def process_batch(self, batch: WindowedBatch):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_15process_batch(PyObject *__pyx_v_self, PyObject *__pyx_v_batch); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_15process_batch = {"process_batch", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_15process_batch, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_15process_batch(PyObject *__pyx_v_self, PyObject *__pyx_v_batch) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("process_batch (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_batch), __pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch, 1, "batch", 0))) __PYX_ERR(0, 534, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_14process_batch(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *)__pyx_v_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_6worker_10operations_9Operation_14process_batch(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_batch) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__35)
  __Pyx_RefNannySetupContext("process_batch", 0);
  __Pyx_TraceCall("process_batch", __pyx_f[0], 534, 0, __PYX_ERR(0, 534, __pyx_L1_error));

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.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;
}

/* "apache_beam/runners/worker/operations.py":537
 *     pass
 * 
 *   def finalize_bundle(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     pass
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17finalize_bundle(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_17finalize_bundle = {"finalize_bundle", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17finalize_bundle, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17finalize_bundle(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("finalize_bundle (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_16finalize_bundle(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_16finalize_bundle(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__36)
  __Pyx_RefNannySetupContext("finalize_bundle", 0);
  __Pyx_TraceCall("finalize_bundle", __pyx_f[0], 537, 0, __PYX_ERR(0, 537, __pyx_L1_error));

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.finalize_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/worker/operations.py":541
 *     pass
 * 
 *   def needs_finalization(self):             # <<<<<<<<<<<<<<
 *     return False
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_19needs_finalization(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_19needs_finalization = {"needs_finalization", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_19needs_finalization, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_19needs_finalization(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("needs_finalization (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_18needs_finalization(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_18needs_finalization(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__37)
  __Pyx_RefNannySetupContext("needs_finalization", 0);
  __Pyx_TraceCall("needs_finalization", __pyx_f[0], 541, 0, __PYX_ERR(0, 541, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":542
 * 
 *   def needs_finalization(self):
 *     return False             # <<<<<<<<<<<<<<
 * 
 *   def try_split(self, fraction_of_remainder):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

  /* "apache_beam/runners/worker/operations.py":541
 *     pass
 * 
 *   def needs_finalization(self):             # <<<<<<<<<<<<<<
 *     return False
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.needs_finalization", __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/worker/operations.py":544
 *     return False
 * 
 *   def try_split(self, fraction_of_remainder):             # <<<<<<<<<<<<<<
 *     # type: (...) -> Optional[Any]
 *     return None
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_21try_split(PyObject *__pyx_v_self, PyObject *__pyx_v_fraction_of_remainder); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_21try_split = {"try_split", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_21try_split, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_21try_split(PyObject *__pyx_v_self, PyObject *__pyx_v_fraction_of_remainder) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("try_split (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_20try_split(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), ((PyObject *)__pyx_v_fraction_of_remainder));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_20try_split(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_fraction_of_remainder) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__38)
  __Pyx_RefNannySetupContext("try_split", 0);
  __Pyx_TraceCall("try_split", __pyx_f[0], 544, 0, __PYX_ERR(0, 544, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":546
 *   def try_split(self, fraction_of_remainder):
 *     # type: (...) -> Optional[Any]
 *     return None             # <<<<<<<<<<<<<<
 * 
 *   def current_element_progress(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "apache_beam/runners/worker/operations.py":544
 *     return False
 * 
 *   def try_split(self, fraction_of_remainder):             # <<<<<<<<<<<<<<
 *     # type: (...) -> Optional[Any]
 *     return None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.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/worker/operations.py":548
 *     return None
 * 
 *   def current_element_progress(self):             # <<<<<<<<<<<<<<
 *     return None
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_23current_element_progress(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_23current_element_progress = {"current_element_progress", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_23current_element_progress, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_23current_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_6worker_10operations_9Operation_22current_element_progress(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_22current_element_progress(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__39)
  __Pyx_RefNannySetupContext("current_element_progress", 0);
  __Pyx_TraceCall("current_element_progress", __pyx_f[0], 548, 0, __PYX_ERR(0, 548, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":549
 * 
 *   def current_element_progress(self):
 *     return None             # <<<<<<<<<<<<<<
 * 
 *   def finish(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "apache_beam/runners/worker/operations.py":548
 *     return None
 * 
 *   def current_element_progress(self):             # <<<<<<<<<<<<<<
 *     return None
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.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/worker/operations.py":551
 *     return None
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 * 
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_25finish(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_receiver = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__40)
  __Pyx_RefNannySetupContext("finish", 0);
  __Pyx_TraceCall("finish", __pyx_f[0], 551, 0, __PYX_ERR(0, 551, __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_finish); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 551, __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_6worker_10operations_9Operation_25finish)) {
        __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, 551, __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/worker/operations.py":555
 * 
 *     """Finish operation."""
 *     for receiver in self.receivers:             # <<<<<<<<<<<<<<
 *       _cast_to_receiver(receiver).flush()
 * 
 */
  if (unlikely(__pyx_v_self->receivers == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 555, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_v_self->receivers; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
  for (;;) {
    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, 555, __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, 555, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_receiver, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "apache_beam/runners/worker/operations.py":556
 *     """Finish operation."""
 *     for receiver in self.receivers:
 *       _cast_to_receiver(receiver).flush()             # <<<<<<<<<<<<<<
 * 
 *   def teardown(self):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_cast_to_receiver); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 556, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(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_v_receiver) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_receiver);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 556, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_flush); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 556, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    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_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 556, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/runners/worker/operations.py":555
 * 
 *     """Finish operation."""
 *     for receiver in self.receivers:             # <<<<<<<<<<<<<<
 *       _cast_to_receiver(receiver).flush()
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":551
 *     return None
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.finish", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_receiver);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_25finish(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_24finish[] = "Finish operation.";
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_25finish = {"finish", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_25finish, METH_NOARGS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_24finish};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_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_6worker_10operations_9Operation_24finish(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_24finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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("finish", 0);
  __Pyx_TraceCall("finish (wrapper)", __pyx_f[0], 551, 0, __PYX_ERR(0, 551, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_finish(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.finish", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":558
 *       _cast_to_receiver(receiver).flush()
 * 
 *   def teardown(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 * 
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_27teardown(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_teardown(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__41)
  __Pyx_RefNannySetupContext("teardown", 0);
  __Pyx_TraceCall("teardown", __pyx_f[0], 558, 0, __PYX_ERR(0, 558, __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_teardown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 558, __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_6worker_10operations_9Operation_27teardown)) {
        __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, 558, __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/worker/operations.py":561
 *     # type: () -> None
 * 
 *     """Tear down operation.             # <<<<<<<<<<<<<<
 * 
 *     No other methods of this operation should be called after this."""
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.teardown", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":558
 *       _cast_to_receiver(receiver).flush()
 * 
 *   def teardown(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_27teardown(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_26teardown[] = "Tear down operation.\n\n    No other methods of this operation should be called after this.";
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_27teardown = {"teardown", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_27teardown, METH_NOARGS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_26teardown};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_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_6worker_10operations_9Operation_26teardown(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_26teardown(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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("teardown", 0);
  __Pyx_TraceCall("teardown (wrapper)", __pyx_f[0], 558, 0, __PYX_ERR(0, 558, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_teardown(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.teardown", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":566
 *     pass
 * 
 *   def reset(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     self.metrics_container.reset()
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_29reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_29reset = {"reset", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_29reset, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_29reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_28reset(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_28reset(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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("reset", 0);
  __Pyx_TraceCall("reset", __pyx_f[0], 566, 0, __PYX_ERR(0, 566, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":568
 *   def reset(self):
 *     # type: () -> None
 *     self.metrics_container.reset()             # <<<<<<<<<<<<<<
 * 
 *   def output(self, windowed_value, output_index=0):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->metrics_container, __pyx_n_s_reset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 568, __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, 568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":566
 *     pass
 * 
 *   def reset(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     self.metrics_container.reset()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":570
 *     self.metrics_container.reset()
 * 
 *   def output(self, windowed_value, output_index=0):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue, int) -> None
 *     _cast_to_receiver(self.receivers[output_index]).receive(windowed_value)
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_31output(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_output(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_7runners_6worker_10operations_9Operation_output *__pyx_optional_args) {
  int __pyx_v_output_index = ((int)0);
  PyObject *__pyx_r = NULL;
  __Pyx_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;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__43)
  __Pyx_RefNannySetupContext("output", 0);
  __Pyx_TraceCall("output", __pyx_f[0], 570, 0, __PYX_ERR(0, 570, __pyx_L1_error));
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_output_index = __pyx_optional_args->output_index;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (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_output); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __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_6worker_10operations_9Operation_31output)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_output_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 570, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
        __pyx_t_6 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(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_6 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_4)) {
          PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_windowed_value), __pyx_t_3};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 570, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
          PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_windowed_value), __pyx_t_3};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 570, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        } else
        #endif
        {
          __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 570, __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(((PyObject *)__pyx_v_windowed_value));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_windowed_value));
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_windowed_value));
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3);
          __pyx_t_3 = 0;
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 570, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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/worker/operations.py":572
 *   def output(self, windowed_value, output_index=0):
 *     # type: (WindowedValue, int) -> None
 *     _cast_to_receiver(self.receivers[output_index]).receive(windowed_value)             # <<<<<<<<<<<<<<
 * 
 *   def add_receiver(self, operation, output_index=0):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_cast_to_receiver); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (unlikely(__pyx_v_self->receivers == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 572, __pyx_L1_error)
  }
  __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_self->receivers, __pyx_v_output_index, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(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_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_receive); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 572, __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 && 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_Call2Args(__pyx_t_4, __pyx_t_2, ((PyObject *)__pyx_v_windowed_value)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_windowed_value));
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":570
 *     self.metrics_container.reset()
 * 
 *   def output(self, windowed_value, output_index=0):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue, int) -> None
 *     _cast_to_receiver(self.receivers[output_index]).receive(windowed_value)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.output", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_31output(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_31output = {"output", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_31output, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_31output(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value = 0;
  int __pyx_v_output_index;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("output (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_windowed_value,&__pyx_n_s_output_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_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_output_index);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "output") < 0)) __PYX_ERR(0, 570, __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_windowed_value = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)values[0]);
    if (values[1]) {
      __pyx_v_output_index = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_output_index == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 570, __pyx_L3_error)
    } else {
      __pyx_v_output_index = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("output", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 570, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.output", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_windowed_value), __pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, 1, "windowed_value", 0))) __PYX_ERR(0, 570, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_30output(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), __pyx_v_windowed_value, __pyx_v_output_index);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_30output(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, int __pyx_v_output_index) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_11apache_beam_7runners_6worker_10operations_9Operation_output __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__43)
  __Pyx_RefNannySetupContext("output", 0);
  __Pyx_TraceCall("output (wrapper)", __pyx_f[0], 570, 0, __PYX_ERR(0, 570, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.output_index = __pyx_v_output_index;
  __pyx_t_1 = __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_Operation->output(__pyx_v_self, __pyx_v_windowed_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.output", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":574
 *     _cast_to_receiver(self.receivers[output_index]).receive(windowed_value)
 * 
 *   def add_receiver(self, operation, output_index=0):             # <<<<<<<<<<<<<<
 *     # type: (Operation, int) -> None
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_33add_receiver(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_32add_receiver[] = "Adds a receiver operation for the specified output.";
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_33add_receiver = {"add_receiver", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_33add_receiver, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_32add_receiver};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_33add_receiver(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_operation = 0;
  PyObject *__pyx_v_output_index = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_receiver (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_operation,&__pyx_n_s_output_index,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)__pyx_int_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_operation)) != 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_output_index);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_receiver") < 0)) __PYX_ERR(0, 574, __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_operation = values[0];
    __pyx_v_output_index = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_receiver", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 574, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.add_receiver", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_32add_receiver(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), __pyx_v_operation, __pyx_v_output_index);

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_32add_receiver(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_operation, PyObject *__pyx_v_output_index) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__44)
  __Pyx_RefNannySetupContext("add_receiver", 0);
  __Pyx_TraceCall("add_receiver", __pyx_f[0], 574, 0, __PYX_ERR(0, 574, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":578
 * 
 *     """Adds a receiver operation for the specified output."""
 *     self.consumers[output_index].append(operation)             # <<<<<<<<<<<<<<
 * 
 *   def monitoring_infos(self, transform_id, tag_to_pcollection_id):
 */
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_self->consumers, __pyx_v_output_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_v_operation); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 578, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":574
 *     _cast_to_receiver(self.receivers[output_index]).receive(windowed_value)
 * 
 *   def add_receiver(self, operation, output_index=0):             # <<<<<<<<<<<<<<
 *     # type: (Operation, int) -> None
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.add_receiver", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":580
 *     self.consumers[output_index].append(operation)
 * 
 *   def monitoring_infos(self, transform_id, tag_to_pcollection_id):             # <<<<<<<<<<<<<<
 *     # type: (str, Dict[str, str]) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo]
 * 
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_35monitoring_infos(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_transform_id, PyObject *__pyx_v_tag_to_pcollection_id, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_all_monitoring_infos = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_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("monitoring_infos", 0);
  __Pyx_TraceCall("monitoring_infos", __pyx_f[0], 580, 0, __PYX_ERR(0, 580, __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_monitoring_infos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 580, __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_6worker_10operations_9Operation_35monitoring_infos)) {
        __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_transform_id, __pyx_v_tag_to_pcollection_id};
          __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, 580, __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_transform_id, __pyx_v_tag_to_pcollection_id};
          __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, 580, __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, 580, __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_transform_id);
          __Pyx_GIVEREF(__pyx_v_transform_id);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_transform_id);
          __Pyx_INCREF(__pyx_v_tag_to_pcollection_id);
          __Pyx_GIVEREF(__pyx_v_tag_to_pcollection_id);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_tag_to_pcollection_id);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 580, __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/worker/operations.py":584
 * 
 *     """Returns the list of MonitoringInfos collected by this operation."""
 *     all_monitoring_infos = self.execution_time_monitoring_infos(transform_id)             # <<<<<<<<<<<<<<
 *     all_monitoring_infos.update(
 *         self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self->__pyx_vtab)->execution_time_monitoring_infos(__pyx_v_self, __pyx_v_transform_id, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_all_monitoring_infos = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":585
 *     """Returns the list of MonitoringInfos collected by this operation."""
 *     all_monitoring_infos = self.execution_time_monitoring_infos(transform_id)
 *     all_monitoring_infos.update(             # <<<<<<<<<<<<<<
 *         self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
 *     all_monitoring_infos.update(self.user_monitoring_infos(transform_id))
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_all_monitoring_infos, __pyx_n_s_update); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "apache_beam/runners/worker/operations.py":586
 *     all_monitoring_infos = self.execution_time_monitoring_infos(transform_id)
 *     all_monitoring_infos.update(
 *         self.pcollection_count_monitoring_infos(tag_to_pcollection_id))             # <<<<<<<<<<<<<<
 *     all_monitoring_infos.update(self.user_monitoring_infos(transform_id))
 *     return all_monitoring_infos
 */
  __pyx_t_3 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self->__pyx_vtab)->pcollection_count_monitoring_infos(__pyx_v_self, __pyx_v_tag_to_pcollection_id, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = NULL;
  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_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":587
 *     all_monitoring_infos.update(
 *         self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
 *     all_monitoring_infos.update(self.user_monitoring_infos(transform_id))             # <<<<<<<<<<<<<<
 *     return all_monitoring_infos
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_all_monitoring_infos, __pyx_n_s_update); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self->__pyx_vtab)->user_monitoring_infos(__pyx_v_self, __pyx_v_transform_id, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = NULL;
  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_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 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/worker/operations.py":588
 *         self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
 *     all_monitoring_infos.update(self.user_monitoring_infos(transform_id))
 *     return all_monitoring_infos             # <<<<<<<<<<<<<<
 * 
 *   def pcollection_count_monitoring_infos(self, tag_to_pcollection_id):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_all_monitoring_infos);
  __pyx_r = __pyx_v_all_monitoring_infos;
  goto __pyx_L0;

  /* "apache_beam/runners/worker/operations.py":580
 *     self.consumers[output_index].append(operation)
 * 
 *   def monitoring_infos(self, transform_id, tag_to_pcollection_id):             # <<<<<<<<<<<<<<
 *     # type: (str, Dict[str, str]) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.monitoring_infos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_all_monitoring_infos);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_35monitoring_infos(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_34monitoring_infos[] = "Returns the list of MonitoringInfos collected by this operation.";
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_35monitoring_infos = {"monitoring_infos", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_35monitoring_infos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_34monitoring_infos};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_35monitoring_infos(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_transform_id = 0;
  PyObject *__pyx_v_tag_to_pcollection_id = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("monitoring_infos (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_transform_id,&__pyx_n_s_tag_to_pcollection_id,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_transform_id)) != 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_tag_to_pcollection_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("monitoring_infos", 1, 2, 2, 1); __PYX_ERR(0, 580, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "monitoring_infos") < 0)) __PYX_ERR(0, 580, __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_transform_id = values[0];
    __pyx_v_tag_to_pcollection_id = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("monitoring_infos", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 580, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.monitoring_infos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_34monitoring_infos(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), __pyx_v_transform_id, __pyx_v_tag_to_pcollection_id);

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_34monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_transform_id, PyObject *__pyx_v_tag_to_pcollection_id) {
  PyObject *__pyx_r = NULL;
  __Pyx_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("monitoring_infos", 0);
  __Pyx_TraceCall("monitoring_infos (wrapper)", __pyx_f[0], 580, 0, __PYX_ERR(0, 580, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_monitoring_infos(__pyx_v_self, __pyx_v_transform_id, __pyx_v_tag_to_pcollection_id, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.monitoring_infos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":590
 *     return all_monitoring_infos
 * 
 *   def pcollection_count_monitoring_infos(self, tag_to_pcollection_id):             # <<<<<<<<<<<<<<
 *     # type: (Dict[str, str]) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo]
 * 
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_37pcollection_count_monitoring_infos(PyObject *__pyx_v_self, PyObject *__pyx_v_tag_to_pcollection_id); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_pcollection_count_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_tag_to_pcollection_id, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_all_monitoring_infos = NULL;
  PyObject *__pyx_v_pcollection_id = NULL;
  PyObject *__pyx_v_receiver = NULL;
  PyObject *__pyx_v_elem_count_mi = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_unused_mean = NULL;
  PyObject *__pyx_v_sum = NULL;
  PyObject *__pyx_v_count = NULL;
  PyObject *__pyx_v_min = NULL;
  PyObject *__pyx_v_max = NULL;
  PyObject *__pyx_v_sampled_byte_count = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_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;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *(*__pyx_t_11)(PyObject *);
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__46)
  __Pyx_RefNannySetupContext("pcollection_count_monitoring_infos", 0);
  __Pyx_TraceCall("pcollection_count_monitoring_infos", __pyx_f[0], 590, 0, __PYX_ERR(0, 590, __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_pcollection_count_monitoring_inf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 590, __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_6worker_10operations_9Operation_37pcollection_count_monitoring_infos)) {
        __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_tag_to_pcollection_id) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_tag_to_pcollection_id);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 590, __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/worker/operations.py":598
 *     # since there is no way to provide a mapping from tag to pcollection id
 *     # within Operation.
 *     if len(self.receivers) != 1 or len(tag_to_pcollection_id) != 1:             # <<<<<<<<<<<<<<
 *       return {}
 * 
 */
  __pyx_t_1 = __pyx_v_self->receivers;
  __Pyx_INCREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 598, __pyx_L1_error)
  }
  __pyx_t_6 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 598, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = ((__pyx_t_6 != 1) != 0);
  if (!__pyx_t_7) {
  } else {
    __pyx_t_5 = __pyx_t_7;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = PyObject_Length(__pyx_v_tag_to_pcollection_id); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 598, __pyx_L1_error)
  __pyx_t_7 = ((__pyx_t_6 != 1) != 0);
  __pyx_t_5 = __pyx_t_7;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {

    /* "apache_beam/runners/worker/operations.py":599
 *     # within Operation.
 *     if len(self.receivers) != 1 or len(tag_to_pcollection_id) != 1:
 *       return {}             # <<<<<<<<<<<<<<
 * 
 *     all_monitoring_infos = {}
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 599, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "apache_beam/runners/worker/operations.py":598
 *     # since there is no way to provide a mapping from tag to pcollection id
 *     # within Operation.
 *     if len(self.receivers) != 1 or len(tag_to_pcollection_id) != 1:             # <<<<<<<<<<<<<<
 *       return {}
 * 
 */
  }

  /* "apache_beam/runners/worker/operations.py":601
 *       return {}
 * 
 *     all_monitoring_infos = {}             # <<<<<<<<<<<<<<
 *     pcollection_id = next(iter(tag_to_pcollection_id.values()))
 *     receiver = self.receivers[0]
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_all_monitoring_infos = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":602
 * 
 *     all_monitoring_infos = {}
 *     pcollection_id = next(iter(tag_to_pcollection_id.values()))             # <<<<<<<<<<<<<<
 *     receiver = self.receivers[0]
 *     elem_count_mi = monitoring_infos.int64_counter(
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_tag_to_pcollection_id, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 602, __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, 602, __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, 602, __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, 602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_pcollection_id = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":603
 *     all_monitoring_infos = {}
 *     pcollection_id = next(iter(tag_to_pcollection_id.values()))
 *     receiver = self.receivers[0]             # <<<<<<<<<<<<<<
 *     elem_count_mi = monitoring_infos.int64_counter(
 *         monitoring_infos.ELEMENT_COUNT_URN,
 */
  if (unlikely(__pyx_v_self->receivers == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 603, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->receivers, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_receiver = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":604
 *     pcollection_id = next(iter(tag_to_pcollection_id.values()))
 *     receiver = self.receivers[0]
 *     elem_count_mi = monitoring_infos.int64_counter(             # <<<<<<<<<<<<<<
 *         monitoring_infos.ELEMENT_COUNT_URN,
 *         receiver.opcounter.element_counter.value(),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_monitoring_infos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int64_counter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":605
 *     receiver = self.receivers[0]
 *     elem_count_mi = monitoring_infos.int64_counter(
 *         monitoring_infos.ELEMENT_COUNT_URN,             # <<<<<<<<<<<<<<
 *         receiver.opcounter.element_counter.value(),
 *         pcollection=pcollection_id,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_monitoring_infos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ELEMENT_COUNT_URN); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":606
 *     elem_count_mi = monitoring_infos.int64_counter(
 *         monitoring_infos.ELEMENT_COUNT_URN,
 *         receiver.opcounter.element_counter.value(),             # <<<<<<<<<<<<<<
 *         pcollection=pcollection_id,
 *     )
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_receiver, __pyx_n_s_opcounter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_element_counter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "apache_beam/runners/worker/operations.py":604
 *     pcollection_id = next(iter(tag_to_pcollection_id.values()))
 *     receiver = self.receivers[0]
 *     elem_count_mi = monitoring_infos.int64_counter(             # <<<<<<<<<<<<<<
 *         monitoring_infos.ELEMENT_COUNT_URN,
 *         receiver.opcounter.element_counter.value(),
 */
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 604, __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_1);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
  __pyx_t_3 = 0;
  __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":607
 *         monitoring_infos.ELEMENT_COUNT_URN,
 *         receiver.opcounter.element_counter.value(),
 *         pcollection=pcollection_id,             # <<<<<<<<<<<<<<
 *     )
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_pcollection, __pyx_v_pcollection_id) < 0) __PYX_ERR(0, 607, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":604
 *     pcollection_id = next(iter(tag_to_pcollection_id.values()))
 *     receiver = self.receivers[0]
 *     elem_count_mi = monitoring_infos.int64_counter(             # <<<<<<<<<<<<<<
 *         monitoring_infos.ELEMENT_COUNT_URN,
 *         receiver.opcounter.element_counter.value(),
 */
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_elem_count_mi = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "apache_beam/runners/worker/operations.py":611
 * 
 *     (unused_mean, sum, count, min, max) = (
 *         receiver.opcounter.mean_byte_counter.value())             # <<<<<<<<<<<<<<
 * 
 *     sampled_byte_count = monitoring_infos.int64_distribution(
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_receiver, __pyx_n_s_opcounter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_mean_byte_counter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __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_3 = (__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_3)) __PYX_ERR(0, 611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
    PyObject* sequence = __pyx_t_3;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 5)) {
      if (size > 5) __Pyx_RaiseTooManyValuesError(5);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 610, __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_4 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 2); 
      __pyx_t_8 = PyTuple_GET_ITEM(sequence, 3); 
      __pyx_t_9 = PyTuple_GET_ITEM(sequence, 4); 
    } else {
      __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 2); 
      __pyx_t_8 = PyList_GET_ITEM(sequence, 3); 
      __pyx_t_9 = PyList_GET_ITEM(sequence, 4); 
    }
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_t_9);
    #else
    {
      Py_ssize_t i;
      PyObject** temps[5] = {&__pyx_t_1,&__pyx_t_4,&__pyx_t_2,&__pyx_t_8,&__pyx_t_9};
      for (i=0; i < 5; i++) {
        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 610, __pyx_L1_error)
        __Pyx_GOTREF(item);
        *(temps[i]) = item;
      }
    }
    #endif
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    Py_ssize_t index = -1;
    PyObject** temps[5] = {&__pyx_t_1,&__pyx_t_4,&__pyx_t_2,&__pyx_t_8,&__pyx_t_9};
    __pyx_t_10 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 610, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext;
    for (index=0; index < 5; index++) {
      PyObject* item = __pyx_t_11(__pyx_t_10); if (unlikely(!item)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(item);
      *(temps[index]) = item;
    }
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 5) < 0) __PYX_ERR(0, 610, __pyx_L1_error)
    __pyx_t_11 = NULL;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    goto __pyx_L7_unpacking_done;
    __pyx_L6_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_11 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 610, __pyx_L1_error)
    __pyx_L7_unpacking_done:;
  }

  /* "apache_beam/runners/worker/operations.py":610
 *     )
 * 
 *     (unused_mean, sum, count, min, max) = (             # <<<<<<<<<<<<<<
 *         receiver.opcounter.mean_byte_counter.value())
 * 
 */
  __pyx_v_unused_mean = __pyx_t_1;
  __pyx_t_1 = 0;
  __pyx_v_sum = __pyx_t_4;
  __pyx_t_4 = 0;
  __pyx_v_count = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_min = __pyx_t_8;
  __pyx_t_8 = 0;
  __pyx_v_max = __pyx_t_9;
  __pyx_t_9 = 0;

  /* "apache_beam/runners/worker/operations.py":613
 *         receiver.opcounter.mean_byte_counter.value())
 * 
 *     sampled_byte_count = monitoring_infos.int64_distribution(             # <<<<<<<<<<<<<<
 *         monitoring_infos.SAMPLED_BYTE_SIZE_URN,
 *         DistributionData(sum, count, min, max),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_monitoring_infos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int64_distribution); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "apache_beam/runners/worker/operations.py":614
 * 
 *     sampled_byte_count = monitoring_infos.int64_distribution(
 *         monitoring_infos.SAMPLED_BYTE_SIZE_URN,             # <<<<<<<<<<<<<<
 *         DistributionData(sum, count, min, max),
 *         pcollection=pcollection_id,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_monitoring_infos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_SAMPLED_BYTE_SIZE_URN); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "apache_beam/runners/worker/operations.py":615
 *     sampled_byte_count = monitoring_infos.int64_distribution(
 *         monitoring_infos.SAMPLED_BYTE_SIZE_URN,
 *         DistributionData(sum, count, min, max),             # <<<<<<<<<<<<<<
 *         pcollection=pcollection_id,
 *     )
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DistributionData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_12 = 0;
  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_12 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_4, __pyx_v_sum, __pyx_v_count, __pyx_v_min, __pyx_v_max};
    __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_12, 4+__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 615, __pyx_L1_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_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_4, __pyx_v_sum, __pyx_v_count, __pyx_v_min, __pyx_v_max};
    __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_12, 4+__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 615, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else
  #endif
  {
    __pyx_t_1 = PyTuple_New(4+__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 615, __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_INCREF(__pyx_v_sum);
    __Pyx_GIVEREF(__pyx_v_sum);
    PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_12, __pyx_v_sum);
    __Pyx_INCREF(__pyx_v_count);
    __Pyx_GIVEREF(__pyx_v_count);
    PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_12, __pyx_v_count);
    __Pyx_INCREF(__pyx_v_min);
    __Pyx_GIVEREF(__pyx_v_min);
    PyTuple_SET_ITEM(__pyx_t_1, 2+__pyx_t_12, __pyx_v_min);
    __Pyx_INCREF(__pyx_v_max);
    __Pyx_GIVEREF(__pyx_v_max);
    PyTuple_SET_ITEM(__pyx_t_1, 3+__pyx_t_12, __pyx_v_max);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 615, __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;

  /* "apache_beam/runners/worker/operations.py":613
 *         receiver.opcounter.mean_byte_counter.value())
 * 
 *     sampled_byte_count = monitoring_infos.int64_distribution(             # <<<<<<<<<<<<<<
 *         monitoring_infos.SAMPLED_BYTE_SIZE_URN,
 *         DistributionData(sum, count, min, max),
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
  __pyx_t_8 = 0;
  __pyx_t_3 = 0;

  /* "apache_beam/runners/worker/operations.py":616
 *         monitoring_infos.SAMPLED_BYTE_SIZE_URN,
 *         DistributionData(sum, count, min, max),
 *         pcollection=pcollection_id,             # <<<<<<<<<<<<<<
 *     )
 *     all_monitoring_infos[monitoring_infos.to_key(elem_count_mi)] = elem_count_mi
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_pcollection, __pyx_v_pcollection_id) < 0) __PYX_ERR(0, 616, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":613
 *         receiver.opcounter.mean_byte_counter.value())
 * 
 *     sampled_byte_count = monitoring_infos.int64_distribution(             # <<<<<<<<<<<<<<
 *         monitoring_infos.SAMPLED_BYTE_SIZE_URN,
 *         DistributionData(sum, count, min, max),
 */
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_sampled_byte_count = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "apache_beam/runners/worker/operations.py":618
 *         pcollection=pcollection_id,
 *     )
 *     all_monitoring_infos[monitoring_infos.to_key(elem_count_mi)] = elem_count_mi             # <<<<<<<<<<<<<<
 *     all_monitoring_infos[monitoring_infos.to_key(
 *         sampled_byte_count)] = sampled_byte_count
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_monitoring_infos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_to_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 618, __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 && unlikely(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_8 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_elem_count_mi) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_elem_count_mi);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(PyDict_SetItem(__pyx_v_all_monitoring_infos, __pyx_t_8, __pyx_v_elem_count_mi) < 0)) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "apache_beam/runners/worker/operations.py":619
 *     )
 *     all_monitoring_infos[monitoring_infos.to_key(elem_count_mi)] = elem_count_mi
 *     all_monitoring_infos[monitoring_infos.to_key(             # <<<<<<<<<<<<<<
 *         sampled_byte_count)] = sampled_byte_count
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_monitoring_infos); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_to_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":620
 *     all_monitoring_infos[monitoring_infos.to_key(elem_count_mi)] = elem_count_mi
 *     all_monitoring_infos[monitoring_infos.to_key(
 *         sampled_byte_count)] = sampled_byte_count             # <<<<<<<<<<<<<<
 * 
 *     return all_monitoring_infos
 */
  __pyx_t_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_8 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_sampled_byte_count) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_sampled_byte_count);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(PyDict_SetItem(__pyx_v_all_monitoring_infos, __pyx_t_8, __pyx_v_sampled_byte_count) < 0)) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "apache_beam/runners/worker/operations.py":622
 *         sampled_byte_count)] = sampled_byte_count
 * 
 *     return all_monitoring_infos             # <<<<<<<<<<<<<<
 * 
 *   def user_monitoring_infos(self, transform_id):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_all_monitoring_infos);
  __pyx_r = __pyx_v_all_monitoring_infos;
  goto __pyx_L0;

  /* "apache_beam/runners/worker/operations.py":590
 *     return all_monitoring_infos
 * 
 *   def pcollection_count_monitoring_infos(self, tag_to_pcollection_id):             # <<<<<<<<<<<<<<
 *     # type: (Dict[str, str]) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_all_monitoring_infos);
  __Pyx_XDECREF(__pyx_v_pcollection_id);
  __Pyx_XDECREF(__pyx_v_receiver);
  __Pyx_XDECREF(__pyx_v_elem_count_mi);
  __Pyx_XDECREF(__pyx_v_unused_mean);
  __Pyx_XDECREF(__pyx_v_sum);
  __Pyx_XDECREF(__pyx_v_count);
  __Pyx_XDECREF(__pyx_v_min);
  __Pyx_XDECREF(__pyx_v_max);
  __Pyx_XDECREF(__pyx_v_sampled_byte_count);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_37pcollection_count_monitoring_infos(PyObject *__pyx_v_self, PyObject *__pyx_v_tag_to_pcollection_id); /*proto*/
static char __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_36pcollection_count_monitoring_infos[] = "Returns the element count MonitoringInfo collected by this operation.";
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_37pcollection_count_monitoring_infos = {"pcollection_count_monitoring_infos", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_37pcollection_count_monitoring_infos, METH_O, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_36pcollection_count_monitoring_infos};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_37pcollection_count_monitoring_infos(PyObject *__pyx_v_self, PyObject *__pyx_v_tag_to_pcollection_id) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pcollection_count_monitoring_infos (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_36pcollection_count_monitoring_infos(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), ((PyObject *)__pyx_v_tag_to_pcollection_id));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_36pcollection_count_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_tag_to_pcollection_id) {
  PyObject *__pyx_r = NULL;
  __Pyx_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("pcollection_count_monitoring_infos", 0);
  __Pyx_TraceCall("pcollection_count_monitoring_infos (wrapper)", __pyx_f[0], 590, 0, __PYX_ERR(0, 590, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_pcollection_count_monitoring_infos(__pyx_v_self, __pyx_v_tag_to_pcollection_id, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":624
 *     return all_monitoring_infos
 * 
 *   def user_monitoring_infos(self, transform_id):             # <<<<<<<<<<<<<<
 *     # type: (str) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo]
 * 
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_39user_monitoring_infos(PyObject *__pyx_v_self, PyObject *__pyx_v_transform_id); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_user_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_transform_id, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_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("user_monitoring_infos", 0);
  __Pyx_TraceCall("user_monitoring_infos", __pyx_f[0], 624, 0, __PYX_ERR(0, 624, __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_user_monitoring_infos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 624, __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_6worker_10operations_9Operation_39user_monitoring_infos)) {
        __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_transform_id) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_transform_id);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        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_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/worker/operations.py":628
 * 
 *     """Returns the user MonitoringInfos collected by this operation."""
 *     return self.metrics_container.to_runner_api_monitoring_infos(transform_id)             # <<<<<<<<<<<<<<
 * 
 *   def execution_time_monitoring_infos(self, transform_id):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->metrics_container, __pyx_n_s_to_runner_api_monitoring_infos); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 628, __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_id) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_transform_id);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/runners/worker/operations.py":624
 *     return all_monitoring_infos
 * 
 *   def user_monitoring_infos(self, transform_id):             # <<<<<<<<<<<<<<
 *     # type: (str) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.user_monitoring_infos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_39user_monitoring_infos(PyObject *__pyx_v_self, PyObject *__pyx_v_transform_id); /*proto*/
static char __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_38user_monitoring_infos[] = "Returns the user MonitoringInfos collected by this operation.";
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_39user_monitoring_infos = {"user_monitoring_infos", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_39user_monitoring_infos, METH_O, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_38user_monitoring_infos};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_39user_monitoring_infos(PyObject *__pyx_v_self, PyObject *__pyx_v_transform_id) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("user_monitoring_infos (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_38user_monitoring_infos(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), ((PyObject *)__pyx_v_transform_id));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_38user_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_transform_id) {
  PyObject *__pyx_r = NULL;
  __Pyx_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("user_monitoring_infos", 0);
  __Pyx_TraceCall("user_monitoring_infos (wrapper)", __pyx_f[0], 624, 0, __PYX_ERR(0, 624, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_user_monitoring_infos(__pyx_v_self, __pyx_v_transform_id, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.user_monitoring_infos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":630
 *     return self.metrics_container.to_runner_api_monitoring_infos(transform_id)
 * 
 *   def execution_time_monitoring_infos(self, transform_id):             # <<<<<<<<<<<<<<
 *     # type: (str) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo]
 *     total_time_spent_msecs = (
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_41execution_time_monitoring_infos(PyObject *__pyx_v_self, PyObject *__pyx_v_transform_id); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_execution_time_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_transform_id, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_total_time_spent_msecs = NULL;
  PyObject *__pyx_v_mis = NULL;
  PyObject *__pyx_8genexpr1__pyx_v_mi = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_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;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__48)
  __Pyx_RefNannySetupContext("execution_time_monitoring_infos", 0);
  __Pyx_TraceCall("execution_time_monitoring_infos", __pyx_f[0], 630, 0, __PYX_ERR(0, 630, __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_execution_time_monitoring_infos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 630, __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_6worker_10operations_9Operation_41execution_time_monitoring_infos)) {
        __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_transform_id) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_transform_id);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 630, __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/worker/operations.py":633
 *     # type: (str) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo]
 *     total_time_spent_msecs = (
 *         self.scoped_start_state.sampled_msecs_int() +             # <<<<<<<<<<<<<<
 *         self.scoped_process_state.sampled_msecs_int() +
 *         self.scoped_finish_state.sampled_msecs_int())
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->scoped_start_state, __pyx_n_s_sampled_msecs_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 633, __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, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":634
 *     total_time_spent_msecs = (
 *         self.scoped_start_state.sampled_msecs_int() +
 *         self.scoped_process_state.sampled_msecs_int() +             # <<<<<<<<<<<<<<
 *         self.scoped_finish_state.sampled_msecs_int())
 *     mis = [
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->scoped_process_state, __pyx_n_s_sampled_msecs_int); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 634, __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_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, 634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "apache_beam/runners/worker/operations.py":633
 *     # type: (str) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo]
 *     total_time_spent_msecs = (
 *         self.scoped_start_state.sampled_msecs_int() +             # <<<<<<<<<<<<<<
 *         self.scoped_process_state.sampled_msecs_int() +
 *         self.scoped_finish_state.sampled_msecs_int())
 */
  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 633, __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;

  /* "apache_beam/runners/worker/operations.py":635
 *         self.scoped_start_state.sampled_msecs_int() +
 *         self.scoped_process_state.sampled_msecs_int() +
 *         self.scoped_finish_state.sampled_msecs_int())             # <<<<<<<<<<<<<<
 *     mis = [
 *         monitoring_infos.int64_counter(
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->scoped_finish_state, __pyx_n_s_sampled_msecs_int); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 635, __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, 635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":634
 *     total_time_spent_msecs = (
 *         self.scoped_start_state.sampled_msecs_int() +
 *         self.scoped_process_state.sampled_msecs_int() +             # <<<<<<<<<<<<<<
 *         self.scoped_finish_state.sampled_msecs_int())
 *     mis = [
 */
  __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_total_time_spent_msecs = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":637
 *         self.scoped_finish_state.sampled_msecs_int())
 *     mis = [
 *         monitoring_infos.int64_counter(             # <<<<<<<<<<<<<<
 *             monitoring_infos.START_BUNDLE_MSECS_URN,
 *             self.scoped_start_state.sampled_msecs_int(),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_monitoring_infos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int64_counter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":638
 *     mis = [
 *         monitoring_infos.int64_counter(
 *             monitoring_infos.START_BUNDLE_MSECS_URN,             # <<<<<<<<<<<<<<
 *             self.scoped_start_state.sampled_msecs_int(),
 *             ptransform=transform_id),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_monitoring_infos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_START_BUNDLE_MSECS_URN); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":639
 *         monitoring_infos.int64_counter(
 *             monitoring_infos.START_BUNDLE_MSECS_URN,
 *             self.scoped_start_state.sampled_msecs_int(),             # <<<<<<<<<<<<<<
 *             ptransform=transform_id),
 *         monitoring_infos.int64_counter(
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->scoped_start_state, __pyx_n_s_sampled_msecs_int); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 639, __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_1 = (__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_1)) __PYX_ERR(0, 639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "apache_beam/runners/worker/operations.py":637
 *         self.scoped_finish_state.sampled_msecs_int())
 *     mis = [
 *         monitoring_infos.int64_counter(             # <<<<<<<<<<<<<<
 *             monitoring_infos.START_BUNDLE_MSECS_URN,
 *             self.scoped_start_state.sampled_msecs_int(),
 */
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 637, __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_1);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
  __pyx_t_3 = 0;
  __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":640
 *             monitoring_infos.START_BUNDLE_MSECS_URN,
 *             self.scoped_start_state.sampled_msecs_int(),
 *             ptransform=transform_id),             # <<<<<<<<<<<<<<
 *         monitoring_infos.int64_counter(
 *             monitoring_infos.PROCESS_BUNDLE_MSECS_URN,
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptransform, __pyx_v_transform_id) < 0) __PYX_ERR(0, 640, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":637
 *         self.scoped_finish_state.sampled_msecs_int())
 *     mis = [
 *         monitoring_infos.int64_counter(             # <<<<<<<<<<<<<<
 *             monitoring_infos.START_BUNDLE_MSECS_URN,
 *             self.scoped_start_state.sampled_msecs_int(),
 */
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":641
 *             self.scoped_start_state.sampled_msecs_int(),
 *             ptransform=transform_id),
 *         monitoring_infos.int64_counter(             # <<<<<<<<<<<<<<
 *             monitoring_infos.PROCESS_BUNDLE_MSECS_URN,
 *             self.scoped_process_state.sampled_msecs_int(),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_monitoring_infos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int64_counter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":642
 *             ptransform=transform_id),
 *         monitoring_infos.int64_counter(
 *             monitoring_infos.PROCESS_BUNDLE_MSECS_URN,             # <<<<<<<<<<<<<<
 *             self.scoped_process_state.sampled_msecs_int(),
 *             ptransform=transform_id),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_monitoring_infos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_PROCESS_BUNDLE_MSECS_URN); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":643
 *         monitoring_infos.int64_counter(
 *             monitoring_infos.PROCESS_BUNDLE_MSECS_URN,
 *             self.scoped_process_state.sampled_msecs_int(),             # <<<<<<<<<<<<<<
 *             ptransform=transform_id),
 *         monitoring_infos.int64_counter(
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->scoped_process_state, __pyx_n_s_sampled_msecs_int); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 643, __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_1 = (__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_1)) __PYX_ERR(0, 643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "apache_beam/runners/worker/operations.py":641
 *             self.scoped_start_state.sampled_msecs_int(),
 *             ptransform=transform_id),
 *         monitoring_infos.int64_counter(             # <<<<<<<<<<<<<<
 *             monitoring_infos.PROCESS_BUNDLE_MSECS_URN,
 *             self.scoped_process_state.sampled_msecs_int(),
 */
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 641, __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/worker/operations.py":644
 *             monitoring_infos.PROCESS_BUNDLE_MSECS_URN,
 *             self.scoped_process_state.sampled_msecs_int(),
 *             ptransform=transform_id),             # <<<<<<<<<<<<<<
 *         monitoring_infos.int64_counter(
 *             monitoring_infos.FINISH_BUNDLE_MSECS_URN,
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptransform, __pyx_v_transform_id) < 0) __PYX_ERR(0, 644, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":641
 *             self.scoped_start_state.sampled_msecs_int(),
 *             ptransform=transform_id),
 *         monitoring_infos.int64_counter(             # <<<<<<<<<<<<<<
 *             monitoring_infos.PROCESS_BUNDLE_MSECS_URN,
 *             self.scoped_process_state.sampled_msecs_int(),
 */
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":645
 *             self.scoped_process_state.sampled_msecs_int(),
 *             ptransform=transform_id),
 *         monitoring_infos.int64_counter(             # <<<<<<<<<<<<<<
 *             monitoring_infos.FINISH_BUNDLE_MSECS_URN,
 *             self.scoped_finish_state.sampled_msecs_int(),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_monitoring_infos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int64_counter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":646
 *             ptransform=transform_id),
 *         monitoring_infos.int64_counter(
 *             monitoring_infos.FINISH_BUNDLE_MSECS_URN,             # <<<<<<<<<<<<<<
 *             self.scoped_finish_state.sampled_msecs_int(),
 *             ptransform=transform_id),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_monitoring_infos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_FINISH_BUNDLE_MSECS_URN); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":647
 *         monitoring_infos.int64_counter(
 *             monitoring_infos.FINISH_BUNDLE_MSECS_URN,
 *             self.scoped_finish_state.sampled_msecs_int(),             # <<<<<<<<<<<<<<
 *             ptransform=transform_id),
 *         monitoring_infos.int64_counter(
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->scoped_finish_state, __pyx_n_s_sampled_msecs_int); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 647, __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_1 = (__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_1)) __PYX_ERR(0, 647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "apache_beam/runners/worker/operations.py":645
 *             self.scoped_process_state.sampled_msecs_int(),
 *             ptransform=transform_id),
 *         monitoring_infos.int64_counter(             # <<<<<<<<<<<<<<
 *             monitoring_infos.FINISH_BUNDLE_MSECS_URN,
 *             self.scoped_finish_state.sampled_msecs_int(),
 */
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 645, __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_t_4 = 0;
  __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":648
 *             monitoring_infos.FINISH_BUNDLE_MSECS_URN,
 *             self.scoped_finish_state.sampled_msecs_int(),
 *             ptransform=transform_id),             # <<<<<<<<<<<<<<
 *         monitoring_infos.int64_counter(
 *             monitoring_infos.TOTAL_MSECS_URN,
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptransform, __pyx_v_transform_id) < 0) __PYX_ERR(0, 648, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":645
 *             self.scoped_process_state.sampled_msecs_int(),
 *             ptransform=transform_id),
 *         monitoring_infos.int64_counter(             # <<<<<<<<<<<<<<
 *             monitoring_infos.FINISH_BUNDLE_MSECS_URN,
 *             self.scoped_finish_state.sampled_msecs_int(),
 */
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":649
 *             self.scoped_finish_state.sampled_msecs_int(),
 *             ptransform=transform_id),
 *         monitoring_infos.int64_counter(             # <<<<<<<<<<<<<<
 *             monitoring_infos.TOTAL_MSECS_URN,
 *             total_time_spent_msecs,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_monitoring_infos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int64_counter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":650
 *             ptransform=transform_id),
 *         monitoring_infos.int64_counter(
 *             monitoring_infos.TOTAL_MSECS_URN,             # <<<<<<<<<<<<<<
 *             total_time_spent_msecs,
 *             ptransform=transform_id),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_monitoring_infos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_TOTAL_MSECS_URN); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":649
 *             self.scoped_finish_state.sampled_msecs_int(),
 *             ptransform=transform_id),
 *         monitoring_infos.int64_counter(             # <<<<<<<<<<<<<<
 *             monitoring_infos.TOTAL_MSECS_URN,
 *             total_time_spent_msecs,
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 649, __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_total_time_spent_msecs);
  __Pyx_GIVEREF(__pyx_v_total_time_spent_msecs);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_total_time_spent_msecs);
  __pyx_t_5 = 0;

  /* "apache_beam/runners/worker/operations.py":652
 *             monitoring_infos.TOTAL_MSECS_URN,
 *             total_time_spent_msecs,
 *             ptransform=transform_id),             # <<<<<<<<<<<<<<
 *     ]
 *     return {monitoring_infos.to_key(mi): mi for mi in mis}
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ptransform, __pyx_v_transform_id) < 0) __PYX_ERR(0, 652, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":649
 *             self.scoped_finish_state.sampled_msecs_int(),
 *             ptransform=transform_id),
 *         monitoring_infos.int64_counter(             # <<<<<<<<<<<<<<
 *             monitoring_infos.TOTAL_MSECS_URN,
 *             total_time_spent_msecs,
 */
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "apache_beam/runners/worker/operations.py":636
 *         self.scoped_process_state.sampled_msecs_int() +
 *         self.scoped_finish_state.sampled_msecs_int())
 *     mis = [             # <<<<<<<<<<<<<<
 *         monitoring_infos.int64_counter(
 *             monitoring_infos.START_BUNDLE_MSECS_URN,
 */
  __pyx_t_5 = PyList_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_5, 2, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_7);
  PyList_SET_ITEM(__pyx_t_5, 3, __pyx_t_7);
  __pyx_t_3 = 0;
  __pyx_t_2 = 0;
  __pyx_t_4 = 0;
  __pyx_t_7 = 0;
  __pyx_v_mis = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "apache_beam/runners/worker/operations.py":654
 *             ptransform=transform_id),
 *     ]
 *     return {monitoring_infos.to_key(mi): mi for mi in mis}             # <<<<<<<<<<<<<<
 * 
 *   def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 654, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = __pyx_v_mis; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
    for (;;) {
      if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 654, __pyx_L5_error)
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 654, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_4);
      #endif
      __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_mi, __pyx_t_4);
      __pyx_t_4 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_monitoring_infos); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 654, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_to_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 654, __pyx_L5_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_4 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_8genexpr1__pyx_v_mi) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_8genexpr1__pyx_v_mi);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 654, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(PyDict_SetItem(__pyx_t_5, (PyObject*)__pyx_t_4, (PyObject*)__pyx_8genexpr1__pyx_v_mi))) __PYX_ERR(0, 654, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_mi); __pyx_8genexpr1__pyx_v_mi = 0;
    goto __pyx_L8_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_mi); __pyx_8genexpr1__pyx_v_mi = 0;
    goto __pyx_L1_error;
    __pyx_L8_exit_scope:;
  } /* exit inner scope */
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "apache_beam/runners/worker/operations.py":630
 *     return self.metrics_container.to_runner_api_monitoring_infos(transform_id)
 * 
 *   def execution_time_monitoring_infos(self, transform_id):             # <<<<<<<<<<<<<<
 *     # type: (str) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo]
 *     total_time_spent_msecs = (
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.execution_time_monitoring_infos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_total_time_spent_msecs);
  __Pyx_XDECREF(__pyx_v_mis);
  __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_mi);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_41execution_time_monitoring_infos(PyObject *__pyx_v_self, PyObject *__pyx_v_transform_id); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_41execution_time_monitoring_infos = {"execution_time_monitoring_infos", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_41execution_time_monitoring_infos, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_41execution_time_monitoring_infos(PyObject *__pyx_v_self, PyObject *__pyx_v_transform_id) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("execution_time_monitoring_infos (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_40execution_time_monitoring_infos(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), ((PyObject *)__pyx_v_transform_id));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_40execution_time_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_transform_id) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__48)
  __Pyx_RefNannySetupContext("execution_time_monitoring_infos", 0);
  __Pyx_TraceCall("execution_time_monitoring_infos (wrapper)", __pyx_f[0], 630, 0, __PYX_ERR(0, 630, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_execution_time_monitoring_infos(__pyx_v_self, __pyx_v_transform_id, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.execution_time_monitoring_infos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":656
 *     return {monitoring_infos.to_key(mi): mi for mi in mis}
 * 
 *   def __str__(self):             # <<<<<<<<<<<<<<
 *     """Generates a useful string for this object.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_43__str__(PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_42__str__[] = "Generates a useful string for this object.\n\n    Compactly displays interesting fields.  In particular, pickled\n    fields are not displayed.  Note that we collapse the fields of the\n    contained Worker* object into this object, since there is a 1-1\n    mapping between Operation and operation_specs.Worker*.\n\n    Returns:\n      Compact string representing this object.\n    ";
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_11apache_beam_7runners_6worker_10operations_9Operation_42__str__;
#endif
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_43__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_42__str__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_42__str__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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("__str__", 0);
  __Pyx_TraceCall("__str__", __pyx_f[0], 656, 0, __PYX_ERR(0, 656, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":667
 *       Compact string representing this object.
 *     """
 *     return self.str_internal()             # <<<<<<<<<<<<<<
 * 
 *   def str_internal(self, is_recursive=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_str_internal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 667, __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, 667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/runners/worker/operations.py":656
 *     return {monitoring_infos.to_key(mi): mi for mi in mis}
 * 
 *   def __str__(self):             # <<<<<<<<<<<<<<
 *     """Generates a useful string for this object.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":669
 *     return self.str_internal()
 * 
 *   def str_internal(self, is_recursive=False):             # <<<<<<<<<<<<<<
 *     """Internal helper for __str__ that supports recursion.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_45str_internal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_44str_internal[] = "Internal helper for __str__ that supports recursion.\n\n    When recursing on receivers, keep the output short.\n    Args:\n      is_recursive: whether to omit some details, particularly receivers.\n    Returns:\n      Compact string representing this object.\n    ";
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_45str_internal = {"str_internal", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_45str_internal, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_44str_internal};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_45str_internal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_is_recursive = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("str_internal (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_is_recursive,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_False);
    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_is_recursive);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "str_internal") < 0)) __PYX_ERR(0, 669, __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_is_recursive = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("str_internal", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 669, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.str_internal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_44str_internal(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), __pyx_v_is_recursive);

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_44str_internal(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_is_recursive) {
  PyObject *__pyx_v_printable_name = NULL;
  PyObject *__pyx_v_printable_fields = NULL;
  PyObject *__pyx_8genexpr2__pyx_v_receiver = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_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;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  Py_UCS4 __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__49)
  __Pyx_RefNannySetupContext("str_internal", 0);
  __Pyx_TraceCall("str_internal", __pyx_f[0], 669, 0, __PYX_ERR(0, 669, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":678
 *       Compact string representing this object.
 *     """
 *     printable_name = self.__class__.__name__             # <<<<<<<<<<<<<<
 *     if hasattr(self, 'step_name'):
 *       printable_name += ' %s' % self.name_context.logging_name()
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_printable_name = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":679
 *     """
 *     printable_name = self.__class__.__name__
 *     if hasattr(self, 'step_name'):             # <<<<<<<<<<<<<<
 *       printable_name += ' %s' % self.name_context.logging_name()
 *       if is_recursive:
 */
  __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_u_step_name); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 679, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "apache_beam/runners/worker/operations.py":680
 *     printable_name = self.__class__.__name__
 *     if hasattr(self, 'step_name'):
 *       printable_name += ' %s' % self.name_context.logging_name()             # <<<<<<<<<<<<<<
 *       if is_recursive:
 *         # If we have a step name, stop here, no more detail needed.
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->name_context, __pyx_n_s_logging_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 680, __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, 680, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 680, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_printable_name, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 680, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_printable_name, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "apache_beam/runners/worker/operations.py":681
 *     if hasattr(self, 'step_name'):
 *       printable_name += ' %s' % self.name_context.logging_name()
 *       if is_recursive:             # <<<<<<<<<<<<<<
 *         # If we have a step name, stop here, no more detail needed.
 *         return '<%s>' % printable_name
 */
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_is_recursive); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 681, __pyx_L1_error)
    if (__pyx_t_4) {

      /* "apache_beam/runners/worker/operations.py":683
 *       if is_recursive:
 *         # If we have a step name, stop here, no more detail needed.
 *         return '<%s>' % printable_name             # <<<<<<<<<<<<<<
 * 
 *     if self.spec is None:
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_s_2, __pyx_v_printable_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 683, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "apache_beam/runners/worker/operations.py":681
 *     if hasattr(self, 'step_name'):
 *       printable_name += ' %s' % self.name_context.logging_name()
 *       if is_recursive:             # <<<<<<<<<<<<<<
 *         # If we have a step name, stop here, no more detail needed.
 *         return '<%s>' % printable_name
 */
    }

    /* "apache_beam/runners/worker/operations.py":679
 *     """
 *     printable_name = self.__class__.__name__
 *     if hasattr(self, 'step_name'):             # <<<<<<<<<<<<<<
 *       printable_name += ' %s' % self.name_context.logging_name()
 *       if is_recursive:
 */
  }

  /* "apache_beam/runners/worker/operations.py":685
 *         return '<%s>' % printable_name
 * 
 *     if self.spec is None:             # <<<<<<<<<<<<<<
 *       printable_fields = []
 *     else:
 */
  __pyx_t_4 = (__pyx_v_self->spec == Py_None);
  __pyx_t_3 = (__pyx_t_4 != 0);
  if (__pyx_t_3) {

    /* "apache_beam/runners/worker/operations.py":686
 * 
 *     if self.spec is None:
 *       printable_fields = []             # <<<<<<<<<<<<<<
 *     else:
 *       printable_fields = operation_specs.worker_printable_fields(self.spec)
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 686, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_printable_fields = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "apache_beam/runners/worker/operations.py":685
 *         return '<%s>' % printable_name
 * 
 *     if self.spec is None:             # <<<<<<<<<<<<<<
 *       printable_fields = []
 *     else:
 */
    goto __pyx_L5;
  }

  /* "apache_beam/runners/worker/operations.py":688
 *       printable_fields = []
 *     else:
 *       printable_fields = operation_specs.worker_printable_fields(self.spec)             # <<<<<<<<<<<<<<
 * 
 *     if not is_recursive and getattr(self, 'receivers', []):
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_operation_specs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 688, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_worker_printable_fields); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 688, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_1, __pyx_v_self->spec) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_self->spec);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 688, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_printable_fields = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_L5:;

  /* "apache_beam/runners/worker/operations.py":690
 *       printable_fields = operation_specs.worker_printable_fields(self.spec)
 * 
 *     if not is_recursive and getattr(self, 'receivers', []):             # <<<<<<<<<<<<<<
 *       printable_fields.append(
 *           'receivers=[%s]' %
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_is_recursive); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 690, __pyx_L1_error)
  __pyx_t_6 = ((!__pyx_t_4) != 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_3 = __pyx_t_6;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_u_receivers, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __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, 690, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = __pyx_t_6;
  __pyx_L7_bool_binop_done:;
  if (__pyx_t_3) {

    /* "apache_beam/runners/worker/operations.py":693
 *       printable_fields.append(
 *           'receivers=[%s]' %
 *           ', '.join([str(receiver) for receiver in self.receivers]))             # <<<<<<<<<<<<<<
 * 
 *     return '<%s %s>' % (printable_name, ', '.join(printable_fields))
 */
    { /* enter inner scope */
      __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 693, __pyx_L11_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(__pyx_v_self->receivers == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
        __PYX_ERR(0, 693, __pyx_L11_error)
      }
      __pyx_t_2 = __pyx_v_self->receivers; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = 0;
      for (;;) {
        if (__pyx_t_7 >= 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_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 693, __pyx_L11_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 693, __pyx_L11_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
        __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_receiver, __pyx_t_1);
        __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_8genexpr2__pyx_v_receiver); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 693, __pyx_L11_error)
        __Pyx_GOTREF(__pyx_t_1);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 693, __pyx_L11_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_receiver); __pyx_8genexpr2__pyx_v_receiver = 0;
      goto __pyx_L14_exit_scope;
      __pyx_L11_error:;
      __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_receiver); __pyx_8genexpr2__pyx_v_receiver = 0;
      goto __pyx_L1_error;
      __pyx_L14_exit_scope:;
    } /* exit inner scope */
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__50, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 693, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "apache_beam/runners/worker/operations.py":692
 *     if not is_recursive and getattr(self, 'receivers', []):
 *       printable_fields.append(
 *           'receivers=[%s]' %             # <<<<<<<<<<<<<<
 *           ', '.join([str(receiver) for receiver in self.receivers]))
 * 
 */
    __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_receivers_s, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/runners/worker/operations.py":691
 * 
 *     if not is_recursive and getattr(self, 'receivers', []):
 *       printable_fields.append(             # <<<<<<<<<<<<<<
 *           'receivers=[%s]' %
 *           ', '.join([str(receiver) for receiver in self.receivers]))
 */
    __pyx_t_8 = __Pyx_PyObject_Append(__pyx_v_printable_fields, __pyx_t_5); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 691, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "apache_beam/runners/worker/operations.py":690
 *       printable_fields = operation_specs.worker_printable_fields(self.spec)
 * 
 *     if not is_recursive and getattr(self, 'receivers', []):             # <<<<<<<<<<<<<<
 *       printable_fields.append(
 *           'receivers=[%s]' %
 */
  }

  /* "apache_beam/runners/worker/operations.py":695
 *           ', '.join([str(receiver) for receiver in self.receivers]))
 * 
 *     return '<%s %s>' % (printable_name, ', '.join(printable_fields))             # <<<<<<<<<<<<<<
 * 
 *   def _get_runtime_performance_hints(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = PyTuple_New(5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = 0;
  __pyx_t_9 = 127;
  __Pyx_INCREF(__pyx_kp_u__51);
  __pyx_t_7 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__51);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u__51);
  __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_printable_name), __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_9;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __Pyx_INCREF(__pyx_kp_u__52);
  __pyx_t_7 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__52);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u__52);
  __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__50, __pyx_v_printable_fields); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_9;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_2);
  __pyx_t_2 = 0;
  __Pyx_INCREF(__pyx_kp_u__53);
  __pyx_t_7 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__53);
  PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_kp_u__53);
  __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_5, 5, __pyx_t_7, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "apache_beam/runners/worker/operations.py":669
 *     return self.str_internal()
 * 
 *   def str_internal(self, is_recursive=False):             # <<<<<<<<<<<<<<
 *     """Internal helper for __str__ that supports recursion.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.str_internal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_printable_name);
  __Pyx_XDECREF(__pyx_v_printable_fields);
  __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_receiver);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":697
 *     return '<%s %s>' % (printable_name, ', '.join(printable_fields))
 * 
 *   def _get_runtime_performance_hints(self):             # <<<<<<<<<<<<<<
 *     # type: () -> Optional[Dict[Optional[str], Tuple[Optional[str], Any]]]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_47_get_runtime_performance_hints(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_46_get_runtime_performance_hints[] = "Returns any type hints required for performance runtime\n    type-checking.";
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_47_get_runtime_performance_hints = {"_get_runtime_performance_hints", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_47_get_runtime_performance_hints, METH_NOARGS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_46_get_runtime_performance_hints};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_47_get_runtime_performance_hints(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_runtime_performance_hints (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_46_get_runtime_performance_hints(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_46_get_runtime_performance_hints(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__54)
  __Pyx_RefNannySetupContext("_get_runtime_performance_hints", 0);
  __Pyx_TraceCall("_get_runtime_performance_hints", __pyx_f[0], 697, 0, __PYX_ERR(0, 697, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":702
 *     """Returns any type hints required for performance runtime
 *     type-checking."""
 *     return None             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "apache_beam/runners/worker/operations.py":697
 *     return '<%s %s>' % (printable_name, ', '.join(printable_fields))
 * 
 *   def _get_runtime_performance_hints(self):             # <<<<<<<<<<<<<<
 *     # type: () -> Optional[Dict[Optional[str], Tuple[Optional[str], Any]]]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation._get_runtime_performance_hints", __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/worker/operations.pxd":65
 * 
 * cdef class Operation(object):
 *   cdef readonly name_context             # <<<<<<<<<<<<<<
 *   cdef readonly operation_name
 *   cdef readonly spec
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_12name_context_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_12name_context_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_12name_context___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_12name_context___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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[1], 65, 0, __PYX_ERR(1, 65, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->name_context);
  __pyx_r = __pyx_v_self->name_context;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.name_context.__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/worker/operations.pxd":66
 * cdef class Operation(object):
 *   cdef readonly name_context
 *   cdef readonly operation_name             # <<<<<<<<<<<<<<
 *   cdef readonly spec
 *   cdef object consumers
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_14operation_name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_14operation_name_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_14operation_name___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_14operation_name___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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[1], 66, 0, __PYX_ERR(1, 66, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->operation_name);
  __pyx_r = __pyx_v_self->operation_name;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.operation_name.__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/worker/operations.pxd":67
 *   cdef readonly name_context
 *   cdef readonly operation_name
 *   cdef readonly spec             # <<<<<<<<<<<<<<
 *   cdef object consumers
 *   cdef readonly counter_factory
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_4spec_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_4spec_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_4spec___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_4spec___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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[1], 67, 0, __PYX_ERR(1, 67, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->spec);
  __pyx_r = __pyx_v_self->spec;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.spec.__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/worker/operations.pxd":69
 *   cdef readonly spec
 *   cdef object consumers
 *   cdef readonly counter_factory             # <<<<<<<<<<<<<<
 *   cdef public metrics_container
 *   cdef public execution_context
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_15counter_factory_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_15counter_factory_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_15counter_factory___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_15counter_factory___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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[1], 69, 0, __PYX_ERR(1, 69, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->counter_factory);
  __pyx_r = __pyx_v_self->counter_factory;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.counter_factory.__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/worker/operations.pxd":70
 *   cdef object consumers
 *   cdef readonly counter_factory
 *   cdef public metrics_container             # <<<<<<<<<<<<<<
 *   cdef public execution_context
 *   # Public for access by Fn harness operations.
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17metrics_container_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17metrics_container_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_17metrics_container___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_17metrics_container___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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[1], 70, 0, __PYX_ERR(1, 70, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->metrics_container);
  __pyx_r = __pyx_v_self->metrics_container;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.metrics_container.__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_6worker_10operations_9Operation_17metrics_container_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17metrics_container_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_17metrics_container_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_17metrics_container_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_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[1], 70, 0, __PYX_ERR(1, 70, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->metrics_container);
  __Pyx_DECREF(__pyx_v_self->metrics_container);
  __pyx_v_self->metrics_container = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.metrics_container.__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_6worker_10operations_9Operation_17metrics_container_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17metrics_container_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_17metrics_container_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self));

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_17metrics_container_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) {
  int __pyx_r;
  __Pyx_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[1], 70, 0, __PYX_ERR(1, 70, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->metrics_container);
  __Pyx_DECREF(__pyx_v_self->metrics_container);
  __pyx_v_self->metrics_container = Py_None;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.metrics_container.__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/worker/operations.pxd":71
 *   cdef readonly counter_factory
 *   cdef public metrics_container
 *   cdef public execution_context             # <<<<<<<<<<<<<<
 *   # Public for access by Fn harness operations.
 *   # TODO(robertwb): Cythonize FnHarness.
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17execution_context_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17execution_context_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_17execution_context___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_17execution_context___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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[1], 71, 0, __PYX_ERR(1, 71, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->execution_context);
  __pyx_r = __pyx_v_self->execution_context;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.execution_context.__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_6worker_10operations_9Operation_17execution_context_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17execution_context_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_17execution_context_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_17execution_context_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_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[1], 71, 0, __PYX_ERR(1, 71, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->execution_context);
  __Pyx_DECREF(__pyx_v_self->execution_context);
  __pyx_v_self->execution_context = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.execution_context.__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_6worker_10operations_9Operation_17execution_context_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17execution_context_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_17execution_context_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self));

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_17execution_context_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) {
  int __pyx_r;
  __Pyx_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[1], 71, 0, __PYX_ERR(1, 71, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->execution_context);
  __Pyx_DECREF(__pyx_v_self->execution_context);
  __pyx_v_self->execution_context = Py_None;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.execution_context.__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/worker/operations.pxd":74
 *   # Public for access by Fn harness operations.
 *   # TODO(robertwb): Cythonize FnHarness.
 *   cdef public list receivers             # <<<<<<<<<<<<<<
 *   cdef readonly bint debug_logging_enabled
 *   # For legacy workers.
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9receivers_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9receivers_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_9receivers___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_9receivers___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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[1], 74, 0, __PYX_ERR(1, 74, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->receivers);
  __pyx_r = __pyx_v_self->receivers;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.receivers.__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_6worker_10operations_9Operation_9receivers_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9receivers_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_9receivers_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_9receivers_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_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[1], 74, 0, __PYX_ERR(1, 74, __pyx_L1_error));
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(1, 74, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->receivers);
  __Pyx_DECREF(__pyx_v_self->receivers);
  __pyx_v_self->receivers = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.receivers.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9receivers_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9receivers_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_9receivers_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self));

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_9receivers_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) {
  int __pyx_r;
  __Pyx_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[1], 74, 0, __PYX_ERR(1, 74, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->receivers);
  __Pyx_DECREF(__pyx_v_self->receivers);
  __pyx_v_self->receivers = ((PyObject*)Py_None);

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.receivers.__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/worker/operations.pxd":75
 *   # TODO(robertwb): Cythonize FnHarness.
 *   cdef public list receivers
 *   cdef readonly bint debug_logging_enabled             # <<<<<<<<<<<<<<
 *   # For legacy workers.
 *   cdef bint setup_done
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_21debug_logging_enabled_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_21debug_logging_enabled_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_21debug_logging_enabled___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_21debug_logging_enabled___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 75, 0, __PYX_ERR(1, 75, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->debug_logging_enabled); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 75, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.debug_logging_enabled.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.pxd":79
 *   cdef bint setup_done
 * 
 *   cdef public step_name  # initialized lazily             # <<<<<<<<<<<<<<
 * 
 *   cdef readonly object state_sampler
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9step_name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9step_name_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_9step_name___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_9step_name___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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[1], 79, 0, __PYX_ERR(1, 79, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->step_name);
  __pyx_r = __pyx_v_self->step_name;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.step_name.__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_6worker_10operations_9Operation_9step_name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9step_name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_9step_name_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_9step_name_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_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[1], 79, 0, __PYX_ERR(1, 79, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->step_name);
  __Pyx_DECREF(__pyx_v_self->step_name);
  __pyx_v_self->step_name = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.step_name.__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_6worker_10operations_9Operation_9step_name_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9step_name_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_9step_name_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self));

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_9step_name_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) {
  int __pyx_r;
  __Pyx_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[1], 79, 0, __PYX_ERR(1, 79, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->step_name);
  __Pyx_DECREF(__pyx_v_self->step_name);
  __pyx_v_self->step_name = Py_None;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.step_name.__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/worker/operations.pxd":81
 *   cdef public step_name  # initialized lazily
 * 
 *   cdef readonly object state_sampler             # <<<<<<<<<<<<<<
 * 
 *   cdef readonly object scoped_start_state
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_13state_sampler_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_13state_sampler_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_13state_sampler___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_13state_sampler___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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[1], 81, 0, __PYX_ERR(1, 81, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->state_sampler);
  __pyx_r = __pyx_v_self->state_sampler;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.state_sampler.__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/worker/operations.pxd":83
 *   cdef readonly object state_sampler
 * 
 *   cdef readonly object scoped_start_state             # <<<<<<<<<<<<<<
 *   cdef readonly object scoped_process_state
 *   cdef readonly object scoped_finish_state
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_18scoped_start_state_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_18scoped_start_state_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_18scoped_start_state___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_18scoped_start_state___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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[1], 83, 0, __PYX_ERR(1, 83, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->scoped_start_state);
  __pyx_r = __pyx_v_self->scoped_start_state;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.scoped_start_state.__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/worker/operations.pxd":84
 * 
 *   cdef readonly object scoped_start_state
 *   cdef readonly object scoped_process_state             # <<<<<<<<<<<<<<
 *   cdef readonly object scoped_finish_state
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_20scoped_process_state_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_20scoped_process_state_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_20scoped_process_state___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_20scoped_process_state___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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[1], 84, 0, __PYX_ERR(1, 84, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->scoped_process_state);
  __pyx_r = __pyx_v_self->scoped_process_state;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.scoped_process_state.__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/worker/operations.pxd":85
 *   cdef readonly object scoped_start_state
 *   cdef readonly object scoped_process_state
 *   cdef readonly object scoped_finish_state             # <<<<<<<<<<<<<<
 * 
 *   cdef readonly object data_sampler
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_19scoped_finish_state_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_19scoped_finish_state_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_19scoped_finish_state___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_19scoped_finish_state___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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[1], 85, 0, __PYX_ERR(1, 85, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->scoped_finish_state);
  __pyx_r = __pyx_v_self->scoped_finish_state;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.scoped_finish_state.__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/worker/operations.pxd":87
 *   cdef readonly object scoped_finish_state
 * 
 *   cdef readonly object data_sampler             # <<<<<<<<<<<<<<
 * 
 *   cpdef start(self)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_12data_sampler_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_12data_sampler_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_12data_sampler___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_12data_sampler___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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[1], 87, 0, __PYX_ERR(1, 87, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->data_sampler);
  __pyx_r = __pyx_v_self->data_sampler;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.data_sampler.__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_6worker_10operations_9Operation_49__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_49__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_49__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_49__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_6worker_10operations_9Operation_48__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_48__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_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__55)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error));

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->debug_logging_enabled); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->setup_done); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(16); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_self->consumers);
  __Pyx_GIVEREF(__pyx_v_self->consumers);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->consumers);
  __Pyx_INCREF(__pyx_v_self->counter_factory);
  __Pyx_GIVEREF(__pyx_v_self->counter_factory);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->counter_factory);
  __Pyx_INCREF(__pyx_v_self->data_sampler);
  __Pyx_GIVEREF(__pyx_v_self->data_sampler);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->data_sampler);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->execution_context);
  __Pyx_GIVEREF(__pyx_v_self->execution_context);
  PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_self->execution_context);
  __Pyx_INCREF(__pyx_v_self->metrics_container);
  __Pyx_GIVEREF(__pyx_v_self->metrics_container);
  PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_self->metrics_container);
  __Pyx_INCREF(__pyx_v_self->name_context);
  __Pyx_GIVEREF(__pyx_v_self->name_context);
  PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_v_self->name_context);
  __Pyx_INCREF(__pyx_v_self->operation_name);
  __Pyx_GIVEREF(__pyx_v_self->operation_name);
  PyTuple_SET_ITEM(__pyx_t_3, 7, __pyx_v_self->operation_name);
  __Pyx_INCREF(__pyx_v_self->receivers);
  __Pyx_GIVEREF(__pyx_v_self->receivers);
  PyTuple_SET_ITEM(__pyx_t_3, 8, __pyx_v_self->receivers);
  __Pyx_INCREF(__pyx_v_self->scoped_finish_state);
  __Pyx_GIVEREF(__pyx_v_self->scoped_finish_state);
  PyTuple_SET_ITEM(__pyx_t_3, 9, __pyx_v_self->scoped_finish_state);
  __Pyx_INCREF(__pyx_v_self->scoped_process_state);
  __Pyx_GIVEREF(__pyx_v_self->scoped_process_state);
  PyTuple_SET_ITEM(__pyx_t_3, 10, __pyx_v_self->scoped_process_state);
  __Pyx_INCREF(__pyx_v_self->scoped_start_state);
  __Pyx_GIVEREF(__pyx_v_self->scoped_start_state);
  PyTuple_SET_ITEM(__pyx_t_3, 11, __pyx_v_self->scoped_start_state);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 12, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_self->spec);
  __Pyx_GIVEREF(__pyx_v_self->spec);
  PyTuple_SET_ITEM(__pyx_t_3, 13, __pyx_v_self->spec);
  __Pyx_INCREF(__pyx_v_self->state_sampler);
  __Pyx_GIVEREF(__pyx_v_self->state_sampler);
  PyTuple_SET_ITEM(__pyx_t_3, 14, __pyx_v_self->state_sampler);
  __Pyx_INCREF(__pyx_v_self->step_name);
  __Pyx_GIVEREF(__pyx_v_self->step_name);
  PyTuple_SET_ITEM(__pyx_t_3, 15, __pyx_v_self->step_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.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v__dict = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":7
 *     state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         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(2, 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(2, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_Operation, (type(self), 0xb6b9d28, None), state
 */
  /*else*/ {
    __pyx_t_4 = (__pyx_v_self->consumers != 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->counter_factory != 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->data_sampler != 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->execution_context != 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->metrics_container != 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->name_context != 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->operation_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->receivers != ((PyObject*)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->scoped_finish_state != 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->scoped_process_state != 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->scoped_start_state != 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->spec != 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_sampler != 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->step_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.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Operation, (type(self), 0xb6b9d28, None), state
 *     else:
 */
  __pyx_t_5 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":13
 *         use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None
 *     if use_setstate:
 *         return __pyx_unpickle_Operation, (type(self), 0xb6b9d28, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_Operation, (type(self), 0xb6b9d28, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_Operation); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_191601960);
    __Pyx_GIVEREF(__pyx_int_191601960);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_191601960);
    __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(2, 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.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Operation, (type(self), 0xb6b9d28, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_Operation, (type(self), 0xb6b9d28, None), state
 *     else:
 *         return __pyx_unpickle_Operation, (type(self), 0xb6b9d28, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Operation__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_Operation); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_191601960);
    __Pyx_GIVEREF(__pyx_int_191601960);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_191601960);
    __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(2, 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.worker.operations.Operation.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Operation, (type(self), 0xb6b9d28, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Operation__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_51__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_51__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_51__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_51__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_6worker_10operations_9Operation_50__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_50__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__56)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[2], 16, 0, __PYX_ERR(2, 16, __pyx_L1_error));

  /* "(tree fragment)":17
 *         return __pyx_unpickle_Operation, (type(self), 0xb6b9d28, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Operation__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(2, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_Operation__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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_Operation, (type(self), 0xb6b9d28, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Operation__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":706
 * 
 * class ReadOperation(Operation):
 *   def start(self):             # <<<<<<<<<<<<<<
 *     with self.scoped_start_state:
 *       super(ReadOperation, self).start()
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_13ReadOperation_1start(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_13ReadOperation_start(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation *__pyx_v_self, int __pyx_skip_dispatch) {
  struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value = 0;
  PyObject *__pyx_v_range_tracker = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_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;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  PyObject *(*__pyx_t_13)(PyObject *);
  int __pyx_t_14;
  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__57)
  __Pyx_RefNannySetupContext("start", 0);
  __Pyx_TraceCall("start", __pyx_f[0], 706, 0, __PYX_ERR(0, 706, __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_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 706, __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_6worker_10operations_13ReadOperation_1start)) {
        __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, 706, __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/worker/operations.py":707
 * class ReadOperation(Operation):
 *   def start(self):
 *     with self.scoped_start_state:             # <<<<<<<<<<<<<<
 *       super(ReadOperation, self).start()
 *       range_tracker = self.spec.source.source.get_range_tracker(
 */
  /*with:*/ {
    __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_start_state, __pyx_n_s_exit); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 707, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_start_state, __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 707, __pyx_L3_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, 707, __pyx_L3_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:*/ {
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_6);
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_8);
        /*try:*/ {

          /* "apache_beam/runners/worker/operations.py":708
 *   def start(self):
 *     with self.scoped_start_state:
 *       super(ReadOperation, self).start()             # <<<<<<<<<<<<<<
 *       range_tracker = self.spec.source.source.get_range_tracker(
 *           self.spec.source.start_position, self.spec.source.stop_position)
 */
          __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 708, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_INCREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation));
          __Pyx_GIVEREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation));
          PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation));
          __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, 708, __pyx_L7_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_start); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 708, __pyx_L7_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, 708, __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;

          /* "apache_beam/runners/worker/operations.py":709
 *     with self.scoped_start_state:
 *       super(ReadOperation, self).start()
 *       range_tracker = self.spec.source.source.get_range_tracker(             # <<<<<<<<<<<<<<
 *           self.spec.source.start_position, self.spec.source.stop_position)
 *       for value in self.spec.source.source.read(range_tracker):
 */
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.spec, __pyx_n_s_source); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 709, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_source); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 709, __pyx_L7_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_get_range_tracker); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 709, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "apache_beam/runners/worker/operations.py":710
 *       super(ReadOperation, self).start()
 *       range_tracker = self.spec.source.source.get_range_tracker(
 *           self.spec.source.start_position, self.spec.source.stop_position)             # <<<<<<<<<<<<<<
 *       for value in self.spec.source.source.read(range_tracker):
 *         if isinstance(value, WindowedValue):
 */
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.spec, __pyx_n_s_source); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 710, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_start_position); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 710, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.spec, __pyx_n_s_source); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 710, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_stop_position); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 710, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = NULL;
          __pyx_t_10 = 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_10 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_2)) {
            PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_4, __pyx_t_9};
            __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 709, __pyx_L7_error)
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
            PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_4, __pyx_t_9};
            __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 709, __pyx_L7_error)
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          } else
          #endif
          {
            __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 709, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_11);
            if (__pyx_t_3) {
              __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3); __pyx_t_3 = NULL;
            }
            __Pyx_GIVEREF(__pyx_t_4);
            PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_4);
            __Pyx_GIVEREF(__pyx_t_9);
            PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_9);
            __pyx_t_4 = 0;
            __pyx_t_9 = 0;
            __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 709, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          }
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_v_range_tracker = __pyx_t_1;
          __pyx_t_1 = 0;

          /* "apache_beam/runners/worker/operations.py":711
 *       range_tracker = self.spec.source.source.get_range_tracker(
 *           self.spec.source.start_position, self.spec.source.stop_position)
 *       for value in self.spec.source.source.read(range_tracker):             # <<<<<<<<<<<<<<
 *         if isinstance(value, WindowedValue):
 *           windowed_value = value
 */
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.spec, __pyx_n_s_source); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 711, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_source); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 711, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_read); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 711, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __pyx_t_11 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
            __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
            if (likely(__pyx_t_11)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_11);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_2, function);
            }
          }
          __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_11, __pyx_v_range_tracker) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_range_tracker);
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 711, __pyx_L7_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_12 = 0;
            __pyx_t_13 = NULL;
          } else {
            __pyx_t_12 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 711, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_13 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 711, __pyx_L7_error)
          }
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          for (;;) {
            if (likely(!__pyx_t_13)) {
              if (likely(PyList_CheckExact(__pyx_t_2))) {
                if (__pyx_t_12 >= 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_12); __Pyx_INCREF(__pyx_t_1); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 711, __pyx_L7_error)
                #else
                __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 711, __pyx_L7_error)
                __Pyx_GOTREF(__pyx_t_1);
                #endif
              } else {
                if (__pyx_t_12 >= 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_12); __Pyx_INCREF(__pyx_t_1); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 711, __pyx_L7_error)
                #else
                __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 711, __pyx_L7_error)
                __Pyx_GOTREF(__pyx_t_1);
                #endif
              }
            } else {
              __pyx_t_1 = __pyx_t_13(__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, 711, __pyx_L7_error)
                }
                break;
              }
              __Pyx_GOTREF(__pyx_t_1);
            }
            __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1);
            __pyx_t_1 = 0;

            /* "apache_beam/runners/worker/operations.py":712
 *           self.spec.source.start_position, self.spec.source.stop_position)
 *       for value in self.spec.source.source.read(range_tracker):
 *         if isinstance(value, WindowedValue):             # <<<<<<<<<<<<<<
 *           windowed_value = value
 *         else:
 */
            __pyx_t_14 = __Pyx_TypeCheck(__pyx_v_value, __pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue); 
            __pyx_t_15 = (__pyx_t_14 != 0);
            if (__pyx_t_15) {

              /* "apache_beam/runners/worker/operations.py":713
 *       for value in self.spec.source.source.read(range_tracker):
 *         if isinstance(value, WindowedValue):
 *           windowed_value = value             # <<<<<<<<<<<<<<
 *         else:
 *           windowed_value = _globally_windowed_value.with_value(value)
 */
              if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue))))) __PYX_ERR(0, 713, __pyx_L7_error)
              __pyx_t_1 = __pyx_v_value;
              __Pyx_INCREF(__pyx_t_1);
              __Pyx_XDECREF_SET(__pyx_v_windowed_value, ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_t_1));
              __pyx_t_1 = 0;

              /* "apache_beam/runners/worker/operations.py":712
 *           self.spec.source.start_position, self.spec.source.stop_position)
 *       for value in self.spec.source.source.read(range_tracker):
 *         if isinstance(value, WindowedValue):             # <<<<<<<<<<<<<<
 *           windowed_value = value
 *         else:
 */
              goto __pyx_L15;
            }

            /* "apache_beam/runners/worker/operations.py":715
 *           windowed_value = value
 *         else:
 *           windowed_value = _globally_windowed_value.with_value(value)             # <<<<<<<<<<<<<<
 *         self.output(windowed_value)
 * 
 */
            /*else*/ {
              __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_v_11apache_beam_7runners_6worker_10operations__globally_windowed_value->__pyx_vtab)->with_value(__pyx_v_11apache_beam_7runners_6worker_10operations__globally_windowed_value, __pyx_v_value, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 715, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_XDECREF_SET(__pyx_v_windowed_value, ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_t_1));
              __pyx_t_1 = 0;
            }
            __pyx_L15:;

            /* "apache_beam/runners/worker/operations.py":716
 *         else:
 *           windowed_value = _globally_windowed_value.with_value(value)
 *         self.output(windowed_value)             # <<<<<<<<<<<<<<
 * 
 * 
 */
            __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_ReadOperation *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.output(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), __pyx_v_windowed_value, 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 716, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

            /* "apache_beam/runners/worker/operations.py":711
 *       range_tracker = self.spec.source.source.get_range_tracker(
 *           self.spec.source.start_position, self.spec.source.stop_position)
 *       for value in self.spec.source.source.read(range_tracker):             # <<<<<<<<<<<<<<
 *         if isinstance(value, WindowedValue):
 *           windowed_value = value
 */
          }
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "apache_beam/runners/worker/operations.py":707
 * class ReadOperation(Operation):
 *   def start(self):
 *     with self.scoped_start_state:             # <<<<<<<<<<<<<<
 *       super(ReadOperation, self).start()
 *       range_tracker = self.spec.source.source.get_range_tracker(
 */
        }
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L12_try_end;
        __pyx_L7_error:;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        /*except:*/ {
          __Pyx_AddTraceback("apache_beam.runners.worker.operations.ReadOperation.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_11) < 0) __PYX_ERR(0, 707, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_9 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_1, __pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 707, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 707, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_16);
          __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          if (__pyx_t_15 < 0) __PYX_ERR(0, 707, __pyx_L9_except_error)
          __pyx_t_14 = ((!(__pyx_t_15 != 0)) != 0);
          if (__pyx_t_14) {
            __Pyx_GIVEREF(__pyx_t_2);
            __Pyx_GIVEREF(__pyx_t_1);
            __Pyx_XGIVEREF(__pyx_t_11);
            __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_1, __pyx_t_11);
            __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_11 = 0; 
            __PYX_ERR(0, 707, __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_11); __pyx_t_11 = 0;
          goto __pyx_L8_exception_handled;
        }
        __pyx_L9_except_error:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        goto __pyx_L1_error;
        __pyx_L8_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        __pyx_L12_try_end:;
      }
    }
    /*finally:*/ {
      /*normal exit:*/{
        if (__pyx_t_5) {
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__29, NULL);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 707, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        goto __pyx_L6;
      }
      __pyx_L6:;
    }
    goto __pyx_L19;
    __pyx_L3_error:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L1_error;
    __pyx_L19:;
  }

  /* "apache_beam/runners/worker/operations.py":706
 * 
 * class ReadOperation(Operation):
 *   def start(self):             # <<<<<<<<<<<<<<
 *     with self.scoped_start_state:
 *       super(ReadOperation, self).start()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ReadOperation.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_windowed_value);
  __Pyx_XDECREF(__pyx_v_range_tracker);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_13ReadOperation_1start(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_13ReadOperation_1start = {"start", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_13ReadOperation_1start, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_13ReadOperation_1start(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_6worker_10operations_13ReadOperation_start(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_13ReadOperation_start(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__57)
  __Pyx_RefNannySetupContext("start", 0);
  __Pyx_TraceCall("start (wrapper)", __pyx_f[0], 706, 0, __PYX_ERR(0, 706, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_13ReadOperation_start(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ReadOperation.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_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_6worker_10operations_13ReadOperation_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_13ReadOperation_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_13ReadOperation_3__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_13ReadOperation_3__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_6worker_10operations_13ReadOperation_2__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_13ReadOperation_2__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_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__58)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error));

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.debug_logging_enabled); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.setup_done); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(16); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.consumers);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.consumers);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->__pyx_base.consumers);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.counter_factory);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.counter_factory);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->__pyx_base.counter_factory);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.data_sampler);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.data_sampler);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->__pyx_base.data_sampler);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.execution_context);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.execution_context);
  PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_self->__pyx_base.execution_context);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.metrics_container);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.metrics_container);
  PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_self->__pyx_base.metrics_container);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.name_context);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.name_context);
  PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_v_self->__pyx_base.name_context);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.operation_name);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.operation_name);
  PyTuple_SET_ITEM(__pyx_t_3, 7, __pyx_v_self->__pyx_base.operation_name);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.receivers);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.receivers);
  PyTuple_SET_ITEM(__pyx_t_3, 8, __pyx_v_self->__pyx_base.receivers);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.scoped_finish_state);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.scoped_finish_state);
  PyTuple_SET_ITEM(__pyx_t_3, 9, __pyx_v_self->__pyx_base.scoped_finish_state);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.scoped_process_state);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.scoped_process_state);
  PyTuple_SET_ITEM(__pyx_t_3, 10, __pyx_v_self->__pyx_base.scoped_process_state);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.scoped_start_state);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.scoped_start_state);
  PyTuple_SET_ITEM(__pyx_t_3, 11, __pyx_v_self->__pyx_base.scoped_start_state);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 12, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.spec);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.spec);
  PyTuple_SET_ITEM(__pyx_t_3, 13, __pyx_v_self->__pyx_base.spec);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.state_sampler);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.state_sampler);
  PyTuple_SET_ITEM(__pyx_t_3, 14, __pyx_v_self->__pyx_base.state_sampler);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.step_name);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.step_name);
  PyTuple_SET_ITEM(__pyx_t_3, 15, __pyx_v_self->__pyx_base.step_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.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v__dict = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":7
 *     state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         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(2, 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(2, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_ReadOperation, (type(self), 0xb6b9d28, None), state
 */
  /*else*/ {
    __pyx_t_4 = (__pyx_v_self->__pyx_base.consumers != 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->__pyx_base.counter_factory != 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->__pyx_base.data_sampler != 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->__pyx_base.execution_context != 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->__pyx_base.metrics_container != 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->__pyx_base.name_context != 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->__pyx_base.operation_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->__pyx_base.receivers != ((PyObject*)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->__pyx_base.scoped_finish_state != 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->__pyx_base.scoped_process_state != 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->__pyx_base.scoped_start_state != 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->__pyx_base.spec != 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->__pyx_base.state_sampler != 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->__pyx_base.step_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.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_ReadOperation, (type(self), 0xb6b9d28, None), state
 *     else:
 */
  __pyx_t_5 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":13
 *         use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None
 *     if use_setstate:
 *         return __pyx_unpickle_ReadOperation, (type(self), 0xb6b9d28, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_ReadOperation, (type(self), 0xb6b9d28, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_ReadOperation); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_191601960);
    __Pyx_GIVEREF(__pyx_int_191601960);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_191601960);
    __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(2, 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.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_ReadOperation, (type(self), 0xb6b9d28, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_ReadOperation, (type(self), 0xb6b9d28, None), state
 *     else:
 *         return __pyx_unpickle_ReadOperation, (type(self), 0xb6b9d28, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_ReadOperation__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_ReadOperation); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_191601960);
    __Pyx_GIVEREF(__pyx_int_191601960);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_191601960);
    __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(2, 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.worker.operations.ReadOperation.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_ReadOperation, (type(self), 0xb6b9d28, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ReadOperation__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_13ReadOperation_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_13ReadOperation_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_13ReadOperation_5__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_13ReadOperation_5__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_6worker_10operations_13ReadOperation_4__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_13ReadOperation_4__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__59)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[2], 16, 0, __PYX_ERR(2, 16, __pyx_L1_error));

  /* "(tree fragment)":17
 *         return __pyx_unpickle_ReadOperation, (type(self), 0xb6b9d28, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_ReadOperation__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(2, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_ReadOperation__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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_ReadOperation, (type(self), 0xb6b9d28, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ReadOperation__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ReadOperation.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":720
 * 
 * class ImpulseReadOperation(Operation):
 *   def __init__(             # <<<<<<<<<<<<<<
 *       self,
 *       name_context,  # type: common.NameContext
 */

/* Python wrapper */
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name_context = 0;
  PyObject *__pyx_v_counter_factory = 0;
  PyObject *__pyx_v_state_sampler = 0;
  PyObject *__pyx_v_consumers = 0;
  PyObject *__pyx_v_source = 0;
  PyObject *__pyx_v_output_coder = 0;
  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_name_context,&__pyx_n_s_counter_factory,&__pyx_n_s_state_sampler,&__pyx_n_s_consumers,&__pyx_n_s_source,&__pyx_n_s_output_coder,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_name_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_counter_factory)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 6, 6, 1); __PYX_ERR(0, 720, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_state_sampler)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 6, 6, 2); __PYX_ERR(0, 720, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_consumers)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 6, 6, 3); __PYX_ERR(0, 720, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 6, 6, 4); __PYX_ERR(0, 720, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_output_coder)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 6, 6, 5); __PYX_ERR(0, 720, __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, 720, __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_name_context = values[0];
    __pyx_v_counter_factory = values[1];
    __pyx_v_state_sampler = values[2];
    __pyx_v_consumers = values[3];
    __pyx_v_source = values[4];
    __pyx_v_output_coder = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 720, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ImpulseReadOperation.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation___init__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *)__pyx_v_self), __pyx_v_name_context, __pyx_v_counter_factory, __pyx_v_state_sampler, __pyx_v_consumers, __pyx_v_source, __pyx_v_output_coder);

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *__pyx_v_self, PyObject *__pyx_v_name_context, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_state_sampler, PyObject *__pyx_v_consumers, PyObject *__pyx_v_source, PyObject *__pyx_v_output_coder) {
  int __pyx_r;
  __Pyx_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;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 720, 0, __PYX_ERR(0, 720, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":728
 *       source,  # type: iobase.BoundedSource
 *       output_coder):
 *     super(ImpulseReadOperation,             # <<<<<<<<<<<<<<
 *           self).__init__(name_context, None, counter_factory, state_sampler)
 *     self.source = source
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation));
  __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, 728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":729
 *       output_coder):
 *     super(ImpulseReadOperation,
 *           self).__init__(name_context, None, counter_factory, state_sampler)             # <<<<<<<<<<<<<<
 *     self.source = source
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 729, __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[5] = {__pyx_t_3, __pyx_v_name_context, Py_None, __pyx_v_counter_factory, __pyx_v_state_sampler};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 4+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 729, __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[5] = {__pyx_t_3, __pyx_v_name_context, Py_None, __pyx_v_counter_factory, __pyx_v_state_sampler};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 4+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 729, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(4+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 729, __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_name_context);
    __Pyx_GIVEREF(__pyx_v_name_context);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_name_context);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, Py_None);
    __Pyx_INCREF(__pyx_v_counter_factory);
    __Pyx_GIVEREF(__pyx_v_counter_factory);
    PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_counter_factory);
    __Pyx_INCREF(__pyx_v_state_sampler);
    __Pyx_GIVEREF(__pyx_v_state_sampler);
    PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_4, __pyx_v_state_sampler);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 729, __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/worker/operations.py":730
 *     super(ImpulseReadOperation,
 *           self).__init__(name_context, None, counter_factory, state_sampler)
 *     self.source = source             # <<<<<<<<<<<<<<
 * 
 *     self.receivers = [
 */
  __Pyx_INCREF(__pyx_v_source);
  __Pyx_GIVEREF(__pyx_v_source);
  __Pyx_GOTREF(__pyx_v_self->source);
  __Pyx_DECREF(__pyx_v_self->source);
  __pyx_v_self->source = __pyx_v_source;

  /* "apache_beam/runners/worker/operations.py":733
 * 
 *     self.receivers = [
 *         ConsumerSet.create(             # <<<<<<<<<<<<<<
 *             self.counter_factory,
 *             self.name_context.step_name,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet), __pyx_n_s_create); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "apache_beam/runners/worker/operations.py":735
 *         ConsumerSet.create(
 *             self.counter_factory,
 *             self.name_context.step_name,             # <<<<<<<<<<<<<<
 *             0,
 *             next(iter(consumers.values())),
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.name_context, __pyx_n_s_step_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "apache_beam/runners/worker/operations.py":737
 *             self.name_context.step_name,
 *             0,
 *             next(iter(consumers.values())),             # <<<<<<<<<<<<<<
 *             output_coder,
 *             self._get_runtime_performance_hints(),
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_consumers, __pyx_n_s_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 737, __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_3 = (__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_3)) __PYX_ERR(0, 737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyIter_Next(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "apache_beam/runners/worker/operations.py":739
 *             next(iter(consumers.values())),
 *             output_coder,
 *             self._get_runtime_performance_hints(),             # <<<<<<<<<<<<<<
 *             self.get_output_batch_converter())
 *     ]
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_runtime_performance_hints); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 739, __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_6 = (__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_6)) __PYX_ERR(0, 739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "apache_beam/runners/worker/operations.py":740
 *             output_coder,
 *             self._get_runtime_performance_hints(),
 *             self.get_output_batch_converter())             # <<<<<<<<<<<<<<
 *     ]
 * 
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_output_batch_converter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  __pyx_t_7 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = NULL;
  __pyx_t_4 = 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_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[8] = {__pyx_t_8, __pyx_v_self->__pyx_base.counter_factory, __pyx_t_5, __pyx_int_0, __pyx_t_3, __pyx_v_output_coder, __pyx_t_6, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 7+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 733, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[8] = {__pyx_t_8, __pyx_v_self->__pyx_base.counter_factory, __pyx_t_5, __pyx_int_0, __pyx_t_3, __pyx_v_output_coder, __pyx_t_6, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 7+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 733, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  {
    __pyx_t_9 = PyTuple_New(7+__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 733, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_8) {
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
    }
    __Pyx_INCREF(__pyx_v_self->__pyx_base.counter_factory);
    __Pyx_GIVEREF(__pyx_v_self->__pyx_base.counter_factory);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_4, __pyx_v_self->__pyx_base.counter_factory);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_4, __pyx_t_5);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_4, __pyx_int_0);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_9, 3+__pyx_t_4, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_output_coder);
    __Pyx_GIVEREF(__pyx_v_output_coder);
    PyTuple_SET_ITEM(__pyx_t_9, 4+__pyx_t_4, __pyx_v_output_coder);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_9, 5+__pyx_t_4, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_9, 6+__pyx_t_4, __pyx_t_7);
    __pyx_t_5 = 0;
    __pyx_t_3 = 0;
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 733, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":732
 *     self.source = source
 * 
 *     self.receivers = [             # <<<<<<<<<<<<<<
 *         ConsumerSet.create(
 *             self.counter_factory,
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.receivers);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.receivers);
  __pyx_v_self->__pyx_base.receivers = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":720
 * 
 * class ImpulseReadOperation(Operation):
 *   def __init__(             # <<<<<<<<<<<<<<
 *       self,
 *       name_context,  # type: common.NameContext
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ImpulseReadOperation.__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/worker/operations.py":743
 *     ]
 * 
 *   def process(self, unused_impulse):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_3process(PyObject *__pyx_v_self, PyObject *__pyx_v_unused_impulse); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_unused_impulse, int __pyx_skip_dispatch) {
  struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value = 0;
  PyObject *__pyx_v_range_tracker = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_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;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  int __pyx_t_11;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__60)
  __Pyx_RefNannySetupContext("process", 0);
  __Pyx_TraceCall("process", __pyx_f[0], 743, 0, __PYX_ERR(0, 743, __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, 743, __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_6worker_10operations_20ImpulseReadOperation_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_unused_impulse)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_unused_impulse));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 743, __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/worker/operations.py":745
 *   def process(self, unused_impulse):
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:             # <<<<<<<<<<<<<<
 *       range_tracker = self.source.get_range_tracker(None, None)
 *       for value in self.source.read(range_tracker):
 */
  /*with:*/ {
    __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_process_state, __pyx_n_s_exit); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 745, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_process_state, __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 745, __pyx_L3_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, 745, __pyx_L3_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:*/ {
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_6);
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_8);
        /*try:*/ {

          /* "apache_beam/runners/worker/operations.py":746
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:
 *       range_tracker = self.source.get_range_tracker(None, None)             # <<<<<<<<<<<<<<
 *       for value in self.source.read(range_tracker):
 *         if isinstance(value, WindowedValue):
 */
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->source, __pyx_n_s_get_range_tracker); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 746, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 746, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_v_range_tracker = __pyx_t_2;
          __pyx_t_2 = 0;

          /* "apache_beam/runners/worker/operations.py":747
 *     with self.scoped_process_state:
 *       range_tracker = self.source.get_range_tracker(None, None)
 *       for value in self.source.read(range_tracker):             # <<<<<<<<<<<<<<
 *         if isinstance(value, WindowedValue):
 *           windowed_value = value
 */
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->source, __pyx_n_s_read); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 747, __pyx_L7_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_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_v_range_tracker) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_range_tracker);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 747, __pyx_L7_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_9 = 0;
            __pyx_t_10 = NULL;
          } else {
            __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 747, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_10 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 747, __pyx_L7_error)
          }
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          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, 747, __pyx_L7_error)
                #else
                __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 747, __pyx_L7_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, 747, __pyx_L7_error)
                #else
                __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 747, __pyx_L7_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, 747, __pyx_L7_error)
                }
                break;
              }
              __Pyx_GOTREF(__pyx_t_2);
            }
            __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_2);
            __pyx_t_2 = 0;

            /* "apache_beam/runners/worker/operations.py":748
 *       range_tracker = self.source.get_range_tracker(None, None)
 *       for value in self.source.read(range_tracker):
 *         if isinstance(value, WindowedValue):             # <<<<<<<<<<<<<<
 *           windowed_value = value
 *         else:
 */
            __pyx_t_11 = __Pyx_TypeCheck(__pyx_v_value, __pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue); 
            __pyx_t_12 = (__pyx_t_11 != 0);
            if (__pyx_t_12) {

              /* "apache_beam/runners/worker/operations.py":749
 *       for value in self.source.read(range_tracker):
 *         if isinstance(value, WindowedValue):
 *           windowed_value = value             # <<<<<<<<<<<<<<
 *         else:
 *           windowed_value = _globally_windowed_value.with_value(value)
 */
              if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue))))) __PYX_ERR(0, 749, __pyx_L7_error)
              __pyx_t_2 = __pyx_v_value;
              __Pyx_INCREF(__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/worker/operations.py":748
 *       range_tracker = self.source.get_range_tracker(None, None)
 *       for value in self.source.read(range_tracker):
 *         if isinstance(value, WindowedValue):             # <<<<<<<<<<<<<<
 *           windowed_value = value
 *         else:
 */
              goto __pyx_L15;
            }

            /* "apache_beam/runners/worker/operations.py":751
 *           windowed_value = value
 *         else:
 *           windowed_value = _globally_windowed_value.with_value(value)             # <<<<<<<<<<<<<<
 *         self.output(windowed_value)
 * 
 */
            /*else*/ {
              __pyx_t_2 = ((PyObject *)((struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_v_11apache_beam_7runners_6worker_10operations__globally_windowed_value->__pyx_vtab)->with_value(__pyx_v_11apache_beam_7runners_6worker_10operations__globally_windowed_value, __pyx_v_value, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 751, __pyx_L7_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;
            }
            __pyx_L15:;

            /* "apache_beam/runners/worker/operations.py":752
 *         else:
 *           windowed_value = _globally_windowed_value.with_value(value)
 *         self.output(windowed_value)             # <<<<<<<<<<<<<<
 * 
 * 
 */
            __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.output(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), __pyx_v_windowed_value, 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 752, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "apache_beam/runners/worker/operations.py":747
 *     with self.scoped_process_state:
 *       range_tracker = self.source.get_range_tracker(None, None)
 *       for value in self.source.read(range_tracker):             # <<<<<<<<<<<<<<
 *         if isinstance(value, WindowedValue):
 *           windowed_value = value
 */
          }
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "apache_beam/runners/worker/operations.py":745
 *   def process(self, unused_impulse):
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:             # <<<<<<<<<<<<<<
 *       range_tracker = self.source.get_range_tracker(None, None)
 *       for value in self.source.read(range_tracker):
 */
        }
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L12_try_end;
        __pyx_L7_error:;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        /*except:*/ {
          __Pyx_AddTraceback("apache_beam.runners.worker.operations.ImpulseReadOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 745, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_4 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 745, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 745, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_13);
          __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_13);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          if (__pyx_t_12 < 0) __PYX_ERR(0, 745, __pyx_L9_except_error)
          __pyx_t_11 = ((!(__pyx_t_12 != 0)) != 0);
          if (__pyx_t_11) {
            __Pyx_GIVEREF(__pyx_t_1);
            __Pyx_GIVEREF(__pyx_t_2);
            __Pyx_XGIVEREF(__pyx_t_3);
            __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_2, __pyx_t_3);
            __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; 
            __PYX_ERR(0, 745, __pyx_L9_except_error)
          }
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          goto __pyx_L8_exception_handled;
        }
        __pyx_L9_except_error:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        goto __pyx_L1_error;
        __pyx_L8_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        __pyx_L12_try_end:;
      }
    }
    /*finally:*/ {
      /*normal exit:*/{
        if (__pyx_t_5) {
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__29, NULL);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 745, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        goto __pyx_L6;
      }
      __pyx_L6:;
    }
    goto __pyx_L19;
    __pyx_L3_error:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L1_error;
    __pyx_L19:;
  }

  /* "apache_beam/runners/worker/operations.py":743
 *     ]
 * 
 *   def process(self, unused_impulse):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ImpulseReadOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_windowed_value);
  __Pyx_XDECREF(__pyx_v_range_tracker);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_3process(PyObject *__pyx_v_self, PyObject *__pyx_v_unused_impulse); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_3process = {"process", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_3process, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_3process(PyObject *__pyx_v_self, PyObject *__pyx_v_unused_impulse) {
  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_unused_impulse), __pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, 1, "unused_impulse", 0))) __PYX_ERR(0, 743, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_2process(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *)__pyx_v_self), ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_v_unused_impulse));

  /* 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_6worker_10operations_20ImpulseReadOperation_2process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_unused_impulse) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__60)
  __Pyx_RefNannySetupContext("process", 0);
  __Pyx_TraceCall("process (wrapper)", __pyx_f[0], 743, 0, __PYX_ERR(0, 743, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_process(__pyx_v_self, __pyx_v_unused_impulse, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ImpulseReadOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_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_6worker_10operations_20ImpulseReadOperation_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_5__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_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_6worker_10operations_20ImpulseReadOperation_4__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_4__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_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__62)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error));

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.source, self.spec, self.state_sampler, self.step_name)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.debug_logging_enabled); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.setup_done); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(17); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.consumers);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.consumers);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->__pyx_base.consumers);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.counter_factory);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.counter_factory);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->__pyx_base.counter_factory);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.data_sampler);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.data_sampler);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->__pyx_base.data_sampler);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.execution_context);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.execution_context);
  PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_self->__pyx_base.execution_context);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.metrics_container);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.metrics_container);
  PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_self->__pyx_base.metrics_container);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.name_context);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.name_context);
  PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_v_self->__pyx_base.name_context);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.operation_name);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.operation_name);
  PyTuple_SET_ITEM(__pyx_t_3, 7, __pyx_v_self->__pyx_base.operation_name);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.receivers);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.receivers);
  PyTuple_SET_ITEM(__pyx_t_3, 8, __pyx_v_self->__pyx_base.receivers);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.scoped_finish_state);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.scoped_finish_state);
  PyTuple_SET_ITEM(__pyx_t_3, 9, __pyx_v_self->__pyx_base.scoped_finish_state);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.scoped_process_state);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.scoped_process_state);
  PyTuple_SET_ITEM(__pyx_t_3, 10, __pyx_v_self->__pyx_base.scoped_process_state);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.scoped_start_state);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.scoped_start_state);
  PyTuple_SET_ITEM(__pyx_t_3, 11, __pyx_v_self->__pyx_base.scoped_start_state);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 12, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_self->source);
  __Pyx_GIVEREF(__pyx_v_self->source);
  PyTuple_SET_ITEM(__pyx_t_3, 13, __pyx_v_self->source);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.spec);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.spec);
  PyTuple_SET_ITEM(__pyx_t_3, 14, __pyx_v_self->__pyx_base.spec);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.state_sampler);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.state_sampler);
  PyTuple_SET_ITEM(__pyx_t_3, 15, __pyx_v_self->__pyx_base.state_sampler);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.step_name);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.step_name);
  PyTuple_SET_ITEM(__pyx_t_3, 16, __pyx_v_self->__pyx_base.step_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.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.source, self.spec, self.state_sampler, self.step_name)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v__dict = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":7
 *     state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.source, self.spec, self.state_sampler, self.step_name)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         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(2, 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(2, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.source is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.source, self.spec, self.state_sampler, self.step_name)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.source is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_ImpulseReadOperation, (type(self), 0x216a25a, None), state
 */
  /*else*/ {
    __pyx_t_4 = (__pyx_v_self->__pyx_base.consumers != 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->__pyx_base.counter_factory != 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->__pyx_base.data_sampler != 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->__pyx_base.execution_context != 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->__pyx_base.metrics_container != 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->__pyx_base.name_context != 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->__pyx_base.operation_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->__pyx_base.receivers != ((PyObject*)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->__pyx_base.scoped_finish_state != 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->__pyx_base.scoped_process_state != 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->__pyx_base.scoped_start_state != 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->source != 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->__pyx_base.spec != 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->__pyx_base.state_sampler != 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->__pyx_base.step_name != 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.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.source is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_ImpulseReadOperation, (type(self), 0x216a25a, None), state
 *     else:
 */
  __pyx_t_5 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":13
 *         use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.source is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None
 *     if use_setstate:
 *         return __pyx_unpickle_ImpulseReadOperation, (type(self), 0x216a25a, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_ImpulseReadOperation, (type(self), 0x216a25a, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_ImpulseReadOperat); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_35037786);
    __Pyx_GIVEREF(__pyx_int_35037786);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_35037786);
    __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(2, 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.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.source is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_ImpulseReadOperation, (type(self), 0x216a25a, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_ImpulseReadOperation, (type(self), 0x216a25a, None), state
 *     else:
 *         return __pyx_unpickle_ImpulseReadOperation, (type(self), 0x216a25a, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_ImpulseReadOperation__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_ImpulseReadOperat); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_35037786);
    __Pyx_GIVEREF(__pyx_int_35037786);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_35037786);
    __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(2, 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.worker.operations.ImpulseReadOperation.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_ImpulseReadOperation, (type(self), 0x216a25a, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ImpulseReadOperation__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_7__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_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_6worker_10operations_20ImpulseReadOperation_6__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_6__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__63)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[2], 16, 0, __PYX_ERR(2, 16, __pyx_L1_error));

  /* "(tree fragment)":17
 *         return __pyx_unpickle_ImpulseReadOperation, (type(self), 0x216a25a, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_ImpulseReadOperation__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(2, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_ImpulseReadOperation__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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_ImpulseReadOperation, (type(self), 0x216a25a, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ImpulseReadOperation__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ImpulseReadOperation.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":757
 * class InMemoryWriteOperation(Operation):
 *   """A write operation that will write to an in-memory sink."""
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_22InMemoryWriteOperation_1process(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_22InMemoryWriteOperation_1process = {"process", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_22InMemoryWriteOperation_1process, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_22InMemoryWriteOperation_1process(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_o = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("process (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_o,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_o)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("process", 1, 2, 2, 1); __PYX_ERR(0, 757, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "process") < 0)) __PYX_ERR(0, 757, __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_o = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("process", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 757, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.InMemoryWriteOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_22InMemoryWriteOperation_process(__pyx_self, __pyx_v_self, __pyx_v_o);

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_22InMemoryWriteOperation_process(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_o) {
  PyObject *__pyx_r = NULL;
  __Pyx_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;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__64)
  __Pyx_RefNannySetupContext("process", 0);
  __Pyx_TraceCall("process", __pyx_f[0], 757, 0, __PYX_ERR(0, 757, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":759
 *   def process(self, o):
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:             # <<<<<<<<<<<<<<
 *       if self.debug_logging_enabled:
 *         _LOGGER.debug('Processing [%s] in %s', o, self)
 */
  /*with:*/ {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_scoped_process_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 759, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 759, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 759, __pyx_L3_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, 759, __pyx_L3_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    /*try:*/ {
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_6);
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_8);
        /*try:*/ {

          /* "apache_beam/runners/worker/operations.py":760
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:
 *       if self.debug_logging_enabled:             # <<<<<<<<<<<<<<
 *         _LOGGER.debug('Processing [%s] in %s', o, self)
 *       self.spec.output_buffer.append(
 */
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_debug_logging_enabled); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 760, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 760, __pyx_L7_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (__pyx_t_9) {

            /* "apache_beam/runners/worker/operations.py":761
 *     with self.scoped_process_state:
 *       if self.debug_logging_enabled:
 *         _LOGGER.debug('Processing [%s] in %s', o, self)             # <<<<<<<<<<<<<<
 *       self.spec.output_buffer.append(
 *           o if self.spec.write_windowed_values else o.value)
 */
            __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_LOGGER); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 761, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_debug); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 761, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_t_3 = NULL;
            __pyx_t_10 = 0;
            if (CYTHON_UNPACK_METHODS && unlikely(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_10 = 1;
              }
            }
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_4)) {
              PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_kp_u_Processing_s_in_s, __pyx_v_o, __pyx_v_self};
              __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 761, __pyx_L7_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_4)) {
              PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_kp_u_Processing_s_in_s, __pyx_v_o, __pyx_v_self};
              __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 761, __pyx_L7_error)
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_GOTREF(__pyx_t_1);
            } else
            #endif
            {
              __pyx_t_5 = PyTuple_New(3+__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 761, __pyx_L7_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_kp_u_Processing_s_in_s);
              __Pyx_GIVEREF(__pyx_kp_u_Processing_s_in_s);
              PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_10, __pyx_kp_u_Processing_s_in_s);
              __Pyx_INCREF(__pyx_v_o);
              __Pyx_GIVEREF(__pyx_v_o);
              PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_10, __pyx_v_o);
              __Pyx_INCREF(__pyx_v_self);
              __Pyx_GIVEREF(__pyx_v_self);
              PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_10, __pyx_v_self);
              __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 761, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            }
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

            /* "apache_beam/runners/worker/operations.py":760
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:
 *       if self.debug_logging_enabled:             # <<<<<<<<<<<<<<
 *         _LOGGER.debug('Processing [%s] in %s', o, self)
 *       self.spec.output_buffer.append(
 */
          }

          /* "apache_beam/runners/worker/operations.py":762
 *       if self.debug_logging_enabled:
 *         _LOGGER.debug('Processing [%s] in %s', o, self)
 *       self.spec.output_buffer.append(             # <<<<<<<<<<<<<<
 *           o if self.spec.write_windowed_values else o.value)
 * 
 */
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_spec); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 762, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_output_buffer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 762, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "apache_beam/runners/worker/operations.py":763
 *         _LOGGER.debug('Processing [%s] in %s', o, self)
 *       self.spec.output_buffer.append(
 *           o if self.spec.write_windowed_values else o.value)             # <<<<<<<<<<<<<<
 * 
 * 
 */
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_spec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 763, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_write_windowed_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 763, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 763, __pyx_L7_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (__pyx_t_9) {
            __Pyx_INCREF(__pyx_v_o);
            __pyx_t_1 = __pyx_v_o;
          } else {
            __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_o, __pyx_n_s_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 763, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_1 = __pyx_t_3;
            __pyx_t_3 = 0;
          }

          /* "apache_beam/runners/worker/operations.py":762
 *       if self.debug_logging_enabled:
 *         _LOGGER.debug('Processing [%s] in %s', o, self)
 *       self.spec.output_buffer.append(             # <<<<<<<<<<<<<<
 *           o if self.spec.write_windowed_values else o.value)
 * 
 */
          __pyx_t_11 = __Pyx_PyObject_Append(__pyx_t_4, __pyx_t_1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 762, __pyx_L7_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "apache_beam/runners/worker/operations.py":759
 *   def process(self, o):
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:             # <<<<<<<<<<<<<<
 *       if self.debug_logging_enabled:
 *         _LOGGER.debug('Processing [%s] in %s', o, self)
 */
        }
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L12_try_end;
        __pyx_L7_error:;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        /*except:*/ {
          __Pyx_AddTraceback("apache_beam.runners.worker.operations.InMemoryWriteOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_3) < 0) __PYX_ERR(0, 759, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_5 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 759, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_12 = __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_12)) __PYX_ERR(0, 759, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (__pyx_t_9 < 0) __PYX_ERR(0, 759, __pyx_L9_except_error)
          __pyx_t_13 = ((!(__pyx_t_9 != 0)) != 0);
          if (__pyx_t_13) {
            __Pyx_GIVEREF(__pyx_t_1);
            __Pyx_GIVEREF(__pyx_t_4);
            __Pyx_XGIVEREF(__pyx_t_3);
            __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_4, __pyx_t_3);
            __pyx_t_1 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; 
            __PYX_ERR(0, 759, __pyx_L9_except_error)
          }
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          goto __pyx_L8_exception_handled;
        }
        __pyx_L9_except_error:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        goto __pyx_L1_error;
        __pyx_L8_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        __pyx_L12_try_end:;
      }
    }
    /*finally:*/ {
      /*normal exit:*/{
        if (__pyx_t_2) {
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__29, NULL);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 759, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        goto __pyx_L6;
      }
      __pyx_L6:;
    }
    goto __pyx_L17;
    __pyx_L3_error:;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L1_error;
    __pyx_L17:;
  }

  /* "apache_beam/runners/worker/operations.py":757
 * class InMemoryWriteOperation(Operation):
 *   """A write operation that will write to an in-memory sink."""
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.InMemoryWriteOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":767
 * 
 * class _TaggedReceivers(dict):
 *   def __init__(self, counter_factory, step_name):             # <<<<<<<<<<<<<<
 *     self._counter_factory = counter_factory
 *     self._step_name = step_name
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_counter_factory = 0;
  PyObject *__pyx_v_step_name = 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,&__pyx_n_s_step_name,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_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)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 767, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_step_name)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 767, __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, 767, __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_self = values[0];
    __pyx_v_counter_factory = values[1];
    __pyx_v_step_name = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 767, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations._TaggedReceivers.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers___init__(__pyx_self, __pyx_v_self, __pyx_v_counter_factory, __pyx_v_step_name);

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_step_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__65)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 767, 0, __PYX_ERR(0, 767, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":768
 * class _TaggedReceivers(dict):
 *   def __init__(self, counter_factory, step_name):
 *     self._counter_factory = counter_factory             # <<<<<<<<<<<<<<
 *     self._step_name = step_name
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter_factory_2, __pyx_v_counter_factory) < 0) __PYX_ERR(0, 768, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":769
 *   def __init__(self, counter_factory, step_name):
 *     self._counter_factory = counter_factory
 *     self._step_name = step_name             # <<<<<<<<<<<<<<
 * 
 *   def __missing__(self, tag):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_step_name_2, __pyx_v_step_name) < 0) __PYX_ERR(0, 769, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":767
 * 
 * class _TaggedReceivers(dict):
 *   def __init__(self, counter_factory, step_name):             # <<<<<<<<<<<<<<
 *     self._counter_factory = counter_factory
 *     self._step_name = step_name
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations._TaggedReceivers.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":771
 *     self._step_name = step_name
 * 
 *   def __missing__(self, tag):             # <<<<<<<<<<<<<<
 *     self[tag] = receiver = ConsumerSet.create(
 *         self._counter_factory, self._step_name, tag, [], None, None, None)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_3__missing__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_3__missing__ = {"__missing__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_3__missing__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_3__missing__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_tag = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__missing__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_tag,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_tag)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__missing__", 1, 2, 2, 1); __PYX_ERR(0, 771, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__missing__") < 0)) __PYX_ERR(0, 771, __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_tag = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__missing__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 771, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations._TaggedReceivers.__missing__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_2__missing__(__pyx_self, __pyx_v_self, __pyx_v_tag);

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_2__missing__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tag) {
  PyObject *__pyx_v_receiver = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__66)
  __Pyx_RefNannySetupContext("__missing__", 0);
  __Pyx_TraceCall("__missing__", __pyx_f[0], 771, 0, __PYX_ERR(0, 771, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":772
 * 
 *   def __missing__(self, tag):
 *     self[tag] = receiver = ConsumerSet.create(             # <<<<<<<<<<<<<<
 *         self._counter_factory, self._step_name, tag, [], None, None, None)
 *     return receiver
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet), __pyx_n_s_create); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "apache_beam/runners/worker/operations.py":773
 *   def __missing__(self, tag):
 *     self[tag] = receiver = ConsumerSet.create(
 *         self._counter_factory, self._step_name, tag, [], None, None, None)             # <<<<<<<<<<<<<<
 *     return receiver
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_counter_factory_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_step_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 773, __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_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_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[8] = {__pyx_t_6, __pyx_t_3, __pyx_t_4, __pyx_v_tag, __pyx_t_5, Py_None, Py_None, Py_None};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 7+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 772, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[8] = {__pyx_t_6, __pyx_t_3, __pyx_t_4, __pyx_v_tag, __pyx_t_5, Py_None, Py_None, Py_None};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 7+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 772, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_8 = PyTuple_New(7+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 772, __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_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4);
    __Pyx_INCREF(__pyx_v_tag);
    __Pyx_GIVEREF(__pyx_v_tag);
    PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_v_tag);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_8, 3+__pyx_t_7, __pyx_t_5);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_8, 4+__pyx_t_7, Py_None);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_8, 5+__pyx_t_7, Py_None);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_8, 6+__pyx_t_7, Py_None);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 772, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":772
 * 
 *   def __missing__(self, tag):
 *     self[tag] = receiver = ConsumerSet.create(             # <<<<<<<<<<<<<<
 *         self._counter_factory, self._step_name, tag, [], None, None, None)
 *     return receiver
 */
  if (unlikely(PyObject_SetItem(__pyx_v_self, __pyx_v_tag, __pyx_t_1) < 0)) __PYX_ERR(0, 772, __pyx_L1_error)
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_receiver = __pyx_t_1;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":774
 *     self[tag] = receiver = ConsumerSet.create(
 *         self._counter_factory, self._step_name, tag, [], None, None, None)
 *     return receiver             # <<<<<<<<<<<<<<
 * 
 *   def total_output_bytes(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_receiver);
  __pyx_r = __pyx_v_receiver;
  goto __pyx_L0;

  /* "apache_beam/runners/worker/operations.py":771
 *     self._step_name = step_name
 * 
 *   def __missing__(self, tag):             # <<<<<<<<<<<<<<
 *     self[tag] = receiver = ConsumerSet.create(
 *         self._counter_factory, self._step_name, tag, [], None, None, None)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations._TaggedReceivers.__missing__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_receiver);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":776
 *     return receiver
 * 
 *   def total_output_bytes(self):             # <<<<<<<<<<<<<<
 *     # type: () -> int
 *     total = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_5total_output_bytes(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_5total_output_bytes = {"total_output_bytes", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_5total_output_bytes, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_5total_output_bytes(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("total_output_bytes (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_4total_output_bytes(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_4total_output_bytes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_total = NULL;
  PyObject *__pyx_v_receiver = NULL;
  PyObject *__pyx_v_elements = NULL;
  PyObject *__pyx_v_mean = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__67)
  __Pyx_RefNannySetupContext("total_output_bytes", 0);
  __Pyx_TraceCall("total_output_bytes", __pyx_f[0], 776, 0, __PYX_ERR(0, 776, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":778
 *   def total_output_bytes(self):
 *     # type: () -> int
 *     total = 0             # <<<<<<<<<<<<<<
 *     for receiver in self.values():
 *       elements = receiver.opcounter.element_counter.value()
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_total = __pyx_int_0;

  /* "apache_beam/runners/worker/operations.py":779
 *     # type: () -> int
 *     total = 0
 *     for receiver in self.values():             # <<<<<<<<<<<<<<
 *       elements = receiver.opcounter.element_counter.value()
 *       if elements > 0:
 */
  __pyx_t_2 = 0;
  if (unlikely(__pyx_v_self == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values");
    __PYX_ERR(0, 779, __pyx_L1_error)
  }
  __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_self, 0, __pyx_n_s_values, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 779, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_1);
  __pyx_t_1 = __pyx_t_5;
  __pyx_t_5 = 0;
  while (1) {
    __pyx_t_6 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, NULL, &__pyx_t_5, NULL, __pyx_t_4);
    if (unlikely(__pyx_t_6 == 0)) break;
    if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_XDECREF_SET(__pyx_v_receiver, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "apache_beam/runners/worker/operations.py":780
 *     total = 0
 *     for receiver in self.values():
 *       elements = receiver.opcounter.element_counter.value()             # <<<<<<<<<<<<<<
 *       if elements > 0:
 *         mean = (receiver.opcounter.mean_byte_counter.value())[0]
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_receiver, __pyx_n_s_opcounter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 780, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_element_counter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 780, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 780, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __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, 780, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF_SET(__pyx_v_elements, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "apache_beam/runners/worker/operations.py":781
 *     for receiver in self.values():
 *       elements = receiver.opcounter.element_counter.value()
 *       if elements > 0:             # <<<<<<<<<<<<<<
 *         mean = (receiver.opcounter.mean_byte_counter.value())[0]
 *         total += elements * mean
 */
    __pyx_t_5 = PyObject_RichCompare(__pyx_v_elements, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 781, __pyx_L1_error)
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 781, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_9) {

      /* "apache_beam/runners/worker/operations.py":782
 *       elements = receiver.opcounter.element_counter.value()
 *       if elements > 0:
 *         mean = (receiver.opcounter.mean_byte_counter.value())[0]             # <<<<<<<<<<<<<<
 *         total += elements * mean
 *     return total
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_receiver, __pyx_n_s_opcounter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 782, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_mean_byte_counter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 782, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 782, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __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, 782, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 782, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF_SET(__pyx_v_mean, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "apache_beam/runners/worker/operations.py":783
 *       if elements > 0:
 *         mean = (receiver.opcounter.mean_byte_counter.value())[0]
 *         total += elements * mean             # <<<<<<<<<<<<<<
 *     return total
 * 
 */
      __pyx_t_7 = PyNumber_Multiply(__pyx_v_elements, __pyx_v_mean); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 783, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_v_total, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 783, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF_SET(__pyx_v_total, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "apache_beam/runners/worker/operations.py":781
 *     for receiver in self.values():
 *       elements = receiver.opcounter.element_counter.value()
 *       if elements > 0:             # <<<<<<<<<<<<<<
 *         mean = (receiver.opcounter.mean_byte_counter.value())[0]
 *         total += elements * mean
 */
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":784
 *         mean = (receiver.opcounter.mean_byte_counter.value())[0]
 *         total += elements * mean
 *     return total             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_total);
  __pyx_r = __pyx_v_total;
  goto __pyx_L0;

  /* "apache_beam/runners/worker/operations.py":776
 *     return receiver
 * 
 *   def total_output_bytes(self):             # <<<<<<<<<<<<<<
 *     # type: () -> int
 *     total = 0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations._TaggedReceivers.total_output_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_total);
  __Pyx_XDECREF(__pyx_v_receiver);
  __Pyx_XDECREF(__pyx_v_elements);
  __Pyx_XDECREF(__pyx_v_mean);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":800
 *   """A Do operation that will execute a custom DoFn for each input element."""
 * 
 *   def __init__(self,             # <<<<<<<<<<<<<<
 *                name,  # type: common.NameContext
 *                spec,  # operation_specs.WorkerDoFn  # need to fix this type
 */

/* Python wrapper */
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_spec = 0;
  PyObject *__pyx_v_counter_factory = 0;
  PyObject *__pyx_v_sampler = 0;
  PyObject *__pyx_v_side_input_maps = 0;
  PyObject *__pyx_v_user_state_context = 0;
  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_name_2,&__pyx_n_s_spec,&__pyx_n_s_counter_factory,&__pyx_n_s_sampler,&__pyx_n_s_side_input_maps,&__pyx_n_s_user_state_context,0};
    PyObject* values[6] = {0,0,0,0,0,0};

    /* "apache_beam/runners/worker/operations.py":805
 *                counter_factory,
 *                sampler,
 *                side_input_maps=None,             # <<<<<<<<<<<<<<
 *                user_state_context=None,
 *               ):
 */
    values[4] = ((PyObject *)Py_None);

    /* "apache_beam/runners/worker/operations.py":806
 *                sampler,
 *                side_input_maps=None,
 *                user_state_context=None,             # <<<<<<<<<<<<<<
 *               ):
 *     super(DoOperation, self).__init__(name, spec, counter_factory, sampler)
 */
    values[5] = ((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  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_name_2)) != 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_spec)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 6, 1); __PYX_ERR(0, 800, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_counter_factory)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 6, 2); __PYX_ERR(0, 800, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sampler)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 6, 3); __PYX_ERR(0, 800, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_side_input_maps);
          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_user_state_context);
          if (value) { values[5] = 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, 800, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_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);
        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_name = values[0];
    __pyx_v_spec = values[1];
    __pyx_v_counter_factory = values[2];
    __pyx_v_sampler = values[3];
    __pyx_v_side_input_maps = values[4];
    __pyx_v_user_state_context = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 800, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation___init__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self), __pyx_v_name, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_sampler, __pyx_v_side_input_maps, __pyx_v_user_state_context);

  /* "apache_beam/runners/worker/operations.py":800
 *   """A Do operation that will execute a custom DoFn for each input element."""
 * 
 *   def __init__(self,             # <<<<<<<<<<<<<<
 *                name,  # type: common.NameContext
 *                spec,  # operation_specs.WorkerDoFn  # need to fix this type
 */

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_spec, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_sampler, PyObject *__pyx_v_side_input_maps, PyObject *__pyx_v_user_state_context) {
  CYTHON_UNUSED PyObject *__pyx_v__ = NULL;
  int __pyx_r;
  __Pyx_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;
  PyObject *(*__pyx_t_9)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 800, 0, __PYX_ERR(0, 800, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":808
 *                user_state_context=None,
 *               ):
 *     super(DoOperation, self).__init__(name, spec, counter_factory, sampler)             # <<<<<<<<<<<<<<
 *     self.side_input_maps = side_input_maps
 *     self.user_state_context = user_state_context
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation));
  __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, 808, __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, 808, __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[5] = {__pyx_t_3, __pyx_v_name, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_sampler};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 4+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 808, __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[5] = {__pyx_t_3, __pyx_v_name, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_sampler};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 4+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 808, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(4+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 808, __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_name);
    __Pyx_GIVEREF(__pyx_v_name);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_name);
    __Pyx_INCREF(__pyx_v_spec);
    __Pyx_GIVEREF(__pyx_v_spec);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_spec);
    __Pyx_INCREF(__pyx_v_counter_factory);
    __Pyx_GIVEREF(__pyx_v_counter_factory);
    PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_counter_factory);
    __Pyx_INCREF(__pyx_v_sampler);
    __Pyx_GIVEREF(__pyx_v_sampler);
    PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_4, __pyx_v_sampler);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 808, __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/worker/operations.py":809
 *               ):
 *     super(DoOperation, self).__init__(name, spec, counter_factory, sampler)
 *     self.side_input_maps = side_input_maps             # <<<<<<<<<<<<<<
 *     self.user_state_context = user_state_context
 *     self.tagged_receivers = None  # type: Optional[_TaggedReceivers]
 */
  __Pyx_INCREF(__pyx_v_side_input_maps);
  __Pyx_GIVEREF(__pyx_v_side_input_maps);
  __Pyx_GOTREF(__pyx_v_self->side_input_maps);
  __Pyx_DECREF(__pyx_v_self->side_input_maps);
  __pyx_v_self->side_input_maps = __pyx_v_side_input_maps;

  /* "apache_beam/runners/worker/operations.py":810
 *     super(DoOperation, self).__init__(name, spec, counter_factory, sampler)
 *     self.side_input_maps = side_input_maps
 *     self.user_state_context = user_state_context             # <<<<<<<<<<<<<<
 *     self.tagged_receivers = None  # type: Optional[_TaggedReceivers]
 *     # A mapping of timer tags to the input "PCollections" they come in on.
 */
  __Pyx_INCREF(__pyx_v_user_state_context);
  __Pyx_GIVEREF(__pyx_v_user_state_context);
  __Pyx_GOTREF(__pyx_v_self->user_state_context);
  __Pyx_DECREF(__pyx_v_self->user_state_context);
  __pyx_v_self->user_state_context = __pyx_v_user_state_context;

  /* "apache_beam/runners/worker/operations.py":811
 *     self.side_input_maps = side_input_maps
 *     self.user_state_context = user_state_context
 *     self.tagged_receivers = None  # type: Optional[_TaggedReceivers]             # <<<<<<<<<<<<<<
 *     # A mapping of timer tags to the input "PCollections" they come in on.
 *     self.input_info = None  # type: Optional[OpInputInfo]
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->tagged_receivers);
  __Pyx_DECREF(__pyx_v_self->tagged_receivers);
  __pyx_v_self->tagged_receivers = Py_None;

  /* "apache_beam/runners/worker/operations.py":813
 *     self.tagged_receivers = None  # type: Optional[_TaggedReceivers]
 *     # A mapping of timer tags to the input "PCollections" they come in on.
 *     self.input_info = None  # type: Optional[OpInputInfo]             # <<<<<<<<<<<<<<
 * 
 *     # See fn_data in dataflow_runner.py
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->input_info);
  __Pyx_DECREF(__pyx_v_self->input_info);
  __pyx_v_self->input_info = Py_None;

  /* "apache_beam/runners/worker/operations.py":817
 *     # See fn_data in dataflow_runner.py
 *     # TODO: Store all the items from spec?
 *     self.fn, _, _, _, _ = (pickler.loads(self.spec.serialized_fn))             # <<<<<<<<<<<<<<
 * 
 *   def _read_side_inputs(self, tags_and_types):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pickler); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_loads); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.spec, __pyx_n_s_serialized_fn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  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_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __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 != 5)) {
      if (size > 5) __Pyx_RaiseTooManyValuesError(5);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 817, __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_2 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 2); 
      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 3); 
      __pyx_t_7 = PyTuple_GET_ITEM(sequence, 4); 
    } else {
      __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 2); 
      __pyx_t_6 = PyList_GET_ITEM(sequence, 3); 
      __pyx_t_7 = PyList_GET_ITEM(sequence, 4); 
    }
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_7);
    #else
    {
      Py_ssize_t i;
      PyObject** temps[5] = {&__pyx_t_5,&__pyx_t_2,&__pyx_t_3,&__pyx_t_6,&__pyx_t_7};
      for (i=0; i < 5; i++) {
        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 817, __pyx_L1_error)
        __Pyx_GOTREF(item);
        *(temps[i]) = item;
      }
    }
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    PyObject** temps[5] = {&__pyx_t_5,&__pyx_t_2,&__pyx_t_3,&__pyx_t_6,&__pyx_t_7};
    __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 817, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
    for (index=0; index < 5; index++) {
      PyObject* item = __pyx_t_9(__pyx_t_8); if (unlikely(!item)) goto __pyx_L3_unpacking_failed;
      __Pyx_GOTREF(item);
      *(temps[index]) = item;
    }
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 5) < 0) __PYX_ERR(0, 817, __pyx_L1_error)
    __pyx_t_9 = NULL;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_9 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 817, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __Pyx_GIVEREF(__pyx_t_5);
  __Pyx_GOTREF(__pyx_v_self->fn);
  __Pyx_DECREF(__pyx_v_self->fn);
  __pyx_v_self->fn = __pyx_t_5;
  __pyx_t_5 = 0;
  __pyx_v__ = __pyx_t_2;
  __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v__, __pyx_t_3);
  __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v__, __pyx_t_6);
  __pyx_t_6 = 0;
  __Pyx_DECREF_SET(__pyx_v__, __pyx_t_7);
  __pyx_t_7 = 0;

  /* "apache_beam/runners/worker/operations.py":800
 *   """A Do operation that will execute a custom DoFn for each input element."""
 * 
 *   def __init__(self,             # <<<<<<<<<<<<<<
 *                name,  # type: common.NameContext
 *                spec,  # operation_specs.WorkerDoFn  # need to fix this type
 */

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_11apache_beam_7runners_6worker_10operations_11DoOperation_4generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "apache_beam/runners/worker/operations.py":819
 *     self.fn, _, _, _, _ = (pickler.loads(self.spec.serialized_fn))
 * 
 *   def _read_side_inputs(self, tags_and_types):             # <<<<<<<<<<<<<<
 *     # type: (...) -> Iterator[apache_sideinputs.SideInputMap]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_3_read_side_inputs(PyObject *__pyx_v_self, PyObject *__pyx_v_tags_and_types); /*proto*/
static char __pyx_doc_11apache_beam_7runners_6worker_10operations_11DoOperation_2_read_side_inputs[] = "Generator reading side inputs in the order prescribed by tags_and_types.\n\n    Args:\n      tags_and_types: List of tuples (tag, type). Each side input has a string\n        tag that is specified in the worker instruction. The type is actually\n        a boolean which is True for singleton input (read just first value)\n        and False for collection input (read all values).\n\n    Yields:\n      With each iteration it yields the result of reading an entire side source\n      either in singleton or collection mode according to the tags_and_types\n      argument.\n    ";
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_3_read_side_inputs = {"_read_side_inputs", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_3_read_side_inputs, METH_O, __pyx_doc_11apache_beam_7runners_6worker_10operations_11DoOperation_2_read_side_inputs};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_3_read_side_inputs(PyObject *__pyx_v_self, PyObject *__pyx_v_tags_and_types) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_read_side_inputs (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_2_read_side_inputs(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self), ((PyObject *)__pyx_v_tags_and_types));

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

/* "apache_beam/runners/worker/operations.py":854
 *       # the for loop.
 *       # pylint: disable=cell-var-from-loop
 *       for si in filter(lambda o: o.tag == side_tag, self.spec.side_inputs):             # <<<<<<<<<<<<<<
 *         if not isinstance(si, operation_specs.WorkerSideInputSource):
 *           raise NotImplementedError('Unknown side input type: %r' % si)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_17_read_side_inputs_lambda1(PyObject *__pyx_self, PyObject *__pyx_v_o); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_17_read_side_inputs_lambda1 = {"lambda1", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_17_read_side_inputs_lambda1, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_17_read_side_inputs_lambda1(PyObject *__pyx_self, PyObject *__pyx_v_o) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda1(__pyx_self, ((PyObject *)__pyx_v_o));

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

static PyObject *__pyx_lambda_funcdef_lambda1(PyObject *__pyx_self, PyObject *__pyx_v_o) {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs *__pyx_cur_scope;
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_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("lambda1", 0);
  __pyx_outer_scope = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_TraceCall("lambda1", __pyx_f[0], 854, 0, __PYX_ERR(0, 854, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_o, __pyx_n_s_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(!__pyx_cur_scope->__pyx_v_side_tag)) { __Pyx_RaiseClosureNameError("side_tag"); __PYX_ERR(0, 854, __pyx_L1_error) }
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_cur_scope->__pyx_v_side_tag, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 854, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation._read_side_inputs.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":819
 *     self.fn, _, _, _, _ = (pickler.loads(self.spec.serialized_fn))
 * 
 *   def _read_side_inputs(self, tags_and_types):             # <<<<<<<<<<<<<<
 *     # type: (...) -> Iterator[apache_sideinputs.SideInputMap]
 * 
 */

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_2_read_side_inputs(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v_tags_and_types) {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_read_side_inputs", 0);
  __pyx_cur_scope = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs *)__pyx_tp_new_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs(__pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 819, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __pyx_cur_scope->__pyx_v_tags_and_types = __pyx_v_tags_and_types;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_tags_and_types);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_tags_and_types);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_11apache_beam_7runners_6worker_10operations_11DoOperation_4generator, __pyx_codeobj__68, (PyObject *) __pyx_cur_scope, __pyx_n_s_read_side_inputs, __pyx_n_s_DoOperation__read_side_inputs, __pyx_n_s_apache_beam_runners_worker_opera); if (unlikely(!gen)) __PYX_ERR(0, 819, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation._read_side_inputs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_11apache_beam_7runners_6worker_10operations_11DoOperation_4generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs *__pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *(*__pyx_t_11)(PyObject *);
  Py_ssize_t __pyx_t_12;
  PyObject *(*__pyx_t_13)(PyObject *);
  int __pyx_t_14;
  int __pyx_t_15;
  int __pyx_t_16;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_read_side_inputs", 0);
  __Pyx_TraceFrameInit(__pyx_codeobj__68)
  __Pyx_TraceCall("_read_side_inputs", __pyx_f[0], 819, 0, __PYX_ERR(0, 819, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L11_resume_from_yield;
    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, 819, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":837
 *     # Only call this on the old path where side_input_maps was not
 *     # provided directly.
 *     assert self.side_input_maps is None             # <<<<<<<<<<<<<<
 * 
 *     # We will read the side inputs in the order prescribed by the
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = (__pyx_cur_scope->__pyx_v_self->side_input_maps == Py_None);
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 837, __pyx_L1_error)
    }
  }
  #endif

  /* "apache_beam/runners/worker/operations.py":847
 *     # specification. This can happen for instance if the source has been
 *     # sharded into several files.
 *     for i, (side_tag, view_class, view_options) in enumerate(tags_and_types):             # <<<<<<<<<<<<<<
 *       sources = []
 *       # Using the side_tag in the lambda below will trigger a pylint warning.
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_t_2 = __pyx_int_0;
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_tags_and_types)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_tags_and_types)) {
    __pyx_t_3 = __pyx_cur_scope->__pyx_v_tags_and_types; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_tags_and_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 847, __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, 847, __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, 847, __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, 847, __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, 847, __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, 847, __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, 847, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
      PyObject* sequence = __pyx_t_6;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 3)) {
        if (size > 3) __Pyx_RaiseTooManyValuesError(3);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 847, __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); 
        __pyx_t_9 = PyTuple_GET_ITEM(sequence, 2); 
      } else {
        __pyx_t_7 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
        __pyx_t_9 = PyList_GET_ITEM(sequence, 2); 
      }
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_9);
      #else
      __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 847, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 847, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 847, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      #endif
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_10 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 847, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext;
      index = 0; __pyx_t_7 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      index = 1; __pyx_t_8 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_8)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_8);
      index = 2; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_9);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 3) < 0) __PYX_ERR(0, 847, __pyx_L1_error)
      __pyx_t_11 = NULL;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_11 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 847, __pyx_L1_error)
      __pyx_L7_unpacking_done:;
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_side_tag);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_side_tag, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    __pyx_t_7 = 0;
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_view_class);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_view_class, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_8);
    __pyx_t_8 = 0;
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_view_options);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_view_options, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_9);
    __pyx_t_9 = 0;
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_i);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_i, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 847, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2);
    __pyx_t_2 = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "apache_beam/runners/worker/operations.py":848
 *     # sharded into several files.
 *     for i, (side_tag, view_class, view_options) in enumerate(tags_and_types):
 *       sources = []             # <<<<<<<<<<<<<<
 *       # Using the side_tag in the lambda below will trigger a pylint warning.
 *       # However in this case it is fine because the lambda is used right away
 */
    __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 848, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_sources);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_sources, ((PyObject*)__pyx_t_6));
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;

    /* "apache_beam/runners/worker/operations.py":854
 *       # the for loop.
 *       # pylint: disable=cell-var-from-loop
 *       for si in filter(lambda o: o.tag == side_tag, self.spec.side_inputs):             # <<<<<<<<<<<<<<
 *         if not isinstance(si, operation_specs.WorkerSideInputSource):
 *           raise NotImplementedError('Unknown side input type: %r' % si)
 */
    __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_17_read_side_inputs_lambda1, 0, __pyx_n_s_read_side_inputs_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 854, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->__pyx_base.spec, __pyx_n_s_side_inputs); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 854, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 854, __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_9);
    PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_9);
    __pyx_t_6 = 0;
    __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 854, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (likely(PyList_CheckExact(__pyx_t_9)) || PyTuple_CheckExact(__pyx_t_9)) {
      __pyx_t_8 = __pyx_t_9; __Pyx_INCREF(__pyx_t_8); __pyx_t_12 = 0;
      __pyx_t_13 = NULL;
    } else {
      __pyx_t_12 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 854, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_13 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 854, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    for (;;) {
      if (likely(!__pyx_t_13)) {
        if (likely(PyList_CheckExact(__pyx_t_8))) {
          if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_8)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_9 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_12); __Pyx_INCREF(__pyx_t_9); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 854, __pyx_L1_error)
          #else
          __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 854, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          #endif
        } else {
          if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_12); __Pyx_INCREF(__pyx_t_9); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 854, __pyx_L1_error)
          #else
          __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 854, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          #endif
        }
      } else {
        __pyx_t_9 = __pyx_t_13(__pyx_t_8);
        if (unlikely(!__pyx_t_9)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 854, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_9);
      }
      __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_si);
      __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_si, __pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_9);
      __pyx_t_9 = 0;

      /* "apache_beam/runners/worker/operations.py":855
 *       # pylint: disable=cell-var-from-loop
 *       for si in filter(lambda o: o.tag == side_tag, self.spec.side_inputs):
 *         if not isinstance(si, operation_specs.WorkerSideInputSource):             # <<<<<<<<<<<<<<
 *           raise NotImplementedError('Unknown side input type: %r' % si)
 *         sources.append(si.source)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_operation_specs); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 855, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_WorkerSideInputSource); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 855, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_1 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v_si, __pyx_t_6); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 855, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_14 = ((!(__pyx_t_1 != 0)) != 0);
      if (unlikely(__pyx_t_14)) {

        /* "apache_beam/runners/worker/operations.py":856
 *       for si in filter(lambda o: o.tag == side_tag, self.spec.side_inputs):
 *         if not isinstance(si, operation_specs.WorkerSideInputSource):
 *           raise NotImplementedError('Unknown side input type: %r' % si)             # <<<<<<<<<<<<<<
 *         sources.append(si.source)
 *       si_counter = opcounters.SideInputReadCounter(
 */
        __pyx_t_6 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Unknown_side_input_type_r, __pyx_cur_scope->__pyx_v_si); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 856, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_NotImplementedError, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 856, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_Raise(__pyx_t_9, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __PYX_ERR(0, 856, __pyx_L1_error)

        /* "apache_beam/runners/worker/operations.py":855
 *       # pylint: disable=cell-var-from-loop
 *       for si in filter(lambda o: o.tag == side_tag, self.spec.side_inputs):
 *         if not isinstance(si, operation_specs.WorkerSideInputSource):             # <<<<<<<<<<<<<<
 *           raise NotImplementedError('Unknown side input type: %r' % si)
 *         sources.append(si.source)
 */
      }

      /* "apache_beam/runners/worker/operations.py":857
 *         if not isinstance(si, operation_specs.WorkerSideInputSource):
 *           raise NotImplementedError('Unknown side input type: %r' % si)
 *         sources.append(si.source)             # <<<<<<<<<<<<<<
 *       si_counter = opcounters.SideInputReadCounter(
 *           self.counter_factory,
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_si, __pyx_n_s_source); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 857, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_15 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_sources, __pyx_t_9); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 857, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "apache_beam/runners/worker/operations.py":854
 *       # the for loop.
 *       # pylint: disable=cell-var-from-loop
 *       for si in filter(lambda o: o.tag == side_tag, self.spec.side_inputs):             # <<<<<<<<<<<<<<
 *         if not isinstance(si, operation_specs.WorkerSideInputSource):
 *           raise NotImplementedError('Unknown side input type: %r' % si)
 */
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "apache_beam/runners/worker/operations.py":858
 *           raise NotImplementedError('Unknown side input type: %r' % si)
 *         sources.append(si.source)
 *       si_counter = opcounters.SideInputReadCounter(             # <<<<<<<<<<<<<<
 *           self.counter_factory,
 *           self.state_sampler,
 */
    __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 858, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self->__pyx_base.counter_factory);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self->__pyx_base.counter_factory);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_cur_scope->__pyx_v_self->__pyx_base.counter_factory);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self->__pyx_base.state_sampler);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self->__pyx_base.state_sampler);
    PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_cur_scope->__pyx_v_self->__pyx_base.state_sampler);

    /* "apache_beam/runners/worker/operations.py":861
 *           self.counter_factory,
 *           self.state_sampler,
 *           declaring_step=self.name_context.step_name,             # <<<<<<<<<<<<<<
 *           # Inputs are 1-indexed, so we add 1 to i in the side input id
 *           input_index=i + 1)
 */
    __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 861, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->__pyx_base.name_context, __pyx_n_s_step_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 861, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_declaring_step, __pyx_t_6) < 0) __PYX_ERR(0, 861, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "apache_beam/runners/worker/operations.py":863
 *           declaring_step=self.name_context.step_name,
 *           # Inputs are 1-indexed, so we add 1 to i in the side input id
 *           input_index=i + 1)             # <<<<<<<<<<<<<<
 *       element_counter = opcounters.OperationCounters(
 *           self.counter_factory,
 */
    __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_cur_scope->__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 863, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_input_index, __pyx_t_6) < 0) __PYX_ERR(0, 861, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "apache_beam/runners/worker/operations.py":858
 *           raise NotImplementedError('Unknown side input type: %r' % si)
 *         sources.append(si.source)
 *       si_counter = opcounters.SideInputReadCounter(             # <<<<<<<<<<<<<<
 *           self.counter_factory,
 *           self.state_sampler,
 */
    __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter), __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 858, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_si_counter);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_si_counter, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;

    /* "apache_beam/runners/worker/operations.py":866
 *       element_counter = opcounters.OperationCounters(
 *           self.counter_factory,
 *           self.name_context.step_name,             # <<<<<<<<<<<<<<
 *           view_options['coder'],
 *           i,
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->__pyx_base.name_context, __pyx_n_s_step_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 866, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);

    /* "apache_beam/runners/worker/operations.py":867
 *           self.counter_factory,
 *           self.name_context.step_name,
 *           view_options['coder'],             # <<<<<<<<<<<<<<
 *           i,
 *           suffix='side-input')
 */
    __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_cur_scope->__pyx_v_view_options, __pyx_n_u_coder); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 867, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);

    /* "apache_beam/runners/worker/operations.py":864
 *           # Inputs are 1-indexed, so we add 1 to i in the side input id
 *           input_index=i + 1)
 *       element_counter = opcounters.OperationCounters(             # <<<<<<<<<<<<<<
 *           self.counter_factory,
 *           self.name_context.step_name,
 */
    __pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 864, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self->__pyx_base.counter_factory);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self->__pyx_base.counter_factory);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_cur_scope->__pyx_v_self->__pyx_base.counter_factory);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_9);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_i);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_i);
    PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_cur_scope->__pyx_v_i);
    __pyx_t_6 = 0;
    __pyx_t_9 = 0;

    /* "apache_beam/runners/worker/operations.py":869
 *           view_options['coder'],
 *           i,
 *           suffix='side-input')             # <<<<<<<<<<<<<<
 *       iterator_fn = sideinputs.get_iterator_fn_for_sources(
 *           sources, read_counter=si_counter, element_counter=element_counter)
 */
    __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 869, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_suffix, __pyx_kp_u_side_input) < 0) __PYX_ERR(0, 869, __pyx_L1_error)

    /* "apache_beam/runners/worker/operations.py":864
 *           # Inputs are 1-indexed, so we add 1 to i in the side input id
 *           input_index=i + 1)
 *       element_counter = opcounters.OperationCounters(             # <<<<<<<<<<<<<<
 *           self.counter_factory,
 *           self.name_context.step_name,
 */
    __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters), __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 864, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_element_counter);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_element_counter, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;

    /* "apache_beam/runners/worker/operations.py":870
 *           i,
 *           suffix='side-input')
 *       iterator_fn = sideinputs.get_iterator_fn_for_sources(             # <<<<<<<<<<<<<<
 *           sources, read_counter=si_counter, element_counter=element_counter)
 *       yield apache_sideinputs.SideInputMap(
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_sideinputs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 870, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_get_iterator_fn_for_sources); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 870, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "apache_beam/runners/worker/operations.py":871
 *           suffix='side-input')
 *       iterator_fn = sideinputs.get_iterator_fn_for_sources(
 *           sources, read_counter=si_counter, element_counter=element_counter)             # <<<<<<<<<<<<<<
 *       yield apache_sideinputs.SideInputMap(
 *           view_class, view_options, sideinputs.EmulatedIterable(iterator_fn))
 */
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 870, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sources);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sources);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_cur_scope->__pyx_v_sources);
    __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 871, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_read_counter, __pyx_cur_scope->__pyx_v_si_counter) < 0) __PYX_ERR(0, 871, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_element_counter, __pyx_cur_scope->__pyx_v_element_counter) < 0) __PYX_ERR(0, 871, __pyx_L1_error)

    /* "apache_beam/runners/worker/operations.py":870
 *           i,
 *           suffix='side-input')
 *       iterator_fn = sideinputs.get_iterator_fn_for_sources(             # <<<<<<<<<<<<<<
 *           sources, read_counter=si_counter, element_counter=element_counter)
 *       yield apache_sideinputs.SideInputMap(
 */
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 870, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_iterator_fn);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_iterator_fn, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    __pyx_t_7 = 0;

    /* "apache_beam/runners/worker/operations.py":872
 *       iterator_fn = sideinputs.get_iterator_fn_for_sources(
 *           sources, read_counter=si_counter, element_counter=element_counter)
 *       yield apache_sideinputs.SideInputMap(             # <<<<<<<<<<<<<<
 *           view_class, view_options, sideinputs.EmulatedIterable(iterator_fn))
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_apache_sideinputs); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 872, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_SideInputMap); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 872, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "apache_beam/runners/worker/operations.py":873
 *           sources, read_counter=si_counter, element_counter=element_counter)
 *       yield apache_sideinputs.SideInputMap(
 *           view_class, view_options, sideinputs.EmulatedIterable(iterator_fn))             # <<<<<<<<<<<<<<
 * 
 *   def setup(self, data_sampler=None):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_sideinputs); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 873, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_EmulatedIterable); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 873, __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 && unlikely(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_8 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_9, __pyx_cur_scope->__pyx_v_iterator_fn) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_cur_scope->__pyx_v_iterator_fn);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 873, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = NULL;
    __pyx_t_16 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_16 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_cur_scope->__pyx_v_view_class, __pyx_cur_scope->__pyx_v_view_options, __pyx_t_8};
      __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_16, 3+__pyx_t_16); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 872, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_cur_scope->__pyx_v_view_class, __pyx_cur_scope->__pyx_v_view_options, __pyx_t_8};
      __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_16, 3+__pyx_t_16); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 872, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(3+__pyx_t_16); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 872, __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_cur_scope->__pyx_v_view_class);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_view_class);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_16, __pyx_cur_scope->__pyx_v_view_class);
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_view_options);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_view_options);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_16, __pyx_cur_scope->__pyx_v_view_options);
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_16, __pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 872, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    __Pyx_XGIVEREF(__pyx_t_2);
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
    __Pyx_XGIVEREF(__pyx_t_3);
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_3;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_4;
    __pyx_cur_scope->__pyx_t_3 = __pyx_t_5;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_TraceReturn(__pyx_r, 0);
    __Pyx_RefNannyFinishContext();
    __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L11_resume_from_yield:;
    __pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
    __pyx_cur_scope->__pyx_t_0 = 0;
    __Pyx_XGOTREF(__pyx_t_2);
    __pyx_t_3 = __pyx_cur_scope->__pyx_t_1;
    __pyx_cur_scope->__pyx_t_1 = 0;
    __Pyx_XGOTREF(__pyx_t_3);
    __pyx_t_4 = __pyx_cur_scope->__pyx_t_2;
    __pyx_t_5 = __pyx_cur_scope->__pyx_t_3;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 872, __pyx_L1_error)

    /* "apache_beam/runners/worker/operations.py":847
 *     # specification. This can happen for instance if the source has been
 *     # sharded into several files.
 *     for i, (side_tag, view_class, view_options) in enumerate(tags_and_types):             # <<<<<<<<<<<<<<
 *       sources = []
 *       # Using the side_tag in the lambda below will trigger a pylint warning.
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "apache_beam/runners/worker/operations.py":819
 *     self.fn, _, _, _, _ = (pickler.loads(self.spec.serialized_fn))
 * 
 *   def _read_side_inputs(self, tags_and_types):             # <<<<<<<<<<<<<<
 *     # type: (...) -> Iterator[apache_sideinputs.SideInputMap]
 * 
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("_read_side_inputs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #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/worker/operations.py":875
 *           view_class, view_options, sideinputs.EmulatedIterable(iterator_fn))
 * 
 *   def setup(self, data_sampler=None):             # <<<<<<<<<<<<<<
 *     # type: (Optional[DataSampler]) -> None
 *     with self.scoped_start_state:
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_6setup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_6setup = {"setup", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_6setup, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_6setup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data_sampler = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setup (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data_sampler,0};
    PyObject* values[1] = {0};
    values[0] = ((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  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_data_sampler);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setup") < 0)) __PYX_ERR(0, 875, __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_data_sampler = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setup", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 875, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.setup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_5setup(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self), __pyx_v_data_sampler);

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_5setup(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v_data_sampler) {
  PyObject *__pyx_v_fn = NULL;
  PyObject *__pyx_v_args = NULL;
  PyObject *__pyx_v_kwargs = NULL;
  PyObject *__pyx_v_tags_and_types = NULL;
  PyObject *__pyx_v_window_fn = NULL;
  PyObject *__pyx_v_state = NULL;
  PyObject *__pyx_v_index = NULL;
  PyObject *__pyx_v_tag = NULL;
  PyObject *__pyx_8genexpr3__pyx_v_spec = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_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;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *(*__pyx_t_12)(PyObject *);
  int __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  int __pyx_t_15;
  PyObject *(*__pyx_t_16)(PyObject *);
  int __pyx_t_17;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__69)
  __Pyx_RefNannySetupContext("setup", 0);
  __Pyx_TraceCall("setup", __pyx_f[0], 875, 0, __PYX_ERR(0, 875, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":877
 *   def setup(self, data_sampler=None):
 *     # type: (Optional[DataSampler]) -> None
 *     with self.scoped_start_state:             # <<<<<<<<<<<<<<
 *       super(DoOperation, self).setup(data_sampler)
 * 
 */
  /*with:*/ {
    __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_start_state, __pyx_n_s_exit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 877, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_start_state, __pyx_n_s_enter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 877, __pyx_L3_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_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, 877, __pyx_L3_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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/worker/operations.py":878
 *     # type: (Optional[DataSampler]) -> None
 *     with self.scoped_start_state:
 *       super(DoOperation, self).setup(data_sampler)             # <<<<<<<<<<<<<<
 * 
 *       # See fn_data in dataflow_runner.py
 */
          __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 878, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_INCREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation));
          __Pyx_GIVEREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation));
          PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation));
          __Pyx_INCREF(((PyObject *)__pyx_v_self));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
          PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self));
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 878, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_setup); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 878, __pyx_L7_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_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_data_sampler) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_data_sampler);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 878, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "apache_beam/runners/worker/operations.py":882
 *       # See fn_data in dataflow_runner.py
 *       fn, args, kwargs, tags_and_types, window_fn = (
 *           pickler.loads(self.spec.serialized_fn))             # <<<<<<<<<<<<<<
 * 
 *       state = common.DoFnState(self.counter_factory)
 */
          __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pickler); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 882, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_loads); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 882, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.spec, __pyx_n_s_serialized_fn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 882, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_8 = NULL;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
            __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
            if (likely(__pyx_t_8)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_8);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_4, function);
            }
          }
          __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 882, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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 != 5)) {
              if (size > 5) __Pyx_RaiseTooManyValuesError(5);
              else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
              __PYX_ERR(0, 881, __pyx_L7_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            if (likely(PyTuple_CheckExact(sequence))) {
              __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
              __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
              __pyx_t_8 = PyTuple_GET_ITEM(sequence, 2); 
              __pyx_t_9 = PyTuple_GET_ITEM(sequence, 3); 
              __pyx_t_10 = PyTuple_GET_ITEM(sequence, 4); 
            } else {
              __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
              __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
              __pyx_t_8 = PyList_GET_ITEM(sequence, 2); 
              __pyx_t_9 = PyList_GET_ITEM(sequence, 3); 
              __pyx_t_10 = PyList_GET_ITEM(sequence, 4); 
            }
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_10);
            #else
            {
              Py_ssize_t i;
              PyObject** temps[5] = {&__pyx_t_4,&__pyx_t_3,&__pyx_t_8,&__pyx_t_9,&__pyx_t_10};
              for (i=0; i < 5; i++) {
                PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 881, __pyx_L7_error)
                __Pyx_GOTREF(item);
                *(temps[i]) = item;
              }
            }
            #endif
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          } else {
            Py_ssize_t index = -1;
            PyObject** temps[5] = {&__pyx_t_4,&__pyx_t_3,&__pyx_t_8,&__pyx_t_9,&__pyx_t_10};
            __pyx_t_11 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 881, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext;
            for (index=0; index < 5; index++) {
              PyObject* item = __pyx_t_12(__pyx_t_11); if (unlikely(!item)) goto __pyx_L13_unpacking_failed;
              __Pyx_GOTREF(item);
              *(temps[index]) = item;
            }
            if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 5) < 0) __PYX_ERR(0, 881, __pyx_L7_error)
            __pyx_t_12 = NULL;
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            goto __pyx_L14_unpacking_done;
            __pyx_L13_unpacking_failed:;
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __pyx_t_12 = NULL;
            if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
            __PYX_ERR(0, 881, __pyx_L7_error)
            __pyx_L14_unpacking_done:;
          }

          /* "apache_beam/runners/worker/operations.py":881
 * 
 *       # See fn_data in dataflow_runner.py
 *       fn, args, kwargs, tags_and_types, window_fn = (             # <<<<<<<<<<<<<<
 *           pickler.loads(self.spec.serialized_fn))
 * 
 */
          __pyx_v_fn = __pyx_t_4;
          __pyx_t_4 = 0;
          __pyx_v_args = __pyx_t_3;
          __pyx_t_3 = 0;
          __pyx_v_kwargs = __pyx_t_8;
          __pyx_t_8 = 0;
          __pyx_v_tags_and_types = __pyx_t_9;
          __pyx_t_9 = 0;
          __pyx_v_window_fn = __pyx_t_10;
          __pyx_t_10 = 0;

          /* "apache_beam/runners/worker/operations.py":884
 *           pickler.loads(self.spec.serialized_fn))
 * 
 *       state = common.DoFnState(self.counter_factory)             # <<<<<<<<<<<<<<
 *       state.step_name = self.name_context.logging_name()
 * 
 */
          __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_common); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 884, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_DoFnState); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 884, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __pyx_t_10 = NULL;
          if (CYTHON_UNPACK_METHODS && unlikely(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_2 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_v_self->__pyx_base.counter_factory) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_self->__pyx_base.counter_factory);
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 884, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __pyx_v_state = __pyx_t_2;
          __pyx_t_2 = 0;

          /* "apache_beam/runners/worker/operations.py":885
 * 
 *       state = common.DoFnState(self.counter_factory)
 *       state.step_name = self.name_context.logging_name()             # <<<<<<<<<<<<<<
 * 
 *       # Tag to output index map used to dispatch the output values emitted
 */
          __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.name_context, __pyx_n_s_logging_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 885, __pyx_L7_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_2 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_9);
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 885, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (__Pyx_PyObject_SetAttrStr(__pyx_v_state, __pyx_n_s_step_name, __pyx_t_2) < 0) __PYX_ERR(0, 885, __pyx_L7_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "apache_beam/runners/worker/operations.py":891
 *       # either the only output or the output tagged with 'None' and is
 *       # associated with its corresponding index.
 *       self.tagged_receivers = _TaggedReceivers(             # <<<<<<<<<<<<<<
 *           self.counter_factory, self.name_context.logging_name())
 * 
 */
          __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_TaggedReceivers); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 891, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_9);

          /* "apache_beam/runners/worker/operations.py":892
 *       # associated with its corresponding index.
 *       self.tagged_receivers = _TaggedReceivers(
 *           self.counter_factory, self.name_context.logging_name())             # <<<<<<<<<<<<<<
 * 
 *       if len(self.spec.output_tags) == 1:
 */
          __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.name_context, __pyx_n_s_logging_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 892, __pyx_L7_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_10 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 892, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = NULL;
          __pyx_t_13 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
            __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
            if (likely(__pyx_t_8)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
              __Pyx_INCREF(__pyx_t_8);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_9, function);
              __pyx_t_13 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_9)) {
            PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_self->__pyx_base.counter_factory, __pyx_t_10};
            __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 891, __pyx_L7_error)
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
            PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_self->__pyx_base.counter_factory, __pyx_t_10};
            __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 891, __pyx_L7_error)
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          } else
          #endif
          {
            __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 891, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_3);
            if (__pyx_t_8) {
              __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8); __pyx_t_8 = NULL;
            }
            __Pyx_INCREF(__pyx_v_self->__pyx_base.counter_factory);
            __Pyx_GIVEREF(__pyx_v_self->__pyx_base.counter_factory);
            PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_self->__pyx_base.counter_factory);
            __Pyx_GIVEREF(__pyx_t_10);
            PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_t_10);
            __pyx_t_10 = 0;
            __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 891, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          }
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

          /* "apache_beam/runners/worker/operations.py":891
 *       # either the only output or the output tagged with 'None' and is
 *       # associated with its corresponding index.
 *       self.tagged_receivers = _TaggedReceivers(             # <<<<<<<<<<<<<<
 *           self.counter_factory, self.name_context.logging_name())
 * 
 */
          __Pyx_GIVEREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_v_self->tagged_receivers);
          __Pyx_DECREF(__pyx_v_self->tagged_receivers);
          __pyx_v_self->tagged_receivers = __pyx_t_2;
          __pyx_t_2 = 0;

          /* "apache_beam/runners/worker/operations.py":894
 *           self.counter_factory, self.name_context.logging_name())
 * 
 *       if len(self.spec.output_tags) == 1:             # <<<<<<<<<<<<<<
 *         self.tagged_receivers[None] = self.receivers[0]
 *         self.tagged_receivers[self.spec.output_tags[0]] = self.receivers[0]
 */
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.spec, __pyx_n_s_output_tags); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 894, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_14 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 894, __pyx_L7_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_15 = ((__pyx_t_14 == 1) != 0);
          if (__pyx_t_15) {

            /* "apache_beam/runners/worker/operations.py":895
 * 
 *       if len(self.spec.output_tags) == 1:
 *         self.tagged_receivers[None] = self.receivers[0]             # <<<<<<<<<<<<<<
 *         self.tagged_receivers[self.spec.output_tags[0]] = self.receivers[0]
 *       else:
 */
            if (unlikely(__pyx_v_self->__pyx_base.receivers == Py_None)) {
              PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
              __PYX_ERR(0, 895, __pyx_L7_error)
            }
            __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->__pyx_base.receivers, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 895, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_2);
            if (unlikely(PyObject_SetItem(__pyx_v_self->tagged_receivers, Py_None, __pyx_t_2) < 0)) __PYX_ERR(0, 895, __pyx_L7_error)
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "apache_beam/runners/worker/operations.py":896
 *       if len(self.spec.output_tags) == 1:
 *         self.tagged_receivers[None] = self.receivers[0]
 *         self.tagged_receivers[self.spec.output_tags[0]] = self.receivers[0]             # <<<<<<<<<<<<<<
 *       else:
 *         for index, tag in enumerate(self.spec.output_tags):
 */
            if (unlikely(__pyx_v_self->__pyx_base.receivers == Py_None)) {
              PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
              __PYX_ERR(0, 896, __pyx_L7_error)
            }
            __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->__pyx_base.receivers, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 896, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.spec, __pyx_n_s_output_tags); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 896, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_9, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 896, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            if (unlikely(PyObject_SetItem(__pyx_v_self->tagged_receivers, __pyx_t_3, __pyx_t_2) < 0)) __PYX_ERR(0, 896, __pyx_L7_error)
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "apache_beam/runners/worker/operations.py":894
 *           self.counter_factory, self.name_context.logging_name())
 * 
 *       if len(self.spec.output_tags) == 1:             # <<<<<<<<<<<<<<
 *         self.tagged_receivers[None] = self.receivers[0]
 *         self.tagged_receivers[self.spec.output_tags[0]] = self.receivers[0]
 */
            goto __pyx_L15;
          }

          /* "apache_beam/runners/worker/operations.py":898
 *         self.tagged_receivers[self.spec.output_tags[0]] = self.receivers[0]
 *       else:
 *         for index, tag in enumerate(self.spec.output_tags):             # <<<<<<<<<<<<<<
 *           self.tagged_receivers[tag] = self.receivers[index]
 *           if tag == 'None':
 */
          /*else*/ {
            __Pyx_INCREF(__pyx_int_0);
            __pyx_t_2 = __pyx_int_0;
            __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.spec, __pyx_n_s_output_tags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 898, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_3);
            if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
              __pyx_t_9 = __pyx_t_3; __Pyx_INCREF(__pyx_t_9); __pyx_t_14 = 0;
              __pyx_t_16 = NULL;
            } else {
              __pyx_t_14 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 898, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_9);
              __pyx_t_16 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 898, __pyx_L7_error)
            }
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            for (;;) {
              if (likely(!__pyx_t_16)) {
                if (likely(PyList_CheckExact(__pyx_t_9))) {
                  if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_9)) break;
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_3 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_14); __Pyx_INCREF(__pyx_t_3); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 898, __pyx_L7_error)
                  #else
                  __pyx_t_3 = PySequence_ITEM(__pyx_t_9, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 898, __pyx_L7_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  #endif
                } else {
                  if (__pyx_t_14 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_14); __Pyx_INCREF(__pyx_t_3); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 898, __pyx_L7_error)
                  #else
                  __pyx_t_3 = PySequence_ITEM(__pyx_t_9, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 898, __pyx_L7_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  #endif
                }
              } else {
                __pyx_t_3 = __pyx_t_16(__pyx_t_9);
                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, 898, __pyx_L7_error)
                  }
                  break;
                }
                __Pyx_GOTREF(__pyx_t_3);
              }
              __Pyx_XDECREF_SET(__pyx_v_tag, __pyx_t_3);
              __pyx_t_3 = 0;
              __Pyx_INCREF(__pyx_t_2);
              __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_2);
              __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 898, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_2);
              __pyx_t_2 = __pyx_t_3;
              __pyx_t_3 = 0;

              /* "apache_beam/runners/worker/operations.py":899
 *       else:
 *         for index, tag in enumerate(self.spec.output_tags):
 *           self.tagged_receivers[tag] = self.receivers[index]             # <<<<<<<<<<<<<<
 *           if tag == 'None':
 *             self.tagged_receivers[None] = self.receivers[index]
 */
              if (unlikely(__pyx_v_self->__pyx_base.receivers == Py_None)) {
                PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
                __PYX_ERR(0, 899, __pyx_L7_error)
              }
              __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_self->__pyx_base.receivers, __pyx_v_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 899, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_3);
              if (unlikely(PyObject_SetItem(__pyx_v_self->tagged_receivers, __pyx_v_tag, __pyx_t_3) < 0)) __PYX_ERR(0, 899, __pyx_L7_error)
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

              /* "apache_beam/runners/worker/operations.py":900
 *         for index, tag in enumerate(self.spec.output_tags):
 *           self.tagged_receivers[tag] = self.receivers[index]
 *           if tag == 'None':             # <<<<<<<<<<<<<<
 *             self.tagged_receivers[None] = self.receivers[index]
 * 
 */
              __pyx_t_15 = (__Pyx_PyUnicode_Equals(__pyx_v_tag, __pyx_n_u_None, Py_EQ)); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 900, __pyx_L7_error)
              if (__pyx_t_15) {

                /* "apache_beam/runners/worker/operations.py":901
 *           self.tagged_receivers[tag] = self.receivers[index]
 *           if tag == 'None':
 *             self.tagged_receivers[None] = self.receivers[index]             # <<<<<<<<<<<<<<
 * 
 *       if self.user_state_context:
 */
                if (unlikely(__pyx_v_self->__pyx_base.receivers == Py_None)) {
                  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
                  __PYX_ERR(0, 901, __pyx_L7_error)
                }
                __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_self->__pyx_base.receivers, __pyx_v_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 901, __pyx_L7_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (unlikely(PyObject_SetItem(__pyx_v_self->tagged_receivers, Py_None, __pyx_t_3) < 0)) __PYX_ERR(0, 901, __pyx_L7_error)
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

                /* "apache_beam/runners/worker/operations.py":900
 *         for index, tag in enumerate(self.spec.output_tags):
 *           self.tagged_receivers[tag] = self.receivers[index]
 *           if tag == 'None':             # <<<<<<<<<<<<<<
 *             self.tagged_receivers[None] = self.receivers[index]
 * 
 */
              }

              /* "apache_beam/runners/worker/operations.py":898
 *         self.tagged_receivers[self.spec.output_tags[0]] = self.receivers[0]
 *       else:
 *         for index, tag in enumerate(self.spec.output_tags):             # <<<<<<<<<<<<<<
 *           self.tagged_receivers[tag] = self.receivers[index]
 *           if tag == 'None':
 */
            }
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          }
          __pyx_L15:;

          /* "apache_beam/runners/worker/operations.py":903
 *             self.tagged_receivers[None] = self.receivers[index]
 * 
 *       if self.user_state_context:             # <<<<<<<<<<<<<<
 *         self.timer_specs = {
 *             spec.name: spec
 */
          __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_self->user_state_context); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 903, __pyx_L7_error)
          if (__pyx_t_15) {

            /* "apache_beam/runners/worker/operations.py":904
 * 
 *       if self.user_state_context:
 *         self.timer_specs = {             # <<<<<<<<<<<<<<
 *             spec.name: spec
 *             for spec in userstate.get_dofn_specs(fn)[1]
 */
            { /* enter inner scope */
              __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 904, __pyx_L22_error)
              __Pyx_GOTREF(__pyx_t_2);

              /* "apache_beam/runners/worker/operations.py":906
 *         self.timer_specs = {
 *             spec.name: spec
 *             for spec in userstate.get_dofn_specs(fn)[1]             # <<<<<<<<<<<<<<
 *         }  # type: Dict[str, TimerSpec]
 * 
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_userstate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 906, __pyx_L22_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get_dofn_specs); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 906, __pyx_L22_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                }
              }
              __pyx_t_9 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_3, __pyx_v_fn) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_fn);
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 906, __pyx_L22_error)
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_9, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 906, __pyx_L22_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              if (likely(PyList_CheckExact(__pyx_t_10)) || PyTuple_CheckExact(__pyx_t_10)) {
                __pyx_t_9 = __pyx_t_10; __Pyx_INCREF(__pyx_t_9); __pyx_t_14 = 0;
                __pyx_t_16 = NULL;
              } else {
                __pyx_t_14 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 906, __pyx_L22_error)
                __Pyx_GOTREF(__pyx_t_9);
                __pyx_t_16 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 906, __pyx_L22_error)
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              for (;;) {
                if (likely(!__pyx_t_16)) {
                  if (likely(PyList_CheckExact(__pyx_t_9))) {
                    if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_9)) break;
                    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                    __pyx_t_10 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_14); __Pyx_INCREF(__pyx_t_10); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 906, __pyx_L22_error)
                    #else
                    __pyx_t_10 = PySequence_ITEM(__pyx_t_9, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 906, __pyx_L22_error)
                    __Pyx_GOTREF(__pyx_t_10);
                    #endif
                  } else {
                    if (__pyx_t_14 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
                    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                    __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_14); __Pyx_INCREF(__pyx_t_10); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 906, __pyx_L22_error)
                    #else
                    __pyx_t_10 = PySequence_ITEM(__pyx_t_9, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 906, __pyx_L22_error)
                    __Pyx_GOTREF(__pyx_t_10);
                    #endif
                  }
                } else {
                  __pyx_t_10 = __pyx_t_16(__pyx_t_9);
                  if (unlikely(!__pyx_t_10)) {
                    PyObject* exc_type = PyErr_Occurred();
                    if (exc_type) {
                      if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                      else __PYX_ERR(0, 906, __pyx_L22_error)
                    }
                    break;
                  }
                  __Pyx_GOTREF(__pyx_t_10);
                }
                __Pyx_XDECREF_SET(__pyx_8genexpr3__pyx_v_spec, __pyx_t_10);
                __pyx_t_10 = 0;

                /* "apache_beam/runners/worker/operations.py":905
 *       if self.user_state_context:
 *         self.timer_specs = {
 *             spec.name: spec             # <<<<<<<<<<<<<<
 *             for spec in userstate.get_dofn_specs(fn)[1]
 *         }  # type: Dict[str, TimerSpec]
 */
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr3__pyx_v_spec, __pyx_n_s_name_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 905, __pyx_L22_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (unlikely(PyDict_SetItem(__pyx_t_2, (PyObject*)__pyx_t_10, (PyObject*)__pyx_8genexpr3__pyx_v_spec))) __PYX_ERR(0, 905, __pyx_L22_error)
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

                /* "apache_beam/runners/worker/operations.py":906
 *         self.timer_specs = {
 *             spec.name: spec
 *             for spec in userstate.get_dofn_specs(fn)[1]             # <<<<<<<<<<<<<<
 *         }  # type: Dict[str, TimerSpec]
 * 
 */
              }
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_spec); __pyx_8genexpr3__pyx_v_spec = 0;
              goto __pyx_L25_exit_scope;
              __pyx_L22_error:;
              __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_spec); __pyx_8genexpr3__pyx_v_spec = 0;
              goto __pyx_L7_error;
              __pyx_L25_exit_scope:;
            } /* exit inner scope */

            /* "apache_beam/runners/worker/operations.py":904
 * 
 *       if self.user_state_context:
 *         self.timer_specs = {             # <<<<<<<<<<<<<<
 *             spec.name: spec
 *             for spec in userstate.get_dofn_specs(fn)[1]
 */
            __Pyx_GIVEREF(__pyx_t_2);
            __Pyx_GOTREF(__pyx_v_self->timer_specs);
            __Pyx_DECREF(__pyx_v_self->timer_specs);
            __pyx_v_self->timer_specs = ((PyObject*)__pyx_t_2);
            __pyx_t_2 = 0;

            /* "apache_beam/runners/worker/operations.py":903
 *             self.tagged_receivers[None] = self.receivers[index]
 * 
 *       if self.user_state_context:             # <<<<<<<<<<<<<<
 *         self.timer_specs = {
 *             spec.name: spec
 */
          }

          /* "apache_beam/runners/worker/operations.py":909
 *         }  # type: Dict[str, TimerSpec]
 * 
 *       if self.side_input_maps is None:             # <<<<<<<<<<<<<<
 *         if tags_and_types:
 *           self.side_input_maps = list(self._read_side_inputs(tags_and_types))
 */
          __pyx_t_15 = (__pyx_v_self->side_input_maps == Py_None);
          __pyx_t_17 = (__pyx_t_15 != 0);
          if (__pyx_t_17) {

            /* "apache_beam/runners/worker/operations.py":910
 * 
 *       if self.side_input_maps is None:
 *         if tags_and_types:             # <<<<<<<<<<<<<<
 *           self.side_input_maps = list(self._read_side_inputs(tags_and_types))
 *         else:
 */
            __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_v_tags_and_types); if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 910, __pyx_L7_error)
            if (__pyx_t_17) {

              /* "apache_beam/runners/worker/operations.py":911
 *       if self.side_input_maps is None:
 *         if tags_and_types:
 *           self.side_input_maps = list(self._read_side_inputs(tags_and_types))             # <<<<<<<<<<<<<<
 *         else:
 *           self.side_input_maps = []
 */
              __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read_side_inputs); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 911, __pyx_L7_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_2 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_v_tags_and_types) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_tags_and_types);
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 911, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              __pyx_t_9 = PySequence_List(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 911, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_GIVEREF(__pyx_t_9);
              __Pyx_GOTREF(__pyx_v_self->side_input_maps);
              __Pyx_DECREF(__pyx_v_self->side_input_maps);
              __pyx_v_self->side_input_maps = __pyx_t_9;
              __pyx_t_9 = 0;

              /* "apache_beam/runners/worker/operations.py":910
 * 
 *       if self.side_input_maps is None:
 *         if tags_and_types:             # <<<<<<<<<<<<<<
 *           self.side_input_maps = list(self._read_side_inputs(tags_and_types))
 *         else:
 */
              goto __pyx_L27;
            }

            /* "apache_beam/runners/worker/operations.py":913
 *           self.side_input_maps = list(self._read_side_inputs(tags_and_types))
 *         else:
 *           self.side_input_maps = []             # <<<<<<<<<<<<<<
 * 
 *       self.dofn_runner = common.DoFnRunner(
 */
            /*else*/ {
              __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 913, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_GIVEREF(__pyx_t_9);
              __Pyx_GOTREF(__pyx_v_self->side_input_maps);
              __Pyx_DECREF(__pyx_v_self->side_input_maps);
              __pyx_v_self->side_input_maps = __pyx_t_9;
              __pyx_t_9 = 0;
            }
            __pyx_L27:;

            /* "apache_beam/runners/worker/operations.py":909
 *         }  # type: Dict[str, TimerSpec]
 * 
 *       if self.side_input_maps is None:             # <<<<<<<<<<<<<<
 *         if tags_and_types:
 *           self.side_input_maps = list(self._read_side_inputs(tags_and_types))
 */
          }

          /* "apache_beam/runners/worker/operations.py":915
 *           self.side_input_maps = []
 * 
 *       self.dofn_runner = common.DoFnRunner(             # <<<<<<<<<<<<<<
 *           fn,
 *           args,
 */
          __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_common); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 915, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_DoFnRunner); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 915, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

          /* "apache_beam/runners/worker/operations.py":920
 *           kwargs,
 *           self.side_input_maps,
 *           window_fn,             # <<<<<<<<<<<<<<
 *           tagged_receivers=self.tagged_receivers,
 *           step_name=self.name_context.logging_name(),
 */
          __pyx_t_9 = PyTuple_New(5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 915, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_INCREF(__pyx_v_fn);
          __Pyx_GIVEREF(__pyx_v_fn);
          PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_fn);
          __Pyx_INCREF(__pyx_v_args);
          __Pyx_GIVEREF(__pyx_v_args);
          PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_args);
          __Pyx_INCREF(__pyx_v_kwargs);
          __Pyx_GIVEREF(__pyx_v_kwargs);
          PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_kwargs);
          __Pyx_INCREF(__pyx_v_self->side_input_maps);
          __Pyx_GIVEREF(__pyx_v_self->side_input_maps);
          PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_v_self->side_input_maps);
          __Pyx_INCREF(__pyx_v_window_fn);
          __Pyx_GIVEREF(__pyx_v_window_fn);
          PyTuple_SET_ITEM(__pyx_t_9, 4, __pyx_v_window_fn);

          /* "apache_beam/runners/worker/operations.py":921
 *           self.side_input_maps,
 *           window_fn,
 *           tagged_receivers=self.tagged_receivers,             # <<<<<<<<<<<<<<
 *           step_name=self.name_context.logging_name(),
 *           state=state,
 */
          __pyx_t_10 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 921, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_10);
          if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_tagged_receivers, __pyx_v_self->tagged_receivers) < 0) __PYX_ERR(0, 921, __pyx_L7_error)

          /* "apache_beam/runners/worker/operations.py":922
 *           window_fn,
 *           tagged_receivers=self.tagged_receivers,
 *           step_name=self.name_context.logging_name(),             # <<<<<<<<<<<<<<
 *           state=state,
 *           user_state_context=self.user_state_context,
 */
          __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.name_context, __pyx_n_s_logging_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 922, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_4 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
            __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8);
            if (likely(__pyx_t_4)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
              __Pyx_INCREF(__pyx_t_4);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_8, function);
            }
          }
          __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 922, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_step_name, __pyx_t_3) < 0) __PYX_ERR(0, 921, __pyx_L7_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "apache_beam/runners/worker/operations.py":923
 *           tagged_receivers=self.tagged_receivers,
 *           step_name=self.name_context.logging_name(),
 *           state=state,             # <<<<<<<<<<<<<<
 *           user_state_context=self.user_state_context,
 *           transform_id=self.name_context.transform_id,
 */
          if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_state, __pyx_v_state) < 0) __PYX_ERR(0, 921, __pyx_L7_error)

          /* "apache_beam/runners/worker/operations.py":924
 *           step_name=self.name_context.logging_name(),
 *           state=state,
 *           user_state_context=self.user_state_context,             # <<<<<<<<<<<<<<
 *           transform_id=self.name_context.transform_id,
 *           operation_name=self.name_context.metrics_name())
 */
          if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_user_state_context, __pyx_v_self->user_state_context) < 0) __PYX_ERR(0, 921, __pyx_L7_error)

          /* "apache_beam/runners/worker/operations.py":925
 *           state=state,
 *           user_state_context=self.user_state_context,
 *           transform_id=self.name_context.transform_id,             # <<<<<<<<<<<<<<
 *           operation_name=self.name_context.metrics_name())
 *       self.dofn_runner.setup()
 */
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.name_context, __pyx_n_s_transform_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 925, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_transform_id, __pyx_t_3) < 0) __PYX_ERR(0, 921, __pyx_L7_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "apache_beam/runners/worker/operations.py":926
 *           user_state_context=self.user_state_context,
 *           transform_id=self.name_context.transform_id,
 *           operation_name=self.name_context.metrics_name())             # <<<<<<<<<<<<<<
 *       self.dofn_runner.setup()
 * 
 */
          __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.name_context, __pyx_n_s_metrics_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 926, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_4 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
            __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8);
            if (likely(__pyx_t_4)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
              __Pyx_INCREF(__pyx_t_4);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_8, function);
            }
          }
          __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 926, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_operation_name, __pyx_t_3) < 0) __PYX_ERR(0, 921, __pyx_L7_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "apache_beam/runners/worker/operations.py":915
 *           self.side_input_maps = []
 * 
 *       self.dofn_runner = common.DoFnRunner(             # <<<<<<<<<<<<<<
 *           fn,
 *           args,
 */
          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 915, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_11apache_beam_7runners_6common_DoFnRunner))))) __PYX_ERR(0, 915, __pyx_L7_error)
          __Pyx_GIVEREF(__pyx_t_3);
          __Pyx_GOTREF(__pyx_v_self->dofn_runner);
          __Pyx_DECREF(((PyObject *)__pyx_v_self->dofn_runner));
          __pyx_v_self->dofn_runner = ((struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *)__pyx_t_3);
          __pyx_t_3 = 0;

          /* "apache_beam/runners/worker/operations.py":927
 *           transform_id=self.name_context.transform_id,
 *           operation_name=self.name_context.metrics_name())
 *       self.dofn_runner.setup()             # <<<<<<<<<<<<<<
 * 
 *   def start(self):
 */
          __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->dofn_runner), __pyx_n_s_setup); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 927, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_10);
          __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_3 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_10);
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 927, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "apache_beam/runners/worker/operations.py":877
 *   def setup(self, data_sampler=None):
 *     # type: (Optional[DataSampler]) -> None
 *     with self.scoped_start_state:             # <<<<<<<<<<<<<<
 *       super(DoOperation, self).setup(data_sampler)
 * 
 */
        }
        __Pyx_XDECREF(__pyx_t_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_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        /*except:*/ {
          __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.setup", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_10, &__pyx_t_9) < 0) __PYX_ERR(0, 877, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_2 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 877, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 877, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_18);
          __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_18);
          __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
          if (__pyx_t_17 < 0) __PYX_ERR(0, 877, __pyx_L9_except_error)
          __pyx_t_15 = ((!(__pyx_t_17 != 0)) != 0);
          if (__pyx_t_15) {
            __Pyx_GIVEREF(__pyx_t_3);
            __Pyx_GIVEREF(__pyx_t_10);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_10, __pyx_t_9);
            __pyx_t_3 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0; 
            __PYX_ERR(0, 877, __pyx_L9_except_error)
          }
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 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_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_1) {
          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__29, NULL);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 877, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        goto __pyx_L6;
      }
      __pyx_L6:;
    }
    goto __pyx_L31;
    __pyx_L3_error:;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L1_error;
    __pyx_L31:;
  }

  /* "apache_beam/runners/worker/operations.py":875
 *           view_class, view_options, sideinputs.EmulatedIterable(iterator_fn))
 * 
 *   def setup(self, data_sampler=None):             # <<<<<<<<<<<<<<
 *     # type: (Optional[DataSampler]) -> None
 *     with self.scoped_start_state:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.setup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fn);
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_XDECREF(__pyx_v_tags_and_types);
  __Pyx_XDECREF(__pyx_v_window_fn);
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XDECREF(__pyx_v_tag);
  __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_spec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":929
 *       self.dofn_runner.setup()
 * 
 *   def start(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     with self.scoped_start_state:
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_8start(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_start(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_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;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__70)
  __Pyx_RefNannySetupContext("start", 0);
  __Pyx_TraceCall("start", __pyx_f[0], 929, 0, __PYX_ERR(0, 929, __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_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 929, __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_6worker_10operations_11DoOperation_8start)) {
        __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, 929, __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/worker/operations.py":931
 *   def start(self):
 *     # type: () -> None
 *     with self.scoped_start_state:             # <<<<<<<<<<<<<<
 *       super(DoOperation, self).start()
 *       self.dofn_runner.execution_context = self.execution_context
 */
  /*with:*/ {
    __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_start_state, __pyx_n_s_exit); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 931, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_start_state, __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 931, __pyx_L3_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, 931, __pyx_L3_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:*/ {
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_6);
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_8);
        /*try:*/ {

          /* "apache_beam/runners/worker/operations.py":932
 *     # type: () -> None
 *     with self.scoped_start_state:
 *       super(DoOperation, self).start()             # <<<<<<<<<<<<<<
 *       self.dofn_runner.execution_context = self.execution_context
 *       self.dofn_runner.start()
 */
          __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 932, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_INCREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation));
          __Pyx_GIVEREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation));
          PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation));
          __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, 932, __pyx_L7_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_start); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 932, __pyx_L7_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, 932, __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;

          /* "apache_beam/runners/worker/operations.py":933
 *     with self.scoped_start_state:
 *       super(DoOperation, self).start()
 *       self.dofn_runner.execution_context = self.execution_context             # <<<<<<<<<<<<<<
 *       self.dofn_runner.start()
 * 
 */
          __pyx_t_1 = __pyx_v_self->__pyx_base.execution_context;
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_GIVEREF(__pyx_t_1);
          __Pyx_GOTREF(__pyx_v_self->dofn_runner->execution_context);
          __Pyx_DECREF(__pyx_v_self->dofn_runner->execution_context);
          __pyx_v_self->dofn_runner->execution_context = __pyx_t_1;
          __pyx_t_1 = 0;

          /* "apache_beam/runners/worker/operations.py":934
 *       super(DoOperation, self).start()
 *       self.dofn_runner.execution_context = self.execution_context
 *       self.dofn_runner.start()             # <<<<<<<<<<<<<<
 * 
 *   def get_batching_preference(self):
 */
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->dofn_runner), __pyx_n_s_start); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 934, __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, 934, __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;

          /* "apache_beam/runners/worker/operations.py":931
 *   def start(self):
 *     # type: () -> None
 *     with self.scoped_start_state:             # <<<<<<<<<<<<<<
 *       super(DoOperation, self).start()
 *       self.dofn_runner.execution_context = self.execution_context
 */
        }
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L12_try_end;
        __pyx_L7_error:;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        /*except:*/ {
          __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 931, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_4 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 931, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 931, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (__pyx_t_10 < 0) __PYX_ERR(0, 931, __pyx_L9_except_error)
          __pyx_t_11 = ((!(__pyx_t_10 != 0)) != 0);
          if (__pyx_t_11) {
            __Pyx_GIVEREF(__pyx_t_1);
            __Pyx_GIVEREF(__pyx_t_2);
            __Pyx_XGIVEREF(__pyx_t_3);
            __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_2, __pyx_t_3);
            __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; 
            __PYX_ERR(0, 931, __pyx_L9_except_error)
          }
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          goto __pyx_L8_exception_handled;
        }
        __pyx_L9_except_error:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        goto __pyx_L1_error;
        __pyx_L8_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        __pyx_L12_try_end:;
      }
    }
    /*finally:*/ {
      /*normal exit:*/{
        if (__pyx_t_5) {
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__29, NULL);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 931, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        goto __pyx_L6;
      }
      __pyx_L6:;
    }
    goto __pyx_L16;
    __pyx_L3_error:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L1_error;
    __pyx_L16:;
  }

  /* "apache_beam/runners/worker/operations.py":929
 *       self.dofn_runner.setup()
 * 
 *   def start(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     with self.scoped_start_state:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_8start(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_8start = {"start", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_8start, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_8start(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_6worker_10operations_11DoOperation_7start(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_7start(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__70)
  __Pyx_RefNannySetupContext("start", 0);
  __Pyx_TraceCall("start (wrapper)", __pyx_f[0], 929, 0, __PYX_ERR(0, 929, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_start(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":936
 *       self.dofn_runner.start()
 * 
 *   def get_batching_preference(self):             # <<<<<<<<<<<<<<
 *     if self.fn._process_batch_defined:
 *       if self.fn._process_defined:
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_10get_batching_preference(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_10get_batching_preference = {"get_batching_preference", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_10get_batching_preference, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_10get_batching_preference(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_batching_preference (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_9get_batching_preference(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_9get_batching_preference(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__71)
  __Pyx_RefNannySetupContext("get_batching_preference", 0);
  __Pyx_TraceCall("get_batching_preference", __pyx_f[0], 936, 0, __PYX_ERR(0, 936, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":937
 * 
 *   def get_batching_preference(self):
 *     if self.fn._process_batch_defined:             # <<<<<<<<<<<<<<
 *       if self.fn._process_defined:
 *         return common.BatchingPreference.DO_NOT_CARE
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->fn, __pyx_n_s_process_batch_defined); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 937, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 937, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "apache_beam/runners/worker/operations.py":938
 *   def get_batching_preference(self):
 *     if self.fn._process_batch_defined:
 *       if self.fn._process_defined:             # <<<<<<<<<<<<<<
 *         return common.BatchingPreference.DO_NOT_CARE
 *       else:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->fn, __pyx_n_s_process_defined); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 938, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "apache_beam/runners/worker/operations.py":939
 *     if self.fn._process_batch_defined:
 *       if self.fn._process_defined:
 *         return common.BatchingPreference.DO_NOT_CARE             # <<<<<<<<<<<<<<
 *       else:
 *         return common.BatchingPreference.BATCH_REQUIRED
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_common); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 939, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_BatchingPreference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 939, __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_DO_NOT_CARE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 939, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "apache_beam/runners/worker/operations.py":938
 *   def get_batching_preference(self):
 *     if self.fn._process_batch_defined:
 *       if self.fn._process_defined:             # <<<<<<<<<<<<<<
 *         return common.BatchingPreference.DO_NOT_CARE
 *       else:
 */
    }

    /* "apache_beam/runners/worker/operations.py":941
 *         return common.BatchingPreference.DO_NOT_CARE
 *       else:
 *         return common.BatchingPreference.BATCH_REQUIRED             # <<<<<<<<<<<<<<
 *     else:
 *       return common.BatchingPreference.BATCH_FORBIDDEN
 */
    /*else*/ {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_common); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 941, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_BatchingPreference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 941, __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_BATCH_REQUIRED); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 941, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;
    }

    /* "apache_beam/runners/worker/operations.py":937
 * 
 *   def get_batching_preference(self):
 *     if self.fn._process_batch_defined:             # <<<<<<<<<<<<<<
 *       if self.fn._process_defined:
 *         return common.BatchingPreference.DO_NOT_CARE
 */
  }

  /* "apache_beam/runners/worker/operations.py":943
 *         return common.BatchingPreference.BATCH_REQUIRED
 *     else:
 *       return common.BatchingPreference.BATCH_FORBIDDEN             # <<<<<<<<<<<<<<
 * 
 *   def get_input_batch_converter(self) -> Optional[BatchConverter]:
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_common); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 943, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_BatchingPreference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 943, __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_BATCH_FORBIDDEN); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 943, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "apache_beam/runners/worker/operations.py":936
 *       self.dofn_runner.start()
 * 
 *   def get_batching_preference(self):             # <<<<<<<<<<<<<<
 *     if self.fn._process_batch_defined:
 *       if self.fn._process_defined:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.get_batching_preference", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":945
 *       return common.BatchingPreference.BATCH_FORBIDDEN
 * 
 *   def get_input_batch_converter(self) -> Optional[BatchConverter]:             # <<<<<<<<<<<<<<
 *     return getattr(self.fn, 'input_batch_converter', None)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_12get_input_batch_converter(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_12get_input_batch_converter = {"get_input_batch_converter", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_12get_input_batch_converter, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_12get_input_batch_converter(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_input_batch_converter (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_11get_input_batch_converter(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_11get_input_batch_converter(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__72)
  __Pyx_RefNannySetupContext("get_input_batch_converter", 0);
  __Pyx_TraceCall("get_input_batch_converter", __pyx_f[0], 945, 0, __PYX_ERR(0, 945, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":946
 * 
 *   def get_input_batch_converter(self) -> Optional[BatchConverter]:
 *     return getattr(self.fn, 'input_batch_converter', None)             # <<<<<<<<<<<<<<
 * 
 *   def get_output_batch_converter(self) -> Optional[BatchConverter]:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_self->fn;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetAttr3(__pyx_t_1, __pyx_n_u_input_batch_converter, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "apache_beam/runners/worker/operations.py":945
 *       return common.BatchingPreference.BATCH_FORBIDDEN
 * 
 *   def get_input_batch_converter(self) -> Optional[BatchConverter]:             # <<<<<<<<<<<<<<
 *     return getattr(self.fn, 'input_batch_converter', None)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.get_input_batch_converter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":948
 *     return getattr(self.fn, 'input_batch_converter', None)
 * 
 *   def get_output_batch_converter(self) -> Optional[BatchConverter]:             # <<<<<<<<<<<<<<
 *     return getattr(self.fn, 'output_batch_converter', None)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_14get_output_batch_converter(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_14get_output_batch_converter = {"get_output_batch_converter", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_14get_output_batch_converter, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_14get_output_batch_converter(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_output_batch_converter (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_13get_output_batch_converter(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_13get_output_batch_converter(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__73)
  __Pyx_RefNannySetupContext("get_output_batch_converter", 0);
  __Pyx_TraceCall("get_output_batch_converter", __pyx_f[0], 948, 0, __PYX_ERR(0, 948, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":949
 * 
 *   def get_output_batch_converter(self) -> Optional[BatchConverter]:
 *     return getattr(self.fn, 'output_batch_converter', None)             # <<<<<<<<<<<<<<
 * 
 *   def process(self, o):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_self->fn;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetAttr3(__pyx_t_1, __pyx_n_u_output_batch_converter, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "apache_beam/runners/worker/operations.py":948
 *     return getattr(self.fn, 'input_batch_converter', None)
 * 
 *   def get_output_batch_converter(self) -> Optional[BatchConverter]:             # <<<<<<<<<<<<<<
 *     return getattr(self.fn, 'output_batch_converter', None)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.get_output_batch_converter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":951
 *     return getattr(self.fn, 'output_batch_converter', None)
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_16process(PyObject *__pyx_v_self, PyObject *__pyx_v_o); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_delayed_applications = NULL;
  PyObject *__pyx_v_delayed_application = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_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;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__74)
  __Pyx_RefNannySetupContext("process", 0);
  __Pyx_TraceCall("process", __pyx_f[0], 951, 0, __PYX_ERR(0, 951, __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, 951, __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_6worker_10operations_11DoOperation_16process)) {
        __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_o)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_o));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 951, __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/worker/operations.py":953
 *   def process(self, o):
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:             # <<<<<<<<<<<<<<
 *       delayed_applications = self.dofn_runner.process(o)
 *       if delayed_applications:
 */
  /*with:*/ {
    __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_process_state, __pyx_n_s_exit); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 953, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_process_state, __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 953, __pyx_L3_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, 953, __pyx_L3_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:*/ {
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_6);
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_8);
        /*try:*/ {

          /* "apache_beam/runners/worker/operations.py":954
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:
 *       delayed_applications = self.dofn_runner.process(o)             # <<<<<<<<<<<<<<
 *       if delayed_applications:
 *         assert self.execution_context is not None
 */
          __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnRunner *)__pyx_v_self->dofn_runner->__pyx_vtab)->process(__pyx_v_self->dofn_runner, __pyx_v_o, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 954, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_v_delayed_applications = __pyx_t_1;
          __pyx_t_1 = 0;

          /* "apache_beam/runners/worker/operations.py":955
 *     with self.scoped_process_state:
 *       delayed_applications = self.dofn_runner.process(o)
 *       if delayed_applications:             # <<<<<<<<<<<<<<
 *         assert self.execution_context is not None
 *         for delayed_application in delayed_applications:
 */
          __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_delayed_applications); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 955, __pyx_L7_error)
          if (__pyx_t_9) {

            /* "apache_beam/runners/worker/operations.py":956
 *       delayed_applications = self.dofn_runner.process(o)
 *       if delayed_applications:
 *         assert self.execution_context is not None             # <<<<<<<<<<<<<<
 *         for delayed_application in delayed_applications:
 *           self.execution_context.delayed_applications.append(
 */
            #ifndef CYTHON_WITHOUT_ASSERTIONS
            if (unlikely(__pyx_assertions_enabled())) {
              __pyx_t_9 = (__pyx_v_self->__pyx_base.execution_context != Py_None);
              if (unlikely(!(__pyx_t_9 != 0))) {
                PyErr_SetNone(PyExc_AssertionError);
                __PYX_ERR(0, 956, __pyx_L7_error)
              }
            }
            #endif

            /* "apache_beam/runners/worker/operations.py":957
 *       if delayed_applications:
 *         assert self.execution_context is not None
 *         for delayed_application in delayed_applications:             # <<<<<<<<<<<<<<
 *           self.execution_context.delayed_applications.append(
 *               (self, delayed_application))
 */
            if (likely(PyList_CheckExact(__pyx_v_delayed_applications)) || PyTuple_CheckExact(__pyx_v_delayed_applications)) {
              __pyx_t_1 = __pyx_v_delayed_applications; __Pyx_INCREF(__pyx_t_1); __pyx_t_10 = 0;
              __pyx_t_11 = NULL;
            } else {
              __pyx_t_10 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_delayed_applications); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 957, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_11 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 957, __pyx_L7_error)
            }
            for (;;) {
              if (likely(!__pyx_t_11)) {
                if (likely(PyList_CheckExact(__pyx_t_1))) {
                  if (__pyx_t_10 >= 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_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 957, __pyx_L7_error)
                  #else
                  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 957, __pyx_L7_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  #endif
                } else {
                  if (__pyx_t_10 >= 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_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 957, __pyx_L7_error)
                  #else
                  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 957, __pyx_L7_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  #endif
                }
              } else {
                __pyx_t_2 = __pyx_t_11(__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, 957, __pyx_L7_error)
                  }
                  break;
                }
                __Pyx_GOTREF(__pyx_t_2);
              }
              __Pyx_XDECREF_SET(__pyx_v_delayed_application, __pyx_t_2);
              __pyx_t_2 = 0;

              /* "apache_beam/runners/worker/operations.py":958
 *         assert self.execution_context is not None
 *         for delayed_application in delayed_applications:
 *           self.execution_context.delayed_applications.append(             # <<<<<<<<<<<<<<
 *               (self, delayed_application))
 * 
 */
              __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.execution_context, __pyx_n_s_delayed_applications); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 958, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_2);

              /* "apache_beam/runners/worker/operations.py":959
 *         for delayed_application in delayed_applications:
 *           self.execution_context.delayed_applications.append(
 *               (self, delayed_application))             # <<<<<<<<<<<<<<
 * 
 *   def process_batch(self, windowed_batch: WindowedBatch) -> None:
 */
              __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 959, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_INCREF(((PyObject *)__pyx_v_self));
              __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
              PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
              __Pyx_INCREF(__pyx_v_delayed_application);
              __Pyx_GIVEREF(__pyx_v_delayed_application);
              PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_delayed_application);

              /* "apache_beam/runners/worker/operations.py":958
 *         assert self.execution_context is not None
 *         for delayed_application in delayed_applications:
 *           self.execution_context.delayed_applications.append(             # <<<<<<<<<<<<<<
 *               (self, delayed_application))
 * 
 */
              __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_2, __pyx_t_3); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 958, __pyx_L7_error)
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

              /* "apache_beam/runners/worker/operations.py":957
 *       if delayed_applications:
 *         assert self.execution_context is not None
 *         for delayed_application in delayed_applications:             # <<<<<<<<<<<<<<
 *           self.execution_context.delayed_applications.append(
 *               (self, delayed_application))
 */
            }
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

            /* "apache_beam/runners/worker/operations.py":955
 *     with self.scoped_process_state:
 *       delayed_applications = self.dofn_runner.process(o)
 *       if delayed_applications:             # <<<<<<<<<<<<<<
 *         assert self.execution_context is not None
 *         for delayed_application in delayed_applications:
 */
          }

          /* "apache_beam/runners/worker/operations.py":953
 *   def process(self, o):
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:             # <<<<<<<<<<<<<<
 *       delayed_applications = self.dofn_runner.process(o)
 *       if delayed_applications:
 */
        }
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L12_try_end;
        __pyx_L7_error:;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        /*except:*/ {
          __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_2) < 0) __PYX_ERR(0, 953, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_4 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 953, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 953, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_13);
          __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_13);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          if (__pyx_t_9 < 0) __PYX_ERR(0, 953, __pyx_L9_except_error)
          __pyx_t_14 = ((!(__pyx_t_9 != 0)) != 0);
          if (__pyx_t_14) {
            __Pyx_GIVEREF(__pyx_t_1);
            __Pyx_GIVEREF(__pyx_t_3);
            __Pyx_XGIVEREF(__pyx_t_2);
            __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_3, __pyx_t_2);
            __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_2 = 0; 
            __PYX_ERR(0, 953, __pyx_L9_except_error)
          }
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          goto __pyx_L8_exception_handled;
        }
        __pyx_L9_except_error:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        goto __pyx_L1_error;
        __pyx_L8_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        __pyx_L12_try_end:;
      }
    }
    /*finally:*/ {
      /*normal exit:*/{
        if (__pyx_t_5) {
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__29, NULL);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 953, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        goto __pyx_L6;
      }
      __pyx_L6:;
    }
    goto __pyx_L19;
    __pyx_L3_error:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L1_error;
    __pyx_L19:;
  }

  /* "apache_beam/runners/worker/operations.py":951
 *     return getattr(self.fn, 'output_batch_converter', None)
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_delayed_applications);
  __Pyx_XDECREF(__pyx_v_delayed_application);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_16process(PyObject *__pyx_v_self, PyObject *__pyx_v_o); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_16process = {"process", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_16process, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_16process(PyObject *__pyx_v_self, PyObject *__pyx_v_o) {
  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_o), __pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, 1, "o", 0))) __PYX_ERR(0, 951, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_15process(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self), ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_v_o));

  /* 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_6worker_10operations_11DoOperation_15process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o) {
  PyObject *__pyx_r = NULL;
  __Pyx_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("process", 0);
  __Pyx_TraceCall("process (wrapper)", __pyx_f[0], 951, 0, __PYX_ERR(0, 951, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_process(__pyx_v_self, __pyx_v_o, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":961
 *               (self, delayed_application))
 * 
 *   def process_batch(self, windowed_batch: WindowedBatch) -> None:             # <<<<<<<<<<<<<<
 *     self.dofn_runner.process_batch(windowed_batch)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_18process_batch(PyObject *__pyx_v_self, PyObject *__pyx_v_windowed_batch); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_18process_batch = {"process_batch", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_18process_batch, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_18process_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("process_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, 961, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_17process_batch(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self), ((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_6worker_10operations_11DoOperation_17process_batch(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__75)
  __Pyx_RefNannySetupContext("process_batch", 0);
  __Pyx_TraceCall("process_batch", __pyx_f[0], 961, 0, __PYX_ERR(0, 961, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":962
 * 
 *   def process_batch(self, windowed_batch: WindowedBatch) -> None:
 *     self.dofn_runner.process_batch(windowed_batch)             # <<<<<<<<<<<<<<
 * 
 *   def finalize_bundle(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->dofn_runner), __pyx_n_s_process_batch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 962, __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_windowed_batch)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_windowed_batch));
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":961
 *               (self, delayed_application))
 * 
 *   def process_batch(self, windowed_batch: WindowedBatch) -> None:             # <<<<<<<<<<<<<<
 *     self.dofn_runner.process_batch(windowed_batch)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.process_batch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":964
 *     self.dofn_runner.process_batch(windowed_batch)
 * 
 *   def finalize_bundle(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     self.dofn_runner.finalize()
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_20finalize_bundle(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_20finalize_bundle = {"finalize_bundle", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_20finalize_bundle, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_20finalize_bundle(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("finalize_bundle (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_19finalize_bundle(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_19finalize_bundle(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__76)
  __Pyx_RefNannySetupContext("finalize_bundle", 0);
  __Pyx_TraceCall("finalize_bundle", __pyx_f[0], 964, 0, __PYX_ERR(0, 964, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":966
 *   def finalize_bundle(self):
 *     # type: () -> None
 *     self.dofn_runner.finalize()             # <<<<<<<<<<<<<<
 * 
 *   def needs_finalization(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->dofn_runner), __pyx_n_s_finalize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 966, __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, 966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":964
 *     self.dofn_runner.process_batch(windowed_batch)
 * 
 *   def finalize_bundle(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     self.dofn_runner.finalize()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.finalize_bundle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":968
 *     self.dofn_runner.finalize()
 * 
 *   def needs_finalization(self):             # <<<<<<<<<<<<<<
 *     # type: () -> bool
 *     return self.dofn_runner.bundle_finalizer_param.has_callbacks()
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_22needs_finalization(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_22needs_finalization = {"needs_finalization", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_22needs_finalization, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_22needs_finalization(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("needs_finalization (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_21needs_finalization(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_21needs_finalization(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__77)
  __Pyx_RefNannySetupContext("needs_finalization", 0);
  __Pyx_TraceCall("needs_finalization", __pyx_f[0], 968, 0, __PYX_ERR(0, 968, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":970
 *   def needs_finalization(self):
 *     # type: () -> bool
 *     return self.dofn_runner.bundle_finalizer_param.has_callbacks()             # <<<<<<<<<<<<<<
 * 
 *   def add_timer_info(self, timer_family_id, timer_info):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dofn_runner->bundle_finalizer_param, __pyx_n_s_has_callbacks); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 970, __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, 970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/runners/worker/operations.py":968
 *     self.dofn_runner.finalize()
 * 
 *   def needs_finalization(self):             # <<<<<<<<<<<<<<
 *     # type: () -> bool
 *     return self.dofn_runner.bundle_finalizer_param.has_callbacks()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.needs_finalization", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":972
 *     return self.dofn_runner.bundle_finalizer_param.has_callbacks()
 * 
 *   def add_timer_info(self, timer_family_id, timer_info):             # <<<<<<<<<<<<<<
 *     self.user_state_context.add_timer_info(timer_family_id, timer_info)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_24add_timer_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_24add_timer_info = {"add_timer_info", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_24add_timer_info, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_24add_timer_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_timer_family_id = 0;
  PyObject *__pyx_v_timer_info = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_timer_info (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_timer_family_id,&__pyx_n_s_timer_info,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_timer_family_id)) != 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_timer_info)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_timer_info", 1, 2, 2, 1); __PYX_ERR(0, 972, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_timer_info") < 0)) __PYX_ERR(0, 972, __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_timer_family_id = values[0];
    __pyx_v_timer_info = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_timer_info", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 972, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.add_timer_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_23add_timer_info(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self), __pyx_v_timer_family_id, __pyx_v_timer_info);

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_23add_timer_info(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v_timer_family_id, PyObject *__pyx_v_timer_info) {
  PyObject *__pyx_r = NULL;
  __Pyx_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_TraceFrameInit(__pyx_codeobj__78)
  __Pyx_RefNannySetupContext("add_timer_info", 0);
  __Pyx_TraceCall("add_timer_info", __pyx_f[0], 972, 0, __PYX_ERR(0, 972, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":973
 * 
 *   def add_timer_info(self, timer_family_id, timer_info):
 *     self.user_state_context.add_timer_info(timer_family_id, timer_info)             # <<<<<<<<<<<<<<
 * 
 *   def process_timer(self, tag, timer_data):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->user_state_context, __pyx_n_s_add_timer_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __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_timer_family_id, __pyx_v_timer_info};
    __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, 973, __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_timer_family_id, __pyx_v_timer_info};
    __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, 973, __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, 973, __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_timer_family_id);
    __Pyx_GIVEREF(__pyx_v_timer_family_id);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_timer_family_id);
    __Pyx_INCREF(__pyx_v_timer_info);
    __Pyx_GIVEREF(__pyx_v_timer_info);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_timer_info);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 973, __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/worker/operations.py":972
 *     return self.dofn_runner.bundle_finalizer_param.has_callbacks()
 * 
 *   def add_timer_info(self, timer_family_id, timer_info):             # <<<<<<<<<<<<<<
 *     self.user_state_context.add_timer_info(timer_family_id, timer_info)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.add_timer_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":975
 *     self.user_state_context.add_timer_info(timer_family_id, timer_info)
 * 
 *   def process_timer(self, tag, timer_data):             # <<<<<<<<<<<<<<
 *     timer_spec = self.timer_specs[tag]
 *     self.dofn_runner.process_user_timer(
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_26process_timer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_26process_timer = {"process_timer", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_26process_timer, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_26process_timer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_tag = 0;
  PyObject *__pyx_v_timer_data = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("process_timer (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tag,&__pyx_n_s_timer_data,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_tag)) != 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_timer_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("process_timer", 1, 2, 2, 1); __PYX_ERR(0, 975, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "process_timer") < 0)) __PYX_ERR(0, 975, __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_tag = values[0];
    __pyx_v_timer_data = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("process_timer", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 975, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.process_timer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_25process_timer(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self), __pyx_v_tag, __pyx_v_timer_data);

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_25process_timer(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_timer_data) {
  PyObject *__pyx_v_timer_spec = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_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;
  PyObject *__pyx_t_8 = NULL;
  int __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__79)
  __Pyx_RefNannySetupContext("process_timer", 0);
  __Pyx_TraceCall("process_timer", __pyx_f[0], 975, 0, __PYX_ERR(0, 975, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":976
 * 
 *   def process_timer(self, tag, timer_data):
 *     timer_spec = self.timer_specs[tag]             # <<<<<<<<<<<<<<
 *     self.dofn_runner.process_user_timer(
 *         timer_spec,
 */
  if (unlikely(__pyx_v_self->timer_specs == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 976, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->timer_specs, __pyx_v_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_timer_spec = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":977
 *   def process_timer(self, tag, timer_data):
 *     timer_spec = self.timer_specs[tag]
 *     self.dofn_runner.process_user_timer(             # <<<<<<<<<<<<<<
 *         timer_spec,
 *         timer_data.user_key,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->dofn_runner), __pyx_n_s_process_user_timer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "apache_beam/runners/worker/operations.py":979
 *     self.dofn_runner.process_user_timer(
 *         timer_spec,
 *         timer_data.user_key,             # <<<<<<<<<<<<<<
 *         timer_data.windows[0],
 *         timer_data.fire_timestamp,
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_timer_data, __pyx_n_s_user_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 979, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "apache_beam/runners/worker/operations.py":980
 *         timer_spec,
 *         timer_data.user_key,
 *         timer_data.windows[0],             # <<<<<<<<<<<<<<
 *         timer_data.fire_timestamp,
 *         timer_data.paneinfo,
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_timer_data, __pyx_n_s_windows); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "apache_beam/runners/worker/operations.py":981
 *         timer_data.user_key,
 *         timer_data.windows[0],
 *         timer_data.fire_timestamp,             # <<<<<<<<<<<<<<
 *         timer_data.paneinfo,
 *         timer_data.dynamic_timer_tag)
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_timer_data, __pyx_n_s_fire_timestamp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 981, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "apache_beam/runners/worker/operations.py":982
 *         timer_data.windows[0],
 *         timer_data.fire_timestamp,
 *         timer_data.paneinfo,             # <<<<<<<<<<<<<<
 *         timer_data.dynamic_timer_tag)
 * 
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_timer_data, __pyx_n_s_paneinfo); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 982, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "apache_beam/runners/worker/operations.py":983
 *         timer_data.fire_timestamp,
 *         timer_data.paneinfo,
 *         timer_data.dynamic_timer_tag)             # <<<<<<<<<<<<<<
 * 
 *   def finish(self):
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_timer_data, __pyx_n_s_dynamic_timer_tag); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  __pyx_t_9 = 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_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[7] = {__pyx_t_8, __pyx_v_timer_spec, __pyx_t_3, __pyx_t_5, __pyx_t_4, __pyx_t_6, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 6+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 977, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[7] = {__pyx_t_8, __pyx_v_timer_spec, __pyx_t_3, __pyx_t_5, __pyx_t_4, __pyx_t_6, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 6+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 977, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  {
    __pyx_t_10 = PyTuple_New(6+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 977, __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_timer_spec);
    __Pyx_GIVEREF(__pyx_v_timer_spec);
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_v_timer_spec);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_10, 3+__pyx_t_9, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_10, 4+__pyx_t_9, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_10, 5+__pyx_t_9, __pyx_t_7);
    __pyx_t_3 = 0;
    __pyx_t_5 = 0;
    __pyx_t_4 = 0;
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 977, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":975
 *     self.user_state_context.add_timer_info(timer_family_id, timer_info)
 * 
 *   def process_timer(self, tag, timer_data):             # <<<<<<<<<<<<<<
 *     timer_spec = self.timer_specs[tag]
 *     self.dofn_runner.process_user_timer(
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.process_timer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_timer_spec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":985
 *         timer_data.dynamic_timer_tag)
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     super(DoOperation, self).finish()
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_28finish(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_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;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__80)
  __Pyx_RefNannySetupContext("finish", 0);
  __Pyx_TraceCall("finish", __pyx_f[0], 985, 0, __PYX_ERR(0, 985, __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_finish); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 985, __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_6worker_10operations_11DoOperation_28finish)) {
        __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, 985, __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/worker/operations.py":987
 *   def finish(self):
 *     # type: () -> None
 *     super(DoOperation, self).finish()             # <<<<<<<<<<<<<<
 *     with self.scoped_finish_state:
 *       self.dofn_runner.finish()
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation));
  __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, 987, __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_finish); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 987, __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, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":988
 *     # type: () -> None
 *     super(DoOperation, self).finish()
 *     with self.scoped_finish_state:             # <<<<<<<<<<<<<<
 *       self.dofn_runner.finish()
 *       if self.user_state_context:
 */
  /*with:*/ {
    __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_finish_state, __pyx_n_s_exit); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 988, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_finish_state, __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 988, __pyx_L3_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, 988, __pyx_L3_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:*/ {
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_6);
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_8);
        /*try:*/ {

          /* "apache_beam/runners/worker/operations.py":989
 *     super(DoOperation, self).finish()
 *     with self.scoped_finish_state:
 *       self.dofn_runner.finish()             # <<<<<<<<<<<<<<
 *       if self.user_state_context:
 *         self.user_state_context.commit()
 */
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->dofn_runner), __pyx_n_s_finish); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 989, __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, 989, __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;

          /* "apache_beam/runners/worker/operations.py":990
 *     with self.scoped_finish_state:
 *       self.dofn_runner.finish()
 *       if self.user_state_context:             # <<<<<<<<<<<<<<
 *         self.user_state_context.commit()
 * 
 */
          __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->user_state_context); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 990, __pyx_L7_error)
          if (__pyx_t_9) {

            /* "apache_beam/runners/worker/operations.py":991
 *       self.dofn_runner.finish()
 *       if self.user_state_context:
 *         self.user_state_context.commit()             # <<<<<<<<<<<<<<
 * 
 *   def teardown(self):
 */
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->user_state_context, __pyx_n_s_commit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 991, __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, 991, __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;

            /* "apache_beam/runners/worker/operations.py":990
 *     with self.scoped_finish_state:
 *       self.dofn_runner.finish()
 *       if self.user_state_context:             # <<<<<<<<<<<<<<
 *         self.user_state_context.commit()
 * 
 */
          }

          /* "apache_beam/runners/worker/operations.py":988
 *     # type: () -> None
 *     super(DoOperation, self).finish()
 *     with self.scoped_finish_state:             # <<<<<<<<<<<<<<
 *       self.dofn_runner.finish()
 *       if self.user_state_context:
 */
        }
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L12_try_end;
        __pyx_L7_error:;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        /*except:*/ {
          __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.finish", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 988, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_4 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 988, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 988, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (__pyx_t_9 < 0) __PYX_ERR(0, 988, __pyx_L9_except_error)
          __pyx_t_11 = ((!(__pyx_t_9 != 0)) != 0);
          if (__pyx_t_11) {
            __Pyx_GIVEREF(__pyx_t_1);
            __Pyx_GIVEREF(__pyx_t_2);
            __Pyx_XGIVEREF(__pyx_t_3);
            __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_2, __pyx_t_3);
            __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; 
            __PYX_ERR(0, 988, __pyx_L9_except_error)
          }
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          goto __pyx_L8_exception_handled;
        }
        __pyx_L9_except_error:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        goto __pyx_L1_error;
        __pyx_L8_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        __pyx_L12_try_end:;
      }
    }
    /*finally:*/ {
      /*normal exit:*/{
        if (__pyx_t_5) {
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__29, NULL);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 988, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        goto __pyx_L6;
      }
      __pyx_L6:;
    }
    goto __pyx_L17;
    __pyx_L3_error:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L1_error;
    __pyx_L17:;
  }

  /* "apache_beam/runners/worker/operations.py":985
 *         timer_data.dynamic_timer_tag)
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     super(DoOperation, self).finish()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.finish", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_28finish(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_28finish = {"finish", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_28finish, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_28finish(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_6worker_10operations_11DoOperation_27finish(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_27finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__80)
  __Pyx_RefNannySetupContext("finish", 0);
  __Pyx_TraceCall("finish (wrapper)", __pyx_f[0], 985, 0, __PYX_ERR(0, 985, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_finish(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.finish", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":993
 *         self.user_state_context.commit()
 * 
 *   def teardown(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     with self.scoped_finish_state:
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_30teardown(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_teardown(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_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;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__81)
  __Pyx_RefNannySetupContext("teardown", 0);
  __Pyx_TraceCall("teardown", __pyx_f[0], 993, 0, __PYX_ERR(0, 993, __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_teardown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 993, __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_6worker_10operations_11DoOperation_30teardown)) {
        __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, 993, __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/worker/operations.py":995
 *   def teardown(self):
 *     # type: () -> None
 *     with self.scoped_finish_state:             # <<<<<<<<<<<<<<
 *       self.dofn_runner.teardown()
 *     if self.user_state_context:
 */
  /*with:*/ {
    __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_finish_state, __pyx_n_s_exit); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 995, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_finish_state, __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 995, __pyx_L3_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, 995, __pyx_L3_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:*/ {
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_6);
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_8);
        /*try:*/ {

          /* "apache_beam/runners/worker/operations.py":996
 *     # type: () -> None
 *     with self.scoped_finish_state:
 *       self.dofn_runner.teardown()             # <<<<<<<<<<<<<<
 *     if self.user_state_context:
 *       self.user_state_context.reset()
 */
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->dofn_runner), __pyx_n_s_teardown); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 996, __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, 996, __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;

          /* "apache_beam/runners/worker/operations.py":995
 *   def teardown(self):
 *     # type: () -> None
 *     with self.scoped_finish_state:             # <<<<<<<<<<<<<<
 *       self.dofn_runner.teardown()
 *     if self.user_state_context:
 */
        }
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L12_try_end;
        __pyx_L7_error:;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        /*except:*/ {
          __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.teardown", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 995, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_4 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 995, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 995, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (__pyx_t_10 < 0) __PYX_ERR(0, 995, __pyx_L9_except_error)
          __pyx_t_11 = ((!(__pyx_t_10 != 0)) != 0);
          if (__pyx_t_11) {
            __Pyx_GIVEREF(__pyx_t_1);
            __Pyx_GIVEREF(__pyx_t_2);
            __Pyx_XGIVEREF(__pyx_t_3);
            __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_2, __pyx_t_3);
            __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; 
            __PYX_ERR(0, 995, __pyx_L9_except_error)
          }
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          goto __pyx_L8_exception_handled;
        }
        __pyx_L9_except_error:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        goto __pyx_L1_error;
        __pyx_L8_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        __pyx_L12_try_end:;
      }
    }
    /*finally:*/ {
      /*normal exit:*/{
        if (__pyx_t_5) {
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__29, NULL);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 995, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        goto __pyx_L6;
      }
      __pyx_L6:;
    }
    goto __pyx_L16;
    __pyx_L3_error:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L1_error;
    __pyx_L16:;
  }

  /* "apache_beam/runners/worker/operations.py":997
 *     with self.scoped_finish_state:
 *       self.dofn_runner.teardown()
 *     if self.user_state_context:             # <<<<<<<<<<<<<<
 *       self.user_state_context.reset()
 * 
 */
  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_self->user_state_context); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 997, __pyx_L1_error)
  if (__pyx_t_11) {

    /* "apache_beam/runners/worker/operations.py":998
 *       self.dofn_runner.teardown()
 *     if self.user_state_context:
 *       self.user_state_context.reset()             # <<<<<<<<<<<<<<
 * 
 *   def reset(self):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->user_state_context, __pyx_n_s_reset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 998, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(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_3 = (__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_3)) __PYX_ERR(0, 998, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "apache_beam/runners/worker/operations.py":997
 *     with self.scoped_finish_state:
 *       self.dofn_runner.teardown()
 *     if self.user_state_context:             # <<<<<<<<<<<<<<
 *       self.user_state_context.reset()
 * 
 */
  }

  /* "apache_beam/runners/worker/operations.py":993
 *         self.user_state_context.commit()
 * 
 *   def teardown(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     with self.scoped_finish_state:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.teardown", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_30teardown(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_30teardown = {"teardown", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_30teardown, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_30teardown(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_6worker_10operations_11DoOperation_29teardown(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_29teardown(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__81)
  __Pyx_RefNannySetupContext("teardown", 0);
  __Pyx_TraceCall("teardown (wrapper)", __pyx_f[0], 993, 0, __PYX_ERR(0, 993, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_teardown(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.teardown", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":1000
 *       self.user_state_context.reset()
 * 
 *   def reset(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     super(DoOperation, self).reset()
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_32reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_32reset = {"reset", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_32reset, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_32reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_31reset(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_31reset(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self) {
  PyObject *__pyx_v_side_input_map = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_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 *);
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__82)
  __Pyx_RefNannySetupContext("reset", 0);
  __Pyx_TraceCall("reset", __pyx_f[0], 1000, 0, __PYX_ERR(0, 1000, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":1002
 *   def reset(self):
 *     # type: () -> None
 *     super(DoOperation, self).reset()             # <<<<<<<<<<<<<<
 *     for side_input_map in self.side_input_maps:
 *       side_input_map.reset()
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1002, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation));
  __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, 1002, __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_reset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1002, __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, 1002, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":1003
 *     # type: () -> None
 *     super(DoOperation, self).reset()
 *     for side_input_map in self.side_input_maps:             # <<<<<<<<<<<<<<
 *       side_input_map.reset()
 *     if self.user_state_context:
 */
  if (likely(PyList_CheckExact(__pyx_v_self->side_input_maps)) || PyTuple_CheckExact(__pyx_v_self->side_input_maps)) {
    __pyx_t_1 = __pyx_v_self->side_input_maps; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_self->side_input_maps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1003, __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, 1003, __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, 1003, __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, 1003, __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, 1003, __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, 1003, __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, 1003, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_side_input_map, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "apache_beam/runners/worker/operations.py":1004
 *     super(DoOperation, self).reset()
 *     for side_input_map in self.side_input_maps:
 *       side_input_map.reset()             # <<<<<<<<<<<<<<
 *     if self.user_state_context:
 *       self.user_state_context.reset()
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_side_input_map, __pyx_n_s_reset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1004, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1004, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/runners/worker/operations.py":1003
 *     # type: () -> None
 *     super(DoOperation, self).reset()
 *     for side_input_map in self.side_input_maps:             # <<<<<<<<<<<<<<
 *       side_input_map.reset()
 *     if self.user_state_context:
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":1005
 *     for side_input_map in self.side_input_maps:
 *       side_input_map.reset()
 *     if self.user_state_context:             # <<<<<<<<<<<<<<
 *       self.user_state_context.reset()
 *     self.dofn_runner.bundle_finalizer_param.reset()
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_self->user_state_context); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1005, __pyx_L1_error)
  if (__pyx_t_7) {

    /* "apache_beam/runners/worker/operations.py":1006
 *       side_input_map.reset()
 *     if self.user_state_context:
 *       self.user_state_context.reset()             # <<<<<<<<<<<<<<
 *     self.dofn_runner.bundle_finalizer_param.reset()
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->user_state_context, __pyx_n_s_reset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1006, __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, 1006, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/runners/worker/operations.py":1005
 *     for side_input_map in self.side_input_maps:
 *       side_input_map.reset()
 *     if self.user_state_context:             # <<<<<<<<<<<<<<
 *       self.user_state_context.reset()
 *     self.dofn_runner.bundle_finalizer_param.reset()
 */
  }

  /* "apache_beam/runners/worker/operations.py":1007
 *     if self.user_state_context:
 *       self.user_state_context.reset()
 *     self.dofn_runner.bundle_finalizer_param.reset()             # <<<<<<<<<<<<<<
 * 
 *   def pcollection_count_monitoring_infos(self, tag_to_pcollection_id):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dofn_runner->bundle_finalizer_param, __pyx_n_s_reset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1007, __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, 1007, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":1000
 *       self.user_state_context.reset()
 * 
 *   def reset(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     super(DoOperation, self).reset()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_side_input_map);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":1009
 *     self.dofn_runner.bundle_finalizer_param.reset()
 * 
 *   def pcollection_count_monitoring_infos(self, tag_to_pcollection_id):             # <<<<<<<<<<<<<<
 *     # type: (Dict[str, str]) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo]
 * 
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_34pcollection_count_monitoring_infos(PyObject *__pyx_v_self, PyObject *__pyx_v_tag_to_pcollection_id); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_pcollection_count_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v_tag_to_pcollection_id, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_infos = NULL;
  PyObject *__pyx_v_tag = NULL;
  PyObject *__pyx_v_receiver = NULL;
  PyObject *__pyx_v_pcollection_id = NULL;
  PyObject *__pyx_v_mi = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_unused_mean = NULL;
  PyObject *__pyx_v_sum = NULL;
  PyObject *__pyx_v_count = NULL;
  PyObject *__pyx_v_min = NULL;
  PyObject *__pyx_v_max = NULL;
  PyObject *__pyx_v_sampled_byte_count = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_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;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *(*__pyx_t_15)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__83)
  __Pyx_RefNannySetupContext("pcollection_count_monitoring_infos", 0);
  __Pyx_TraceCall("pcollection_count_monitoring_infos", __pyx_f[0], 1009, 0, __PYX_ERR(0, 1009, __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_pcollection_count_monitoring_inf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1009, __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_6worker_10operations_11DoOperation_34pcollection_count_monitoring_infos)) {
        __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_tag_to_pcollection_id) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_tag_to_pcollection_id);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1009, __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/worker/operations.py":1013
 * 
 *     """Returns the element count MonitoringInfo collected by this operation."""
 *     infos = super(             # <<<<<<<<<<<<<<
 *         DoOperation,
 *         self).pcollection_count_monitoring_infos(tag_to_pcollection_id)
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation));
  __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, 1013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":1015
 *     infos = super(
 *         DoOperation,
 *         self).pcollection_count_monitoring_infos(tag_to_pcollection_id)             # <<<<<<<<<<<<<<
 * 
 *     if self.tagged_receivers:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_pcollection_count_monitoring_inf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1015, __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_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_tag_to_pcollection_id) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_tag_to_pcollection_id);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_infos = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":1017
 *         self).pcollection_count_monitoring_infos(tag_to_pcollection_id)
 * 
 *     if self.tagged_receivers:             # <<<<<<<<<<<<<<
 *       for tag, receiver in self.tagged_receivers.items():
 *         if str(tag) not in tag_to_pcollection_id:
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_self->tagged_receivers); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1017, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "apache_beam/runners/worker/operations.py":1018
 * 
 *     if self.tagged_receivers:
 *       for tag, receiver in self.tagged_receivers.items():             # <<<<<<<<<<<<<<
 *         if str(tag) not in tag_to_pcollection_id:
 *           continue
 */
    __pyx_t_6 = 0;
    if (unlikely(__pyx_v_self->tagged_receivers == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
      __PYX_ERR(0, 1018, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_self->tagged_receivers, 0, __pyx_n_s_items, (&__pyx_t_7), (&__pyx_t_8)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1018, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF(__pyx_t_1);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
    while (1) {
      __pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_7, &__pyx_t_6, &__pyx_t_2, &__pyx_t_3, NULL, __pyx_t_8);
      if (unlikely(__pyx_t_9 == 0)) break;
      if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 1018, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF_SET(__pyx_v_tag, __pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_XDECREF_SET(__pyx_v_receiver, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "apache_beam/runners/worker/operations.py":1019
 *     if self.tagged_receivers:
 *       for tag, receiver in self.tagged_receivers.items():
 *         if str(tag) not in tag_to_pcollection_id:             # <<<<<<<<<<<<<<
 *           continue
 *         pcollection_id = tag_to_pcollection_id[str(tag)]
 */
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_tag); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1019, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_v_tag_to_pcollection_id, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1019, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_10 = (__pyx_t_5 != 0);
      if (__pyx_t_10) {

        /* "apache_beam/runners/worker/operations.py":1020
 *       for tag, receiver in self.tagged_receivers.items():
 *         if str(tag) not in tag_to_pcollection_id:
 *           continue             # <<<<<<<<<<<<<<
 *         pcollection_id = tag_to_pcollection_id[str(tag)]
 *         mi = monitoring_infos.int64_counter(
 */
        goto __pyx_L4_continue;

        /* "apache_beam/runners/worker/operations.py":1019
 *     if self.tagged_receivers:
 *       for tag, receiver in self.tagged_receivers.items():
 *         if str(tag) not in tag_to_pcollection_id:             # <<<<<<<<<<<<<<
 *           continue
 *         pcollection_id = tag_to_pcollection_id[str(tag)]
 */
      }

      /* "apache_beam/runners/worker/operations.py":1021
 *         if str(tag) not in tag_to_pcollection_id:
 *           continue
 *         pcollection_id = tag_to_pcollection_id[str(tag)]             # <<<<<<<<<<<<<<
 *         mi = monitoring_infos.int64_counter(
 *             monitoring_infos.ELEMENT_COUNT_URN,
 */
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_tag); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1021, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_tag_to_pcollection_id, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1021, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF_SET(__pyx_v_pcollection_id, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "apache_beam/runners/worker/operations.py":1022
 *           continue
 *         pcollection_id = tag_to_pcollection_id[str(tag)]
 *         mi = monitoring_infos.int64_counter(             # <<<<<<<<<<<<<<
 *             monitoring_infos.ELEMENT_COUNT_URN,
 *             receiver.opcounter.element_counter.value(),
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_monitoring_infos); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1022, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int64_counter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1022, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "apache_beam/runners/worker/operations.py":1023
 *         pcollection_id = tag_to_pcollection_id[str(tag)]
 *         mi = monitoring_infos.int64_counter(
 *             monitoring_infos.ELEMENT_COUNT_URN,             # <<<<<<<<<<<<<<
 *             receiver.opcounter.element_counter.value(),
 *             pcollection=pcollection_id)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_monitoring_infos); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1023, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ELEMENT_COUNT_URN); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1023, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "apache_beam/runners/worker/operations.py":1024
 *         mi = monitoring_infos.int64_counter(
 *             monitoring_infos.ELEMENT_COUNT_URN,
 *             receiver.opcounter.element_counter.value(),             # <<<<<<<<<<<<<<
 *             pcollection=pcollection_id)
 *         infos[monitoring_infos.to_key(mi)] = mi
 */
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_receiver, __pyx_n_s_opcounter); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1024, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_element_counter); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1024, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_value); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1024, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_12 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_12)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_12);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
        }
      }
      __pyx_t_2 = (__pyx_t_12) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_12) : __Pyx_PyObject_CallNoArg(__pyx_t_11);
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1024, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

      /* "apache_beam/runners/worker/operations.py":1022
 *           continue
 *         pcollection_id = tag_to_pcollection_id[str(tag)]
 *         mi = monitoring_infos.int64_counter(             # <<<<<<<<<<<<<<
 *             monitoring_infos.ELEMENT_COUNT_URN,
 *             receiver.opcounter.element_counter.value(),
 */
      __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1022, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_2);
      __pyx_t_4 = 0;
      __pyx_t_2 = 0;

      /* "apache_beam/runners/worker/operations.py":1025
 *             monitoring_infos.ELEMENT_COUNT_URN,
 *             receiver.opcounter.element_counter.value(),
 *             pcollection=pcollection_id)             # <<<<<<<<<<<<<<
 *         infos[monitoring_infos.to_key(mi)] = mi
 *         (unused_mean, sum, count, min, max) = (
 */
      __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1025, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_pcollection, __pyx_v_pcollection_id) < 0) __PYX_ERR(0, 1025, __pyx_L1_error)

      /* "apache_beam/runners/worker/operations.py":1022
 *           continue
 *         pcollection_id = tag_to_pcollection_id[str(tag)]
 *         mi = monitoring_infos.int64_counter(             # <<<<<<<<<<<<<<
 *             monitoring_infos.ELEMENT_COUNT_URN,
 *             receiver.opcounter.element_counter.value(),
 */
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1022, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF_SET(__pyx_v_mi, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "apache_beam/runners/worker/operations.py":1026
 *             receiver.opcounter.element_counter.value(),
 *             pcollection=pcollection_id)
 *         infos[monitoring_infos.to_key(mi)] = mi             # <<<<<<<<<<<<<<
 *         (unused_mean, sum, count, min, max) = (
 *             receiver.opcounter.mean_byte_counter.value())
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_monitoring_infos); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1026, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_to_key); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1026, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
        }
      }
      __pyx_t_4 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_2, __pyx_v_mi) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_mi);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1026, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(PyObject_SetItem(__pyx_v_infos, __pyx_t_4, __pyx_v_mi) < 0)) __PYX_ERR(0, 1026, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "apache_beam/runners/worker/operations.py":1028
 *         infos[monitoring_infos.to_key(mi)] = mi
 *         (unused_mean, sum, count, min, max) = (
 *             receiver.opcounter.mean_byte_counter.value())             # <<<<<<<<<<<<<<
 *         sampled_byte_count = monitoring_infos.int64_distribution(
 *             monitoring_infos.SAMPLED_BYTE_SIZE_URN,
 */
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_receiver, __pyx_n_s_opcounter); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1028, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_mean_byte_counter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1028, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_value); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1028, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
        }
      }
      __pyx_t_4 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_11);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1028, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
        PyObject* sequence = __pyx_t_4;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 5)) {
          if (size > 5) __Pyx_RaiseTooManyValuesError(5);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 1027, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_11 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
          __pyx_t_3 = PyTuple_GET_ITEM(sequence, 2); 
          __pyx_t_12 = PyTuple_GET_ITEM(sequence, 3); 
          __pyx_t_13 = PyTuple_GET_ITEM(sequence, 4); 
        } else {
          __pyx_t_11 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_3 = PyList_GET_ITEM(sequence, 2); 
          __pyx_t_12 = PyList_GET_ITEM(sequence, 3); 
          __pyx_t_13 = PyList_GET_ITEM(sequence, 4); 
        }
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_12);
        __Pyx_INCREF(__pyx_t_13);
        #else
        {
          Py_ssize_t i;
          PyObject** temps[5] = {&__pyx_t_11,&__pyx_t_2,&__pyx_t_3,&__pyx_t_12,&__pyx_t_13};
          for (i=0; i < 5; i++) {
            PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1027, __pyx_L1_error)
            __Pyx_GOTREF(item);
            *(temps[i]) = item;
          }
        }
        #endif
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        Py_ssize_t index = -1;
        PyObject** temps[5] = {&__pyx_t_11,&__pyx_t_2,&__pyx_t_3,&__pyx_t_12,&__pyx_t_13};
        __pyx_t_14 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1027, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_15 = Py_TYPE(__pyx_t_14)->tp_iternext;
        for (index=0; index < 5; index++) {
          PyObject* item = __pyx_t_15(__pyx_t_14); if (unlikely(!item)) goto __pyx_L7_unpacking_failed;
          __Pyx_GOTREF(item);
          *(temps[index]) = item;
        }
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_14), 5) < 0) __PYX_ERR(0, 1027, __pyx_L1_error)
        __pyx_t_15 = NULL;
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        goto __pyx_L8_unpacking_done;
        __pyx_L7_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __pyx_t_15 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 1027, __pyx_L1_error)
        __pyx_L8_unpacking_done:;
      }

      /* "apache_beam/runners/worker/operations.py":1027
 *             pcollection=pcollection_id)
 *         infos[monitoring_infos.to_key(mi)] = mi
 *         (unused_mean, sum, count, min, max) = (             # <<<<<<<<<<<<<<
 *             receiver.opcounter.mean_byte_counter.value())
 *         sampled_byte_count = monitoring_infos.int64_distribution(
 */
      __Pyx_XDECREF_SET(__pyx_v_unused_mean, __pyx_t_11);
      __pyx_t_11 = 0;
      __Pyx_XDECREF_SET(__pyx_v_sum, __pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_XDECREF_SET(__pyx_v_count, __pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_XDECREF_SET(__pyx_v_min, __pyx_t_12);
      __pyx_t_12 = 0;
      __Pyx_XDECREF_SET(__pyx_v_max, __pyx_t_13);
      __pyx_t_13 = 0;

      /* "apache_beam/runners/worker/operations.py":1029
 *         (unused_mean, sum, count, min, max) = (
 *             receiver.opcounter.mean_byte_counter.value())
 *         sampled_byte_count = monitoring_infos.int64_distribution(             # <<<<<<<<<<<<<<
 *             monitoring_infos.SAMPLED_BYTE_SIZE_URN,
 *             DistributionData(sum, count, min, max),
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_monitoring_infos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1029, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int64_distribution); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1029, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "apache_beam/runners/worker/operations.py":1030
 *             receiver.opcounter.mean_byte_counter.value())
 *         sampled_byte_count = monitoring_infos.int64_distribution(
 *             monitoring_infos.SAMPLED_BYTE_SIZE_URN,             # <<<<<<<<<<<<<<
 *             DistributionData(sum, count, min, max),
 *             pcollection=pcollection_id)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_monitoring_infos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1030, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_SAMPLED_BYTE_SIZE_URN); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1030, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "apache_beam/runners/worker/operations.py":1031
 *         sampled_byte_count = monitoring_infos.int64_distribution(
 *             monitoring_infos.SAMPLED_BYTE_SIZE_URN,
 *             DistributionData(sum, count, min, max),             # <<<<<<<<<<<<<<
 *             pcollection=pcollection_id)
 *         infos[monitoring_infos.to_key(sampled_byte_count)] = sampled_byte_count
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_DistributionData); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1031, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = NULL;
      __pyx_t_9 = 0;
      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_9 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[5] = {__pyx_t_2, __pyx_v_sum, __pyx_v_count, __pyx_v_min, __pyx_v_max};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 4+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1031, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[5] = {__pyx_t_2, __pyx_v_sum, __pyx_v_count, __pyx_v_min, __pyx_v_max};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 4+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1031, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      {
        __pyx_t_11 = PyTuple_New(4+__pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1031, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        if (__pyx_t_2) {
          __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_2); __pyx_t_2 = NULL;
        }
        __Pyx_INCREF(__pyx_v_sum);
        __Pyx_GIVEREF(__pyx_v_sum);
        PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_9, __pyx_v_sum);
        __Pyx_INCREF(__pyx_v_count);
        __Pyx_GIVEREF(__pyx_v_count);
        PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_9, __pyx_v_count);
        __Pyx_INCREF(__pyx_v_min);
        __Pyx_GIVEREF(__pyx_v_min);
        PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_9, __pyx_v_min);
        __Pyx_INCREF(__pyx_v_max);
        __Pyx_GIVEREF(__pyx_v_max);
        PyTuple_SET_ITEM(__pyx_t_11, 3+__pyx_t_9, __pyx_v_max);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1031, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "apache_beam/runners/worker/operations.py":1029
 *         (unused_mean, sum, count, min, max) = (
 *             receiver.opcounter.mean_byte_counter.value())
 *         sampled_byte_count = monitoring_infos.int64_distribution(             # <<<<<<<<<<<<<<
 *             monitoring_infos.SAMPLED_BYTE_SIZE_URN,
 *             DistributionData(sum, count, min, max),
 */
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1029, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_12);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
      __pyx_t_12 = 0;
      __pyx_t_4 = 0;

      /* "apache_beam/runners/worker/operations.py":1032
 *             monitoring_infos.SAMPLED_BYTE_SIZE_URN,
 *             DistributionData(sum, count, min, max),
 *             pcollection=pcollection_id)             # <<<<<<<<<<<<<<
 *         infos[monitoring_infos.to_key(sampled_byte_count)] = sampled_byte_count
 *     return infos
 */
      __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1032, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_pcollection, __pyx_v_pcollection_id) < 0) __PYX_ERR(0, 1032, __pyx_L1_error)

      /* "apache_beam/runners/worker/operations.py":1029
 *         (unused_mean, sum, count, min, max) = (
 *             receiver.opcounter.mean_byte_counter.value())
 *         sampled_byte_count = monitoring_infos.int64_distribution(             # <<<<<<<<<<<<<<
 *             monitoring_infos.SAMPLED_BYTE_SIZE_URN,
 *             DistributionData(sum, count, min, max),
 */
      __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1029, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF_SET(__pyx_v_sampled_byte_count, __pyx_t_12);
      __pyx_t_12 = 0;

      /* "apache_beam/runners/worker/operations.py":1033
 *             DistributionData(sum, count, min, max),
 *             pcollection=pcollection_id)
 *         infos[monitoring_infos.to_key(sampled_byte_count)] = sampled_byte_count             # <<<<<<<<<<<<<<
 *     return infos
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_monitoring_infos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1033, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_to_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1033, __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 && 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_12 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_sampled_byte_count) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_sampled_byte_count);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1033, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(PyObject_SetItem(__pyx_v_infos, __pyx_t_12, __pyx_v_sampled_byte_count) < 0)) __PYX_ERR(0, 1033, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_L4_continue:;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/runners/worker/operations.py":1017
 *         self).pcollection_count_monitoring_infos(tag_to_pcollection_id)
 * 
 *     if self.tagged_receivers:             # <<<<<<<<<<<<<<
 *       for tag, receiver in self.tagged_receivers.items():
 *         if str(tag) not in tag_to_pcollection_id:
 */
  }

  /* "apache_beam/runners/worker/operations.py":1034
 *             pcollection=pcollection_id)
 *         infos[monitoring_infos.to_key(sampled_byte_count)] = sampled_byte_count
 *     return infos             # <<<<<<<<<<<<<<
 * 
 *   def _get_runtime_performance_hints(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_infos);
  __pyx_r = __pyx_v_infos;
  goto __pyx_L0;

  /* "apache_beam/runners/worker/operations.py":1009
 *     self.dofn_runner.bundle_finalizer_param.reset()
 * 
 *   def pcollection_count_monitoring_infos(self, tag_to_pcollection_id):             # <<<<<<<<<<<<<<
 *     # type: (Dict[str, str]) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.pcollection_count_monitoring_infos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_infos);
  __Pyx_XDECREF(__pyx_v_tag);
  __Pyx_XDECREF(__pyx_v_receiver);
  __Pyx_XDECREF(__pyx_v_pcollection_id);
  __Pyx_XDECREF(__pyx_v_mi);
  __Pyx_XDECREF(__pyx_v_unused_mean);
  __Pyx_XDECREF(__pyx_v_sum);
  __Pyx_XDECREF(__pyx_v_count);
  __Pyx_XDECREF(__pyx_v_min);
  __Pyx_XDECREF(__pyx_v_max);
  __Pyx_XDECREF(__pyx_v_sampled_byte_count);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_34pcollection_count_monitoring_infos(PyObject *__pyx_v_self, PyObject *__pyx_v_tag_to_pcollection_id); /*proto*/
static char __pyx_doc_11apache_beam_7runners_6worker_10operations_11DoOperation_33pcollection_count_monitoring_infos[] = "Returns the element count MonitoringInfo collected by this operation.";
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_34pcollection_count_monitoring_infos = {"pcollection_count_monitoring_infos", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_34pcollection_count_monitoring_infos, METH_O, __pyx_doc_11apache_beam_7runners_6worker_10operations_11DoOperation_33pcollection_count_monitoring_infos};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_34pcollection_count_monitoring_infos(PyObject *__pyx_v_self, PyObject *__pyx_v_tag_to_pcollection_id) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pcollection_count_monitoring_infos (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_33pcollection_count_monitoring_infos(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self), ((PyObject *)__pyx_v_tag_to_pcollection_id));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_33pcollection_count_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v_tag_to_pcollection_id) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__83)
  __Pyx_RefNannySetupContext("pcollection_count_monitoring_infos", 0);
  __Pyx_TraceCall("pcollection_count_monitoring_infos (wrapper)", __pyx_f[0], 1009, 0, __PYX_ERR(0, 1009, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_pcollection_count_monitoring_infos(__pyx_v_self, __pyx_v_tag_to_pcollection_id, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.pcollection_count_monitoring_infos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":1036
 *     return infos
 * 
 *   def _get_runtime_performance_hints(self):             # <<<<<<<<<<<<<<
 *     fns = pickler.loads(self.spec.serialized_fn)
 *     if fns and hasattr(fns[0], '_runtime_output_constraints'):
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_36_get_runtime_performance_hints(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_36_get_runtime_performance_hints = {"_get_runtime_performance_hints", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_36_get_runtime_performance_hints, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_36_get_runtime_performance_hints(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_runtime_performance_hints (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_35_get_runtime_performance_hints(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_35_get_runtime_performance_hints(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self) {
  PyObject *__pyx_v_fns = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_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;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__84)
  __Pyx_RefNannySetupContext("_get_runtime_performance_hints", 0);
  __Pyx_TraceCall("_get_runtime_performance_hints", __pyx_f[0], 1036, 0, __PYX_ERR(0, 1036, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":1037
 * 
 *   def _get_runtime_performance_hints(self):
 *     fns = pickler.loads(self.spec.serialized_fn)             # <<<<<<<<<<<<<<
 *     if fns and hasattr(fns[0], '_runtime_output_constraints'):
 *       return fns[0]._runtime_output_constraints
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pickler); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_loads); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.spec, __pyx_n_s_serialized_fn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __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_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, 1037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_fns = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":1038
 *   def _get_runtime_performance_hints(self):
 *     fns = pickler.loads(self.spec.serialized_fn)
 *     if fns and hasattr(fns[0], '_runtime_output_constraints'):             # <<<<<<<<<<<<<<
 *       return fns[0]._runtime_output_constraints
 * 
 */
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_fns); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1038, __pyx_L1_error)
  if (__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_fns, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1038, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_HasAttr(__pyx_t_1, __pyx_n_u_runtime_output_constraints); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1038, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = (__pyx_t_6 != 0);
  __pyx_t_5 = __pyx_t_7;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {

    /* "apache_beam/runners/worker/operations.py":1039
 *     fns = pickler.loads(self.spec.serialized_fn)
 *     if fns and hasattr(fns[0], '_runtime_output_constraints'):
 *       return fns[0]._runtime_output_constraints             # <<<<<<<<<<<<<<
 * 
 *     return {}
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_fns, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1039, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_runtime_output_constraints); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1039, __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/worker/operations.py":1038
 *   def _get_runtime_performance_hints(self):
 *     fns = pickler.loads(self.spec.serialized_fn)
 *     if fns and hasattr(fns[0], '_runtime_output_constraints'):             # <<<<<<<<<<<<<<
 *       return fns[0]._runtime_output_constraints
 * 
 */
  }

  /* "apache_beam/runners/worker/operations.py":1041
 *       return fns[0]._runtime_output_constraints
 * 
 *     return {}             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "apache_beam/runners/worker/operations.py":1036
 *     return infos
 * 
 *   def _get_runtime_performance_hints(self):             # <<<<<<<<<<<<<<
 *     fns = pickler.loads(self.spec.serialized_fn)
 *     if fns and hasattr(fns[0], '_runtime_output_constraints'):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation._get_runtime_performance_hints", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fns);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.pxd":116
 *   cdef object side_input_maps
 *   cdef object user_state_context
 *   cdef public dict timer_inputs             # <<<<<<<<<<<<<<
 *   cdef dict timer_specs
 *   cdef public object input_info
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_12timer_inputs_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_12timer_inputs_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_12timer_inputs___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_12timer_inputs___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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[1], 116, 0, __PYX_ERR(1, 116, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->timer_inputs);
  __pyx_r = __pyx_v_self->timer_inputs;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.timer_inputs.__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_6worker_10operations_11DoOperation_12timer_inputs_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_12timer_inputs_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_12timer_inputs_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_12timer_inputs_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_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[1], 116, 0, __PYX_ERR(1, 116, __pyx_L1_error));
  if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(1, 116, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->timer_inputs);
  __Pyx_DECREF(__pyx_v_self->timer_inputs);
  __pyx_v_self->timer_inputs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.timer_inputs.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_12timer_inputs_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_12timer_inputs_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_12timer_inputs_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self));

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_12timer_inputs_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self) {
  int __pyx_r;
  __Pyx_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[1], 116, 0, __PYX_ERR(1, 116, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->timer_inputs);
  __Pyx_DECREF(__pyx_v_self->timer_inputs);
  __pyx_v_self->timer_inputs = ((PyObject*)Py_None);

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.timer_inputs.__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/worker/operations.pxd":118
 *   cdef public dict timer_inputs
 *   cdef dict timer_specs
 *   cdef public object input_info             # <<<<<<<<<<<<<<
 *   cdef object fn
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_10input_info_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_10input_info_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_10input_info___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_10input_info___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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[1], 118, 0, __PYX_ERR(1, 118, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->input_info);
  __pyx_r = __pyx_v_self->input_info;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.input_info.__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_6worker_10operations_11DoOperation_10input_info_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_10input_info_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_10input_info_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_10input_info_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_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[1], 118, 0, __PYX_ERR(1, 118, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->input_info);
  __Pyx_DECREF(__pyx_v_self->input_info);
  __pyx_v_self->input_info = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.input_info.__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_6worker_10operations_11DoOperation_10input_info_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_10input_info_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_10input_info_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self));

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_10input_info_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self) {
  int __pyx_r;
  __Pyx_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[1], 118, 0, __PYX_ERR(1, 118, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->input_info);
  __Pyx_DECREF(__pyx_v_self->input_info);
  __pyx_v_self->input_info = Py_None;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.input_info.__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_6worker_10operations_11DoOperation_38__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_38__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_38__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_38__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_6worker_10operations_11DoOperation_37__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_37__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_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__85)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error));

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.dofn_runner, self.execution_context, self.fn, self.input_info, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.side_input_maps, self.spec, self.state_sampler, self.step_name, self.tagged_receivers, self.timer_inputs, self.timer_specs, self.user_state_context)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.debug_logging_enabled); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.setup_done); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(24); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.consumers);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.consumers);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->__pyx_base.consumers);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.counter_factory);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.counter_factory);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->__pyx_base.counter_factory);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.data_sampler);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.data_sampler);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->__pyx_base.data_sampler);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->dofn_runner));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->dofn_runner));
  PyTuple_SET_ITEM(__pyx_t_3, 4, ((PyObject *)__pyx_v_self->dofn_runner));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.execution_context);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.execution_context);
  PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_self->__pyx_base.execution_context);
  __Pyx_INCREF(__pyx_v_self->fn);
  __Pyx_GIVEREF(__pyx_v_self->fn);
  PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_v_self->fn);
  __Pyx_INCREF(__pyx_v_self->input_info);
  __Pyx_GIVEREF(__pyx_v_self->input_info);
  PyTuple_SET_ITEM(__pyx_t_3, 7, __pyx_v_self->input_info);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.metrics_container);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.metrics_container);
  PyTuple_SET_ITEM(__pyx_t_3, 8, __pyx_v_self->__pyx_base.metrics_container);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.name_context);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.name_context);
  PyTuple_SET_ITEM(__pyx_t_3, 9, __pyx_v_self->__pyx_base.name_context);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.operation_name);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.operation_name);
  PyTuple_SET_ITEM(__pyx_t_3, 10, __pyx_v_self->__pyx_base.operation_name);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.receivers);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.receivers);
  PyTuple_SET_ITEM(__pyx_t_3, 11, __pyx_v_self->__pyx_base.receivers);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.scoped_finish_state);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.scoped_finish_state);
  PyTuple_SET_ITEM(__pyx_t_3, 12, __pyx_v_self->__pyx_base.scoped_finish_state);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.scoped_process_state);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.scoped_process_state);
  PyTuple_SET_ITEM(__pyx_t_3, 13, __pyx_v_self->__pyx_base.scoped_process_state);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.scoped_start_state);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.scoped_start_state);
  PyTuple_SET_ITEM(__pyx_t_3, 14, __pyx_v_self->__pyx_base.scoped_start_state);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 15, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_self->side_input_maps);
  __Pyx_GIVEREF(__pyx_v_self->side_input_maps);
  PyTuple_SET_ITEM(__pyx_t_3, 16, __pyx_v_self->side_input_maps);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.spec);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.spec);
  PyTuple_SET_ITEM(__pyx_t_3, 17, __pyx_v_self->__pyx_base.spec);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.state_sampler);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.state_sampler);
  PyTuple_SET_ITEM(__pyx_t_3, 18, __pyx_v_self->__pyx_base.state_sampler);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.step_name);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.step_name);
  PyTuple_SET_ITEM(__pyx_t_3, 19, __pyx_v_self->__pyx_base.step_name);
  __Pyx_INCREF(__pyx_v_self->tagged_receivers);
  __Pyx_GIVEREF(__pyx_v_self->tagged_receivers);
  PyTuple_SET_ITEM(__pyx_t_3, 20, __pyx_v_self->tagged_receivers);
  __Pyx_INCREF(__pyx_v_self->timer_inputs);
  __Pyx_GIVEREF(__pyx_v_self->timer_inputs);
  PyTuple_SET_ITEM(__pyx_t_3, 21, __pyx_v_self->timer_inputs);
  __Pyx_INCREF(__pyx_v_self->timer_specs);
  __Pyx_GIVEREF(__pyx_v_self->timer_specs);
  PyTuple_SET_ITEM(__pyx_t_3, 22, __pyx_v_self->timer_specs);
  __Pyx_INCREF(__pyx_v_self->user_state_context);
  __Pyx_GIVEREF(__pyx_v_self->user_state_context);
  PyTuple_SET_ITEM(__pyx_t_3, 23, __pyx_v_self->user_state_context);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.dofn_runner, self.execution_context, self.fn, self.input_info, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.side_input_maps, self.spec, self.state_sampler, self.step_name, self.tagged_receivers, self.timer_inputs, self.timer_specs, self.user_state_context)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v__dict = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":7
 *     state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.dofn_runner, self.execution_context, self.fn, self.input_info, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.side_input_maps, self.spec, self.state_sampler, self.step_name, self.tagged_receivers, self.timer_inputs, self.timer_specs, self.user_state_context)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         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(2, 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(2, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.dofn_runner is not None or self.execution_context is not None or self.fn is not None or self.input_info is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.side_input_maps is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.tagged_receivers is not None or self.timer_inputs is not None or self.timer_specs is not None or self.user_state_context is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.dofn_runner, self.execution_context, self.fn, self.input_info, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.side_input_maps, self.spec, self.state_sampler, self.step_name, self.tagged_receivers, self.timer_inputs, self.timer_specs, self.user_state_context)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.dofn_runner is not None or self.execution_context is not None or self.fn is not None or self.input_info is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.side_input_maps is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.tagged_receivers is not None or self.timer_inputs is not None or self.timer_specs is not None or self.user_state_context is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_DoOperation, (type(self), 0x521836b, None), state
 */
  /*else*/ {
    __pyx_t_4 = (__pyx_v_self->__pyx_base.consumers != 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->__pyx_base.counter_factory != 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->__pyx_base.data_sampler != 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 = (((PyObject *)__pyx_v_self->dofn_runner) != 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->__pyx_base.execution_context != 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->fn != 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->input_info != 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->__pyx_base.metrics_container != 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->__pyx_base.name_context != 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->__pyx_base.operation_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->__pyx_base.receivers != ((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->__pyx_base.scoped_finish_state != 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->__pyx_base.scoped_process_state != 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->__pyx_base.scoped_start_state != 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->side_input_maps != 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->__pyx_base.spec != 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->__pyx_base.state_sampler != 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->__pyx_base.step_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->tagged_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->timer_inputs != ((PyObject*)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->timer_specs != ((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->user_state_context != 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.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.dofn_runner is not None or self.execution_context is not None or self.fn is not None or self.input_info is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.side_input_maps is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.tagged_receivers is not None or self.timer_inputs is not None or self.timer_specs is not None or self.user_state_context is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_DoOperation, (type(self), 0x521836b, None), state
 *     else:
 */
  __pyx_t_5 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":13
 *         use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.dofn_runner is not None or self.execution_context is not None or self.fn is not None or self.input_info is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.side_input_maps is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.tagged_receivers is not None or self.timer_inputs is not None or self.timer_specs is not None or self.user_state_context is not None
 *     if use_setstate:
 *         return __pyx_unpickle_DoOperation, (type(self), 0x521836b, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_DoOperation, (type(self), 0x521836b, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_DoOperation); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_86082411);
    __Pyx_GIVEREF(__pyx_int_86082411);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_86082411);
    __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(2, 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.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.dofn_runner is not None or self.execution_context is not None or self.fn is not None or self.input_info is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.side_input_maps is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.tagged_receivers is not None or self.timer_inputs is not None or self.timer_specs is not None or self.user_state_context is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_DoOperation, (type(self), 0x521836b, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_DoOperation, (type(self), 0x521836b, None), state
 *     else:
 *         return __pyx_unpickle_DoOperation, (type(self), 0x521836b, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_DoOperation__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_DoOperation); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_86082411);
    __Pyx_GIVEREF(__pyx_int_86082411);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_86082411);
    __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(2, 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.worker.operations.DoOperation.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DoOperation, (type(self), 0x521836b, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DoOperation__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_40__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_40__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_40__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_40__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_6worker_10operations_11DoOperation_39__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_39__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__86)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[2], 16, 0, __PYX_ERR(2, 16, __pyx_L1_error));

  /* "(tree fragment)":17
 *         return __pyx_unpickle_DoOperation, (type(self), 0x521836b, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_DoOperation__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(2, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_DoOperation__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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_DoOperation, (type(self), 0x521836b, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DoOperation__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":1045
 * 
 * class SdfTruncateSizedRestrictions(DoOperation):
 *   def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *     super(SdfTruncateSizedRestrictions, self).__init__(*args, **kwargs)
 * 
 */

/* Python wrapper */
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
  __Pyx_GOTREF(__pyx_v_kwargs);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions___init__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_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("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 1045, 0, __PYX_ERR(0, 1045, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":1046
 * class SdfTruncateSizedRestrictions(DoOperation):
 *   def __init__(self, *args, **kwargs):
 *     super(SdfTruncateSizedRestrictions, self).__init__(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *   def current_element_progress(self):
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions));
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self));
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1046, __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_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "apache_beam/runners/worker/operations.py":1045
 * 
 * class SdfTruncateSizedRestrictions(DoOperation):
 *   def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *     super(SdfTruncateSizedRestrictions, self).__init__(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfTruncateSizedRestrictions.__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/worker/operations.py":1048
 *     super(SdfTruncateSizedRestrictions, self).__init__(*args, **kwargs)
 * 
 *   def current_element_progress(self):             # <<<<<<<<<<<<<<
 *     # type: () -> Optional[iobase.RestrictionProgress]
 *     return self.receivers[0].current_element_progress()
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_3current_element_progress(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_3current_element_progress = {"current_element_progress", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_3current_element_progress, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_3current_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_6worker_10operations_28SdfTruncateSizedRestrictions_2current_element_progress(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_2current_element_progress(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__87)
  __Pyx_RefNannySetupContext("current_element_progress", 0);
  __Pyx_TraceCall("current_element_progress", __pyx_f[0], 1048, 0, __PYX_ERR(0, 1048, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":1050
 *   def current_element_progress(self):
 *     # type: () -> Optional[iobase.RestrictionProgress]
 *     return self.receivers[0].current_element_progress()             # <<<<<<<<<<<<<<
 * 
 *   def try_split(
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(__pyx_v_self->__pyx_base.__pyx_base.receivers == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 1050, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->__pyx_base.__pyx_base.receivers, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1050, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_current_element_progress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1050, __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 && 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_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1050, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/runners/worker/operations.py":1048
 *     super(SdfTruncateSizedRestrictions, self).__init__(*args, **kwargs)
 * 
 *   def current_element_progress(self):             # <<<<<<<<<<<<<<
 *     # type: () -> Optional[iobase.RestrictionProgress]
 *     return self.receivers[0].current_element_progress()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfTruncateSizedRestrictions.current_element_progress", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":1052
 *     return self.receivers[0].current_element_progress()
 * 
 *   def try_split(             # <<<<<<<<<<<<<<
 *       self, fraction_of_remainder
 *   ):  # type: (...) -> Optional[Tuple[Iterable[SdfSplitResultsPrimary], Iterable[SdfSplitResultsResidual]]]
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_5try_split(PyObject *__pyx_v_self, PyObject *__pyx_v_fraction_of_remainder); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_5try_split = {"try_split", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_5try_split, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_5try_split(PyObject *__pyx_v_self, PyObject *__pyx_v_fraction_of_remainder) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("try_split (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_4try_split(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *)__pyx_v_self), ((PyObject *)__pyx_v_fraction_of_remainder));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_4try_split(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *__pyx_v_self, PyObject *__pyx_v_fraction_of_remainder) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__88)
  __Pyx_RefNannySetupContext("try_split", 0);
  __Pyx_TraceCall("try_split", __pyx_f[0], 1052, 0, __PYX_ERR(0, 1052, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":1055
 *       self, fraction_of_remainder
 *   ):  # type: (...) -> Optional[Tuple[Iterable[SdfSplitResultsPrimary], Iterable[SdfSplitResultsResidual]]]
 *     return self.receivers[0].try_split(fraction_of_remainder)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(__pyx_v_self->__pyx_base.__pyx_base.receivers == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 1055, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->__pyx_base.__pyx_base.receivers, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_try_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1055, __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 && 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_fraction_of_remainder) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_fraction_of_remainder);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/runners/worker/operations.py":1052
 *     return self.receivers[0].current_element_progress()
 * 
 *   def try_split(             # <<<<<<<<<<<<<<
 *       self, fraction_of_remainder
 *   ):  # type: (...) -> Optional[Tuple[Iterable[SdfSplitResultsPrimary], Iterable[SdfSplitResultsResidual]]]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfTruncateSizedRestrictions.try_split", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_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_6worker_10operations_28SdfTruncateSizedRestrictions_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_7__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_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_6worker_10operations_28SdfTruncateSizedRestrictions_6__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_6__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_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__89)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error));

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.dofn_runner, self.execution_context, self.fn, self.input_info, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.side_input_maps, self.spec, self.state_sampler, self.step_name, self.tagged_receivers, self.timer_inputs, self.timer_specs, self.user_state_context)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.__pyx_base.debug_logging_enabled); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.__pyx_base.setup_done); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(24); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.consumers);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.consumers);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->__pyx_base.__pyx_base.consumers);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.counter_factory);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.counter_factory);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->__pyx_base.__pyx_base.counter_factory);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.data_sampler);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.data_sampler);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->__pyx_base.__pyx_base.data_sampler);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.dofn_runner));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.dofn_runner));
  PyTuple_SET_ITEM(__pyx_t_3, 4, ((PyObject *)__pyx_v_self->__pyx_base.dofn_runner));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.execution_context);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.execution_context);
  PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_self->__pyx_base.__pyx_base.execution_context);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.fn);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.fn);
  PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_v_self->__pyx_base.fn);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.input_info);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.input_info);
  PyTuple_SET_ITEM(__pyx_t_3, 7, __pyx_v_self->__pyx_base.input_info);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.metrics_container);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.metrics_container);
  PyTuple_SET_ITEM(__pyx_t_3, 8, __pyx_v_self->__pyx_base.__pyx_base.metrics_container);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.name_context);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.name_context);
  PyTuple_SET_ITEM(__pyx_t_3, 9, __pyx_v_self->__pyx_base.__pyx_base.name_context);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.operation_name);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.operation_name);
  PyTuple_SET_ITEM(__pyx_t_3, 10, __pyx_v_self->__pyx_base.__pyx_base.operation_name);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.receivers);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.receivers);
  PyTuple_SET_ITEM(__pyx_t_3, 11, __pyx_v_self->__pyx_base.__pyx_base.receivers);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.scoped_finish_state);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.scoped_finish_state);
  PyTuple_SET_ITEM(__pyx_t_3, 12, __pyx_v_self->__pyx_base.__pyx_base.scoped_finish_state);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.scoped_process_state);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.scoped_process_state);
  PyTuple_SET_ITEM(__pyx_t_3, 13, __pyx_v_self->__pyx_base.__pyx_base.scoped_process_state);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.scoped_start_state);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.scoped_start_state);
  PyTuple_SET_ITEM(__pyx_t_3, 14, __pyx_v_self->__pyx_base.__pyx_base.scoped_start_state);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 15, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.side_input_maps);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.side_input_maps);
  PyTuple_SET_ITEM(__pyx_t_3, 16, __pyx_v_self->__pyx_base.side_input_maps);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.spec);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.spec);
  PyTuple_SET_ITEM(__pyx_t_3, 17, __pyx_v_self->__pyx_base.__pyx_base.spec);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.state_sampler);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.state_sampler);
  PyTuple_SET_ITEM(__pyx_t_3, 18, __pyx_v_self->__pyx_base.__pyx_base.state_sampler);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.step_name);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.step_name);
  PyTuple_SET_ITEM(__pyx_t_3, 19, __pyx_v_self->__pyx_base.__pyx_base.step_name);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.tagged_receivers);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.tagged_receivers);
  PyTuple_SET_ITEM(__pyx_t_3, 20, __pyx_v_self->__pyx_base.tagged_receivers);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.timer_inputs);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.timer_inputs);
  PyTuple_SET_ITEM(__pyx_t_3, 21, __pyx_v_self->__pyx_base.timer_inputs);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.timer_specs);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.timer_specs);
  PyTuple_SET_ITEM(__pyx_t_3, 22, __pyx_v_self->__pyx_base.timer_specs);
  __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_3, 23, __pyx_v_self->__pyx_base.user_state_context);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.dofn_runner, self.execution_context, self.fn, self.input_info, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.side_input_maps, self.spec, self.state_sampler, self.step_name, self.tagged_receivers, self.timer_inputs, self.timer_specs, self.user_state_context)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v__dict = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":7
 *     state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.dofn_runner, self.execution_context, self.fn, self.input_info, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.side_input_maps, self.spec, self.state_sampler, self.step_name, self.tagged_receivers, self.timer_inputs, self.timer_specs, self.user_state_context)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         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(2, 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(2, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.dofn_runner is not None or self.execution_context is not None or self.fn is not None or self.input_info is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.side_input_maps is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.tagged_receivers is not None or self.timer_inputs is not None or self.timer_specs is not None or self.user_state_context is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.dofn_runner, self.execution_context, self.fn, self.input_info, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.side_input_maps, self.spec, self.state_sampler, self.step_name, self.tagged_receivers, self.timer_inputs, self.timer_specs, self.user_state_context)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.dofn_runner is not None or self.execution_context is not None or self.fn is not None or self.input_info is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.side_input_maps is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.tagged_receivers is not None or self.timer_inputs is not None or self.timer_specs is not None or self.user_state_context is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_SdfTruncateSizedRestrictions, (type(self), 0x521836b, None), state
 */
  /*else*/ {
    __pyx_t_4 = (__pyx_v_self->__pyx_base.__pyx_base.consumers != 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->__pyx_base.__pyx_base.counter_factory != 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->__pyx_base.__pyx_base.data_sampler != 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 = (((PyObject *)__pyx_v_self->__pyx_base.dofn_runner) != 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->__pyx_base.__pyx_base.execution_context != 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->__pyx_base.fn != 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->__pyx_base.input_info != 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->__pyx_base.__pyx_base.metrics_container != 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->__pyx_base.__pyx_base.name_context != 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->__pyx_base.__pyx_base.operation_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->__pyx_base.__pyx_base.receivers != ((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->__pyx_base.__pyx_base.scoped_finish_state != 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->__pyx_base.__pyx_base.scoped_process_state != 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->__pyx_base.__pyx_base.scoped_start_state != 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->__pyx_base.side_input_maps != 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->__pyx_base.__pyx_base.spec != 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->__pyx_base.__pyx_base.state_sampler != 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->__pyx_base.__pyx_base.step_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->__pyx_base.tagged_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->__pyx_base.timer_inputs != ((PyObject*)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->__pyx_base.timer_specs != ((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->__pyx_base.user_state_context != 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.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.dofn_runner is not None or self.execution_context is not None or self.fn is not None or self.input_info is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.side_input_maps is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.tagged_receivers is not None or self.timer_inputs is not None or self.timer_specs is not None or self.user_state_context is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_SdfTruncateSizedRestrictions, (type(self), 0x521836b, None), state
 *     else:
 */
  __pyx_t_5 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":13
 *         use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.dofn_runner is not None or self.execution_context is not None or self.fn is not None or self.input_info is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.side_input_maps is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.tagged_receivers is not None or self.timer_inputs is not None or self.timer_specs is not None or self.user_state_context is not None
 *     if use_setstate:
 *         return __pyx_unpickle_SdfTruncateSizedRestrictions, (type(self), 0x521836b, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_SdfTruncateSizedRestrictions, (type(self), 0x521836b, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_SdfTruncateSizedR); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_86082411);
    __Pyx_GIVEREF(__pyx_int_86082411);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_86082411);
    __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(2, 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.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.dofn_runner is not None or self.execution_context is not None or self.fn is not None or self.input_info is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.side_input_maps is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.tagged_receivers is not None or self.timer_inputs is not None or self.timer_specs is not None or self.user_state_context is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_SdfTruncateSizedRestrictions, (type(self), 0x521836b, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_SdfTruncateSizedRestrictions, (type(self), 0x521836b, None), state
 *     else:
 *         return __pyx_unpickle_SdfTruncateSizedRestrictions, (type(self), 0x521836b, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_SdfTruncateSizedRestrictions__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_SdfTruncateSizedR); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_86082411);
    __Pyx_GIVEREF(__pyx_int_86082411);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_86082411);
    __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(2, 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.worker.operations.SdfTruncateSizedRestrictions.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_SdfTruncateSizedRestrictions, (type(self), 0x521836b, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_SdfTruncateSizedRestrictions__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_9__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_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_6worker_10operations_28SdfTruncateSizedRestrictions_8__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_8__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__90)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[2], 16, 0, __PYX_ERR(2, 16, __pyx_L1_error));

  /* "(tree fragment)":17
 *         return __pyx_unpickle_SdfTruncateSizedRestrictions, (type(self), 0x521836b, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_SdfTruncateSizedRestrictions__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(2, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_SdfTruncateSizedRestrictions__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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_SdfTruncateSizedRestrictions, (type(self), 0x521836b, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_SdfTruncateSizedRestrictions__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfTruncateSizedRestrictions.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":1059
 * 
 * class SdfProcessSizedElements(DoOperation):
 *   def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *     super(SdfProcessSizedElements, self).__init__(*args, **kwargs)
 *     self.lock = threading.RLock()
 */

/* Python wrapper */
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
  __Pyx_GOTREF(__pyx_v_kwargs);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements___init__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_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("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 1059, 0, __PYX_ERR(0, 1059, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":1060
 * class SdfProcessSizedElements(DoOperation):
 *   def __init__(self, *args, **kwargs):
 *     super(SdfProcessSizedElements, self).__init__(*args, **kwargs)             # <<<<<<<<<<<<<<
 *     self.lock = threading.RLock()
 *     self.element_start_output_bytes = None  # type: Optional[int]
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1060, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements));
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self));
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1060, __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_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1060, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1060, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1060, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "apache_beam/runners/worker/operations.py":1061
 *   def __init__(self, *args, **kwargs):
 *     super(SdfProcessSizedElements, self).__init__(*args, **kwargs)
 *     self.lock = threading.RLock()             # <<<<<<<<<<<<<<
 *     self.element_start_output_bytes = None  # type: Optional[int]
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_threading); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_RLock); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1061, __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, 1061, __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->lock);
  __Pyx_DECREF(__pyx_v_self->lock);
  __pyx_v_self->lock = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "apache_beam/runners/worker/operations.py":1062
 *     super(SdfProcessSizedElements, self).__init__(*args, **kwargs)
 *     self.lock = threading.RLock()
 *     self.element_start_output_bytes = None  # type: Optional[int]             # <<<<<<<<<<<<<<
 * 
 *   def process(self, o):
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->element_start_output_bytes);
  __Pyx_DECREF(__pyx_v_self->element_start_output_bytes);
  __pyx_v_self->element_start_output_bytes = Py_None;

  /* "apache_beam/runners/worker/operations.py":1059
 * 
 * class SdfProcessSizedElements(DoOperation):
 *   def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *     super(SdfProcessSizedElements, self).__init__(*args, **kwargs)
 *     self.lock = threading.RLock()
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfProcessSizedElements.__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/worker/operations.py":1064
 *     self.element_start_output_bytes = None  # type: Optional[int]
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     assert self.tagged_receivers is not None
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_3process(PyObject *__pyx_v_self, PyObject *__pyx_v_o); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_receiver = NULL;
  PyObject *__pyx_v_delayed_applications = NULL;
  PyObject *__pyx_v_delayed_application = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_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;
  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;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  int __pyx_t_16;
  int __pyx_t_17;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_t_19;
  PyObject *(*__pyx_t_20)(PyObject *);
  int __pyx_t_21;
  char const *__pyx_t_22;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  PyObject *__pyx_t_26 = NULL;
  PyObject *__pyx_t_27 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__91)
  __Pyx_RefNannySetupContext("process", 0);
  __Pyx_TraceCall("process", __pyx_f[0], 1064, 0, __PYX_ERR(0, 1064, __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, 1064, __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_6worker_10operations_23SdfProcessSizedElements_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_o)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_o));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1064, __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/worker/operations.py":1066
 *   def process(self, o):
 *     # type: (WindowedValue) -> None
 *     assert self.tagged_receivers is not None             # <<<<<<<<<<<<<<
 *     with self.scoped_process_state:
 *       try:
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_5 = (__pyx_v_self->__pyx_base.tagged_receivers != Py_None);
    if (unlikely(!(__pyx_t_5 != 0))) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 1066, __pyx_L1_error)
    }
  }
  #endif

  /* "apache_beam/runners/worker/operations.py":1067
 *     # type: (WindowedValue) -> None
 *     assert self.tagged_receivers is not None
 *     with self.scoped_process_state:             # <<<<<<<<<<<<<<
 *       try:
 *         with self.lock:
 */
  /*with:*/ {
    __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.__pyx_base.scoped_process_state, __pyx_n_s_exit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1067, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.__pyx_base.scoped_process_state, __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1067, __pyx_L3_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, 1067, __pyx_L3_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:*/ {
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_9);
        /*try:*/ {

          /* "apache_beam/runners/worker/operations.py":1068
 *     assert self.tagged_receivers is not None
 *     with self.scoped_process_state:
 *       try:             # <<<<<<<<<<<<<<
 *         with self.lock:
 *           self.element_start_output_bytes = \
 */
          /*try:*/ {

            /* "apache_beam/runners/worker/operations.py":1069
 *     with self.scoped_process_state:
 *       try:
 *         with self.lock:             # <<<<<<<<<<<<<<
 *           self.element_start_output_bytes = \
 *             self.tagged_receivers.total_output_bytes()
 */
            /*with:*/ {
              __pyx_t_10 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->lock, __pyx_n_s_exit); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1069, __pyx_L14_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->lock, __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1069, __pyx_L16_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, 1069, __pyx_L16_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:*/ {
                {
                  __Pyx_PyThreadState_declare
                  __Pyx_PyThreadState_assign
                  __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
                  __Pyx_XGOTREF(__pyx_t_11);
                  __Pyx_XGOTREF(__pyx_t_12);
                  __Pyx_XGOTREF(__pyx_t_13);
                  /*try:*/ {

                    /* "apache_beam/runners/worker/operations.py":1071
 *         with self.lock:
 *           self.element_start_output_bytes = \
 *             self.tagged_receivers.total_output_bytes()             # <<<<<<<<<<<<<<
 *           for receiver in self.tagged_receivers.values():
 *             receiver.opcounter.restart_sampling()
 */
                    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.tagged_receivers, __pyx_n_s_total_output_bytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1071, __pyx_L20_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, 1071, __pyx_L20_error)
                    __Pyx_GOTREF(__pyx_t_1);
                    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

                    /* "apache_beam/runners/worker/operations.py":1070
 *       try:
 *         with self.lock:
 *           self.element_start_output_bytes = \             # <<<<<<<<<<<<<<
 *             self.tagged_receivers.total_output_bytes()
 *           for receiver in self.tagged_receivers.values():
 */
                    __Pyx_GIVEREF(__pyx_t_1);
                    __Pyx_GOTREF(__pyx_v_self->element_start_output_bytes);
                    __Pyx_DECREF(__pyx_v_self->element_start_output_bytes);
                    __pyx_v_self->element_start_output_bytes = __pyx_t_1;
                    __pyx_t_1 = 0;

                    /* "apache_beam/runners/worker/operations.py":1072
 *           self.element_start_output_bytes = \
 *             self.tagged_receivers.total_output_bytes()
 *           for receiver in self.tagged_receivers.values():             # <<<<<<<<<<<<<<
 *             receiver.opcounter.restart_sampling()
 *         # Actually processing the element can be expensive; do it without
 */
                    __pyx_t_14 = 0;
                    if (unlikely(__pyx_v_self->__pyx_base.tagged_receivers == Py_None)) {
                      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values");
                      __PYX_ERR(0, 1072, __pyx_L20_error)
                    }
                    __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_self->__pyx_base.tagged_receivers, 0, __pyx_n_s_values, (&__pyx_t_15), (&__pyx_t_16)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1072, __pyx_L20_error)
                    __Pyx_GOTREF(__pyx_t_2);
                    __Pyx_XDECREF(__pyx_t_1);
                    __pyx_t_1 = __pyx_t_2;
                    __pyx_t_2 = 0;
                    while (1) {
                      __pyx_t_17 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_15, &__pyx_t_14, NULL, &__pyx_t_2, NULL, __pyx_t_16);
                      if (unlikely(__pyx_t_17 == 0)) break;
                      if (unlikely(__pyx_t_17 == -1)) __PYX_ERR(0, 1072, __pyx_L20_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __Pyx_XDECREF_SET(__pyx_v_receiver, __pyx_t_2);
                      __pyx_t_2 = 0;

                      /* "apache_beam/runners/worker/operations.py":1073
 *             self.tagged_receivers.total_output_bytes()
 *           for receiver in self.tagged_receivers.values():
 *             receiver.opcounter.restart_sampling()             # <<<<<<<<<<<<<<
 *         # Actually processing the element can be expensive; do it without
 *         # the lock.
 */
                      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_receiver, __pyx_n_s_opcounter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1073, __pyx_L20_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_restart_sampling); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1073, __pyx_L20_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __pyx_t_3 = NULL;
                      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_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1073, __pyx_L20_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                    }
                    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                    /* "apache_beam/runners/worker/operations.py":1069
 *     with self.scoped_process_state:
 *       try:
 *         with self.lock:             # <<<<<<<<<<<<<<
 *           self.element_start_output_bytes = \
 *             self.tagged_receivers.total_output_bytes()
 */
                  }
                  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
                  goto __pyx_L25_try_end;
                  __pyx_L20_error:;
                  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                  /*except:*/ {
                    __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfProcessSizedElements.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
                    if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_4) < 0) __PYX_ERR(0, 1069, __pyx_L22_except_error)
                    __Pyx_GOTREF(__pyx_t_1);
                    __Pyx_GOTREF(__pyx_t_2);
                    __Pyx_GOTREF(__pyx_t_4);
                    __pyx_t_3 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1069, __pyx_L22_except_error)
                    __Pyx_GOTREF(__pyx_t_3);
                    __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL);
                    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                    if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1069, __pyx_L22_except_error)
                    __Pyx_GOTREF(__pyx_t_18);
                    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_18);
                    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
                    if (__pyx_t_5 < 0) __PYX_ERR(0, 1069, __pyx_L22_except_error)
                    __pyx_t_19 = ((!(__pyx_t_5 != 0)) != 0);
                    if (__pyx_t_19) {
                      __Pyx_GIVEREF(__pyx_t_1);
                      __Pyx_GIVEREF(__pyx_t_2);
                      __Pyx_XGIVEREF(__pyx_t_4);
                      __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_2, __pyx_t_4);
                      __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_4 = 0; 
                      __PYX_ERR(0, 1069, __pyx_L22_except_error)
                    }
                    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                    goto __pyx_L21_exception_handled;
                  }
                  __pyx_L22_except_error:;
                  __Pyx_XGIVEREF(__pyx_t_11);
                  __Pyx_XGIVEREF(__pyx_t_12);
                  __Pyx_XGIVEREF(__pyx_t_13);
                  __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
                  goto __pyx_L14_error;
                  __pyx_L21_exception_handled:;
                  __Pyx_XGIVEREF(__pyx_t_11);
                  __Pyx_XGIVEREF(__pyx_t_12);
                  __Pyx_XGIVEREF(__pyx_t_13);
                  __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
                  __pyx_L25_try_end:;
                }
              }
              /*finally:*/ {
                /*normal exit:*/{
                  if (__pyx_t_10) {
                    __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_tuple__29, NULL);
                    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                    if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1069, __pyx_L14_error)
                    __Pyx_GOTREF(__pyx_t_13);
                    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                  }
                  goto __pyx_L19;
                }
                __pyx_L19:;
              }
              goto __pyx_L31;
              __pyx_L16_error:;
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              goto __pyx_L14_error;
              __pyx_L31:;
            }

            /* "apache_beam/runners/worker/operations.py":1076
 *         # Actually processing the element can be expensive; do it without
 *         # the lock.
 *         delayed_applications = self.dofn_runner.process_with_sized_restriction(             # <<<<<<<<<<<<<<
 *             o)
 *         if delayed_applications:
 */
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.dofn_runner), __pyx_n_s_process_with_sized_restriction); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1076, __pyx_L14_error)
            __Pyx_GOTREF(__pyx_t_2);

            /* "apache_beam/runners/worker/operations.py":1077
 *         # the lock.
 *         delayed_applications = self.dofn_runner.process_with_sized_restriction(
 *             o)             # <<<<<<<<<<<<<<
 *         if delayed_applications:
 *           assert self.execution_context is not None
 */
            __pyx_t_1 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(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_4 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, ((PyObject *)__pyx_v_o)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_o));
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1076, __pyx_L14_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_v_delayed_applications = __pyx_t_4;
            __pyx_t_4 = 0;

            /* "apache_beam/runners/worker/operations.py":1078
 *         delayed_applications = self.dofn_runner.process_with_sized_restriction(
 *             o)
 *         if delayed_applications:             # <<<<<<<<<<<<<<
 *           assert self.execution_context is not None
 *           for delayed_application in delayed_applications:
 */
            __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_v_delayed_applications); if (unlikely(__pyx_t_19 < 0)) __PYX_ERR(0, 1078, __pyx_L14_error)
            if (__pyx_t_19) {

              /* "apache_beam/runners/worker/operations.py":1079
 *             o)
 *         if delayed_applications:
 *           assert self.execution_context is not None             # <<<<<<<<<<<<<<
 *           for delayed_application in delayed_applications:
 *             self.execution_context.delayed_applications.append(
 */
              #ifndef CYTHON_WITHOUT_ASSERTIONS
              if (unlikely(__pyx_assertions_enabled())) {
                __pyx_t_19 = (__pyx_v_self->__pyx_base.__pyx_base.execution_context != Py_None);
                if (unlikely(!(__pyx_t_19 != 0))) {
                  PyErr_SetNone(PyExc_AssertionError);
                  __PYX_ERR(0, 1079, __pyx_L14_error)
                }
              }
              #endif

              /* "apache_beam/runners/worker/operations.py":1080
 *         if delayed_applications:
 *           assert self.execution_context is not None
 *           for delayed_application in delayed_applications:             # <<<<<<<<<<<<<<
 *             self.execution_context.delayed_applications.append(
 *                 (self, delayed_application))
 */
              if (likely(PyList_CheckExact(__pyx_v_delayed_applications)) || PyTuple_CheckExact(__pyx_v_delayed_applications)) {
                __pyx_t_4 = __pyx_v_delayed_applications; __Pyx_INCREF(__pyx_t_4); __pyx_t_15 = 0;
                __pyx_t_20 = NULL;
              } else {
                __pyx_t_15 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_delayed_applications); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1080, __pyx_L14_error)
                __Pyx_GOTREF(__pyx_t_4);
                __pyx_t_20 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1080, __pyx_L14_error)
              }
              for (;;) {
                if (likely(!__pyx_t_20)) {
                  if (likely(PyList_CheckExact(__pyx_t_4))) {
                    if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_4)) break;
                    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                    __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_15); __Pyx_INCREF(__pyx_t_2); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 1080, __pyx_L14_error)
                    #else
                    __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1080, __pyx_L14_error)
                    __Pyx_GOTREF(__pyx_t_2);
                    #endif
                  } else {
                    if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
                    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                    __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_15); __Pyx_INCREF(__pyx_t_2); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 1080, __pyx_L14_error)
                    #else
                    __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1080, __pyx_L14_error)
                    __Pyx_GOTREF(__pyx_t_2);
                    #endif
                  }
                } else {
                  __pyx_t_2 = __pyx_t_20(__pyx_t_4);
                  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, 1080, __pyx_L14_error)
                    }
                    break;
                  }
                  __Pyx_GOTREF(__pyx_t_2);
                }
                __Pyx_XDECREF_SET(__pyx_v_delayed_application, __pyx_t_2);
                __pyx_t_2 = 0;

                /* "apache_beam/runners/worker/operations.py":1081
 *           assert self.execution_context is not None
 *           for delayed_application in delayed_applications:
 *             self.execution_context.delayed_applications.append(             # <<<<<<<<<<<<<<
 *                 (self, delayed_application))
 *       finally:
 */
                __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.__pyx_base.execution_context, __pyx_n_s_delayed_applications); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1081, __pyx_L14_error)
                __Pyx_GOTREF(__pyx_t_2);

                /* "apache_beam/runners/worker/operations.py":1082
 *           for delayed_application in delayed_applications:
 *             self.execution_context.delayed_applications.append(
 *                 (self, delayed_application))             # <<<<<<<<<<<<<<
 *       finally:
 *         with self.lock:
 */
                __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1082, __pyx_L14_error)
                __Pyx_GOTREF(__pyx_t_1);
                __Pyx_INCREF(((PyObject *)__pyx_v_self));
                __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
                PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
                __Pyx_INCREF(__pyx_v_delayed_application);
                __Pyx_GIVEREF(__pyx_v_delayed_application);
                PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_delayed_application);

                /* "apache_beam/runners/worker/operations.py":1081
 *           assert self.execution_context is not None
 *           for delayed_application in delayed_applications:
 *             self.execution_context.delayed_applications.append(             # <<<<<<<<<<<<<<
 *                 (self, delayed_application))
 *       finally:
 */
                __pyx_t_21 = __Pyx_PyObject_Append(__pyx_t_2, __pyx_t_1); if (unlikely(__pyx_t_21 == ((int)-1))) __PYX_ERR(0, 1081, __pyx_L14_error)
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                /* "apache_beam/runners/worker/operations.py":1080
 *         if delayed_applications:
 *           assert self.execution_context is not None
 *           for delayed_application in delayed_applications:             # <<<<<<<<<<<<<<
 *             self.execution_context.delayed_applications.append(
 *                 (self, delayed_application))
 */
              }
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "apache_beam/runners/worker/operations.py":1078
 *         delayed_applications = self.dofn_runner.process_with_sized_restriction(
 *             o)
 *         if delayed_applications:             # <<<<<<<<<<<<<<
 *           assert self.execution_context is not None
 *           for delayed_application in delayed_applications:
 */
            }
          }

          /* "apache_beam/runners/worker/operations.py":1084
 *                 (self, delayed_application))
 *       finally:
 *         with self.lock:             # <<<<<<<<<<<<<<
 *           self.element_start_output_bytes = None
 * 
 */
          /*finally:*/ {
            /*normal exit:*/{
              /*with:*/ {
                __pyx_t_10 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->lock, __pyx_n_s_exit); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1084, __pyx_L7_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->lock, __pyx_n_s_enter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1084, __pyx_L35_error)
                __Pyx_GOTREF(__pyx_t_1);
                __pyx_t_2 = NULL;
                if (CYTHON_UNPACK_METHODS && likely(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_4 = (__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_4)) __PYX_ERR(0, 1084, __pyx_L35_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                /*try:*/ {
                  {
                    (void)__pyx_t_13; (void)__pyx_t_12; (void)__pyx_t_11; /* mark used */
                    /*try:*/ {

                      /* "apache_beam/runners/worker/operations.py":1085
 *       finally:
 *         with self.lock:
 *           self.element_start_output_bytes = None             # <<<<<<<<<<<<<<
 * 
 *   def try_split(self, fraction_of_remainder):
 */
                      __Pyx_INCREF(Py_None);
                      __Pyx_GIVEREF(Py_None);
                      __Pyx_GOTREF(__pyx_v_self->element_start_output_bytes);
                      __Pyx_DECREF(__pyx_v_self->element_start_output_bytes);
                      __pyx_v_self->element_start_output_bytes = Py_None;

                      /* "apache_beam/runners/worker/operations.py":1084
 *                 (self, delayed_application))
 *       finally:
 *         with self.lock:             # <<<<<<<<<<<<<<
 *           self.element_start_output_bytes = None
 * 
 */
                    }
                  }
                }
                /*finally:*/ {
                  /*normal exit:*/{
                    if (__pyx_t_10) {
                      __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_tuple__29, NULL);
                      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                      if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1084, __pyx_L7_error)
                      __Pyx_GOTREF(__pyx_t_11);
                      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
                    }
                    goto __pyx_L38;
                  }
                  __pyx_L38:;
                }
                goto __pyx_L45;
                __pyx_L35_error:;
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                goto __pyx_L7_error;
                __pyx_L45:;
              }
              goto __pyx_L15;
            }
            __pyx_L14_error:;
            /*exception exit:*/{
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_18 = 0; __pyx_t_23 = 0;
              __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_18, &__pyx_t_23);
              if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
              __Pyx_XGOTREF(__pyx_t_10);
              __Pyx_XGOTREF(__pyx_t_11);
              __Pyx_XGOTREF(__pyx_t_12);
              __Pyx_XGOTREF(__pyx_t_13);
              __Pyx_XGOTREF(__pyx_t_18);
              __Pyx_XGOTREF(__pyx_t_23);
              __pyx_t_16 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_22 = __pyx_filename;
              {
                /*with:*/ {
                  __pyx_t_24 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->lock, __pyx_n_s_exit); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1084, __pyx_L47_error)
                  __Pyx_GOTREF(__pyx_t_24);
                  __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->lock, __pyx_n_s_enter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1084, __pyx_L48_error)
                  __Pyx_GOTREF(__pyx_t_1);
                  __pyx_t_2 = NULL;
                  if (CYTHON_UNPACK_METHODS && likely(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_4 = (__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_4)) __PYX_ERR(0, 1084, __pyx_L48_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                  /*try:*/ {
                    {
                      (void)__pyx_t_25; (void)__pyx_t_26; (void)__pyx_t_27; /* mark used */
                      /*try:*/ {

                        /* "apache_beam/runners/worker/operations.py":1085
 *       finally:
 *         with self.lock:
 *           self.element_start_output_bytes = None             # <<<<<<<<<<<<<<
 * 
 *   def try_split(self, fraction_of_remainder):
 */
                        __Pyx_INCREF(Py_None);
                        __Pyx_GIVEREF(Py_None);
                        __Pyx_GOTREF(__pyx_v_self->element_start_output_bytes);
                        __Pyx_DECREF(__pyx_v_self->element_start_output_bytes);
                        __pyx_v_self->element_start_output_bytes = Py_None;

                        /* "apache_beam/runners/worker/operations.py":1084
 *                 (self, delayed_application))
 *       finally:
 *         with self.lock:             # <<<<<<<<<<<<<<
 *           self.element_start_output_bytes = None
 * 
 */
                      }
                    }
                  }
                  /*finally:*/ {
                    /*normal exit:*/{
                      if (__pyx_t_24) {
                        __pyx_t_27 = __Pyx_PyObject_Call(__pyx_t_24, __pyx_tuple__29, NULL);
                        __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
                        if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1084, __pyx_L47_error)
                        __Pyx_GOTREF(__pyx_t_27);
                        __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
                      }
                      goto __pyx_L51;
                    }
                    __pyx_L51:;
                  }
                  goto __pyx_L58;
                  __pyx_L48_error:;
                  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
                  goto __pyx_L47_error;
                  __pyx_L58:;
                }
              }
              if (PY_MAJOR_VERSION >= 3) {
                __Pyx_XGIVEREF(__pyx_t_13);
                __Pyx_XGIVEREF(__pyx_t_18);
                __Pyx_XGIVEREF(__pyx_t_23);
                __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_18, __pyx_t_23);
              }
              __Pyx_XGIVEREF(__pyx_t_10);
              __Pyx_XGIVEREF(__pyx_t_11);
              __Pyx_XGIVEREF(__pyx_t_12);
              __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
              __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_18 = 0; __pyx_t_23 = 0;
              __pyx_lineno = __pyx_t_16; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_22;
              goto __pyx_L7_error;
              __pyx_L47_error:;
              if (PY_MAJOR_VERSION >= 3) {
                __Pyx_XGIVEREF(__pyx_t_13);
                __Pyx_XGIVEREF(__pyx_t_18);
                __Pyx_XGIVEREF(__pyx_t_23);
                __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_18, __pyx_t_23);
              }
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_13 = 0; __pyx_t_18 = 0; __pyx_t_23 = 0;
              goto __pyx_L7_error;
            }
            __pyx_L15:;
          }

          /* "apache_beam/runners/worker/operations.py":1067
 *     # type: (WindowedValue) -> None
 *     assert self.tagged_receivers is not None
 *     with self.scoped_process_state:             # <<<<<<<<<<<<<<
 *       try:
 *         with self.lock:
 */
        }
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L12_try_end;
        __pyx_L7_error:;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        /*except:*/ {
          __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfProcessSizedElements.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_1, &__pyx_t_2) < 0) __PYX_ERR(0, 1067, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_3 = PyTuple_Pack(3, __pyx_t_4, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1067, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_23 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1067, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_23);
          __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_23);
          __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
          if (__pyx_t_19 < 0) __PYX_ERR(0, 1067, __pyx_L9_except_error)
          __pyx_t_5 = ((!(__pyx_t_19 != 0)) != 0);
          if (__pyx_t_5) {
            __Pyx_GIVEREF(__pyx_t_4);
            __Pyx_GIVEREF(__pyx_t_1);
            __Pyx_XGIVEREF(__pyx_t_2);
            __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_1, __pyx_t_2);
            __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_t_2 = 0; 
            __PYX_ERR(0, 1067, __pyx_L9_except_error)
          }
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          goto __pyx_L8_exception_handled;
        }
        __pyx_L9_except_error:;
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        goto __pyx_L1_error;
        __pyx_L8_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        __pyx_L12_try_end:;
      }
    }
    /*finally:*/ {
      /*normal exit:*/{
        if (__pyx_t_6) {
          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__29, NULL);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1067, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        }
        goto __pyx_L6;
      }
      __pyx_L6:;
    }
    goto __pyx_L62;
    __pyx_L3_error:;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L1_error;
    __pyx_L62:;
  }

  /* "apache_beam/runners/worker/operations.py":1064
 *     self.element_start_output_bytes = None  # type: Optional[int]
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     assert self.tagged_receivers is not None
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfProcessSizedElements.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_receiver);
  __Pyx_XDECREF(__pyx_v_delayed_applications);
  __Pyx_XDECREF(__pyx_v_delayed_application);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_3process(PyObject *__pyx_v_self, PyObject *__pyx_v_o); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_3process = {"process", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_3process, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_3process(PyObject *__pyx_v_self, PyObject *__pyx_v_o) {
  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_o), __pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, 1, "o", 0))) __PYX_ERR(0, 1064, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_2process(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *)__pyx_v_self), ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_v_o));

  /* 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_6worker_10operations_23SdfProcessSizedElements_2process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__91)
  __Pyx_RefNannySetupContext("process", 0);
  __Pyx_TraceCall("process (wrapper)", __pyx_f[0], 1064, 0, __PYX_ERR(0, 1064, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_process(__pyx_v_self, __pyx_v_o, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfProcessSizedElements.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":1087
 *           self.element_start_output_bytes = None
 * 
 *   def try_split(self, fraction_of_remainder):             # <<<<<<<<<<<<<<
 *     # type: (...) -> Optional[Tuple[Iterable[SdfSplitResultsPrimary], Iterable[SdfSplitResultsResidual]]]
 *     split = self.dofn_runner.try_split(fraction_of_remainder)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_5try_split(PyObject *__pyx_v_self, PyObject *__pyx_v_fraction_of_remainder); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_5try_split = {"try_split", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_5try_split, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_5try_split(PyObject *__pyx_v_self, PyObject *__pyx_v_fraction_of_remainder) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("try_split (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_4try_split(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *)__pyx_v_self), ((PyObject *)__pyx_v_fraction_of_remainder));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_4try_split(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_v_self, PyObject *__pyx_v_fraction_of_remainder) {
  PyObject *__pyx_v_split = NULL;
  PyObject *__pyx_v_primaries = NULL;
  PyObject *__pyx_v_residuals = NULL;
  PyObject *__pyx_8genexpr4__pyx_v_primary = NULL;
  PyObject *__pyx_8genexpr5__pyx_v_residual = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_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)(PyObject *);
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__92)
  __Pyx_RefNannySetupContext("try_split", 0);
  __Pyx_TraceCall("try_split", __pyx_f[0], 1087, 0, __PYX_ERR(0, 1087, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":1089
 *   def try_split(self, fraction_of_remainder):
 *     # type: (...) -> Optional[Tuple[Iterable[SdfSplitResultsPrimary], Iterable[SdfSplitResultsResidual]]]
 *     split = self.dofn_runner.try_split(fraction_of_remainder)             # <<<<<<<<<<<<<<
 *     if split:
 *       primaries, residuals = split
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.dofn_runner), __pyx_n_s_try_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1089, __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_fraction_of_remainder) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_fraction_of_remainder);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1089, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_split = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":1090
 *     # type: (...) -> Optional[Tuple[Iterable[SdfSplitResultsPrimary], Iterable[SdfSplitResultsResidual]]]
 *     split = self.dofn_runner.try_split(fraction_of_remainder)
 *     if split:             # <<<<<<<<<<<<<<
 *       primaries, residuals = split
 *       return [(self, primary) for primary in primaries
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_split); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1090, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "apache_beam/runners/worker/operations.py":1091
 *     split = self.dofn_runner.try_split(fraction_of_remainder)
 *     if split:
 *       primaries, residuals = split             # <<<<<<<<<<<<<<
 *       return [(self, primary) for primary in primaries
 *               ], [(self, residual) for residual in residuals]
 */
    if ((likely(PyTuple_CheckExact(__pyx_v_split))) || (PyList_CheckExact(__pyx_v_split))) {
      PyObject* sequence = __pyx_v_split;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 1091, __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_2 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      #else
      __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1091, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1091, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
    } else {
      Py_ssize_t index = -1;
      __pyx_t_3 = PyObject_GetIter(__pyx_v_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1091, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
      index = 0; __pyx_t_1 = __pyx_t_5(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_1);
      index = 1; __pyx_t_2 = __pyx_t_5(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_3), 2) < 0) __PYX_ERR(0, 1091, __pyx_L1_error)
      __pyx_t_5 = NULL;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L5_unpacking_done;
      __pyx_L4_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_5 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 1091, __pyx_L1_error)
      __pyx_L5_unpacking_done:;
    }
    __pyx_v_primaries = __pyx_t_1;
    __pyx_t_1 = 0;
    __pyx_v_residuals = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "apache_beam/runners/worker/operations.py":1092
 *     if split:
 *       primaries, residuals = split
 *       return [(self, primary) for primary in primaries             # <<<<<<<<<<<<<<
 *               ], [(self, residual) for residual in residuals]
 *     return None
 */
    __Pyx_XDECREF(__pyx_r);
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1092, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (likely(PyList_CheckExact(__pyx_v_primaries)) || PyTuple_CheckExact(__pyx_v_primaries)) {
        __pyx_t_1 = __pyx_v_primaries; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0;
        __pyx_t_7 = NULL;
      } else {
        __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_primaries); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1092, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1092, __pyx_L8_error)
      }
      for (;;) {
        if (likely(!__pyx_t_7)) {
          if (likely(PyList_CheckExact(__pyx_t_1))) {
            if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1092, __pyx_L8_error)
            #else
            __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1092, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            #endif
          } else {
            if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1092, __pyx_L8_error)
            #else
            __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1092, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            #endif
          }
        } else {
          __pyx_t_3 = __pyx_t_7(__pyx_t_1);
          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, 1092, __pyx_L8_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_XDECREF_SET(__pyx_8genexpr4__pyx_v_primary, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1092, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(((PyObject *)__pyx_v_self));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
        PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
        __Pyx_INCREF(__pyx_8genexpr4__pyx_v_primary);
        __Pyx_GIVEREF(__pyx_8genexpr4__pyx_v_primary);
        PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_8genexpr4__pyx_v_primary);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 1092, __pyx_L8_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_primary); __pyx_8genexpr4__pyx_v_primary = 0;
      goto __pyx_L11_exit_scope;
      __pyx_L8_error:;
      __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_primary); __pyx_8genexpr4__pyx_v_primary = 0;
      goto __pyx_L1_error;
      __pyx_L11_exit_scope:;
    } /* exit inner scope */
    { /* enter inner scope */

      /* "apache_beam/runners/worker/operations.py":1093
 *       primaries, residuals = split
 *       return [(self, primary) for primary in primaries
 *               ], [(self, residual) for residual in residuals]             # <<<<<<<<<<<<<<
 *     return None
 * 
 */
      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1093, __pyx_L14_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (likely(PyList_CheckExact(__pyx_v_residuals)) || PyTuple_CheckExact(__pyx_v_residuals)) {
        __pyx_t_3 = __pyx_v_residuals; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0;
        __pyx_t_7 = NULL;
      } else {
        __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_residuals); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1093, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1093, __pyx_L14_error)
      }
      for (;;) {
        if (likely(!__pyx_t_7)) {
          if (likely(PyList_CheckExact(__pyx_t_3))) {
            if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_8 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1093, __pyx_L14_error)
            #else
            __pyx_t_8 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1093, __pyx_L14_error)
            __Pyx_GOTREF(__pyx_t_8);
            #endif
          } else {
            if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1093, __pyx_L14_error)
            #else
            __pyx_t_8 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1093, __pyx_L14_error)
            __Pyx_GOTREF(__pyx_t_8);
            #endif
          }
        } else {
          __pyx_t_8 = __pyx_t_7(__pyx_t_3);
          if (unlikely(!__pyx_t_8)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 1093, __pyx_L14_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_8);
        }
        __Pyx_XDECREF_SET(__pyx_8genexpr5__pyx_v_residual, __pyx_t_8);
        __pyx_t_8 = 0;
        __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1093, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_INCREF(((PyObject *)__pyx_v_self));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
        PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v_self));
        __Pyx_INCREF(__pyx_8genexpr5__pyx_v_residual);
        __Pyx_GIVEREF(__pyx_8genexpr5__pyx_v_residual);
        PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_8genexpr5__pyx_v_residual);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 1093, __pyx_L14_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_residual); __pyx_8genexpr5__pyx_v_residual = 0;
      goto __pyx_L17_exit_scope;
      __pyx_L14_error:;
      __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_residual); __pyx_8genexpr5__pyx_v_residual = 0;
      goto __pyx_L1_error;
      __pyx_L17_exit_scope:;
    } /* exit inner scope */

    /* "apache_beam/runners/worker/operations.py":1092
 *     if split:
 *       primaries, residuals = split
 *       return [(self, primary) for primary in primaries             # <<<<<<<<<<<<<<
 *               ], [(self, residual) for residual in residuals]
 *     return None
 */
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1092, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
    __pyx_t_2 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "apache_beam/runners/worker/operations.py":1090
 *     # type: (...) -> Optional[Tuple[Iterable[SdfSplitResultsPrimary], Iterable[SdfSplitResultsResidual]]]
 *     split = self.dofn_runner.try_split(fraction_of_remainder)
 *     if split:             # <<<<<<<<<<<<<<
 *       primaries, residuals = split
 *       return [(self, primary) for primary in primaries
 */
  }

  /* "apache_beam/runners/worker/operations.py":1094
 *       return [(self, primary) for primary in primaries
 *               ], [(self, residual) for residual in residuals]
 *     return None             # <<<<<<<<<<<<<<
 * 
 *   def current_element_progress(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "apache_beam/runners/worker/operations.py":1087
 *           self.element_start_output_bytes = None
 * 
 *   def try_split(self, fraction_of_remainder):             # <<<<<<<<<<<<<<
 *     # type: (...) -> Optional[Tuple[Iterable[SdfSplitResultsPrimary], Iterable[SdfSplitResultsResidual]]]
 *     split = self.dofn_runner.try_split(fraction_of_remainder)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfProcessSizedElements.try_split", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_split);
  __Pyx_XDECREF(__pyx_v_primaries);
  __Pyx_XDECREF(__pyx_v_residuals);
  __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_primary);
  __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_residual);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":1096
 *     return None
 * 
 *   def current_element_progress(self):             # <<<<<<<<<<<<<<
 *     # type: () -> Optional[iobase.RestrictionProgress]
 *     with self.lock:
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_7current_element_progress(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_7current_element_progress = {"current_element_progress", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_7current_element_progress, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_7current_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_6worker_10operations_23SdfProcessSizedElements_6current_element_progress(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_6current_element_progress(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_v_self) {
  PyObject *__pyx_v_progress = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_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;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__93)
  __Pyx_RefNannySetupContext("current_element_progress", 0);
  __Pyx_TraceCall("current_element_progress", __pyx_f[0], 1096, 0, __PYX_ERR(0, 1096, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":1098
 *   def current_element_progress(self):
 *     # type: () -> Optional[iobase.RestrictionProgress]
 *     with self.lock:             # <<<<<<<<<<<<<<
 *       if self.element_start_output_bytes is not None:
 *         progress = self.dofn_runner.current_element_progress()
 */
  /*with:*/ {
    __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->lock, __pyx_n_s_exit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1098, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->lock, __pyx_n_s_enter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1098, __pyx_L3_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_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, 1098, __pyx_L3_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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/worker/operations.py":1099
 *     # type: () -> Optional[iobase.RestrictionProgress]
 *     with self.lock:
 *       if self.element_start_output_bytes is not None:             # <<<<<<<<<<<<<<
 *         progress = self.dofn_runner.current_element_progress()
 *         if progress is not None:
 */
          __pyx_t_8 = (__pyx_v_self->element_start_output_bytes != Py_None);
          __pyx_t_9 = (__pyx_t_8 != 0);
          if (__pyx_t_9) {

            /* "apache_beam/runners/worker/operations.py":1100
 *     with self.lock:
 *       if self.element_start_output_bytes is not None:
 *         progress = self.dofn_runner.current_element_progress()             # <<<<<<<<<<<<<<
 *         if progress is not None:
 *           assert self.tagged_receivers is not None
 */
            __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.dofn_runner), __pyx_n_s_current_element_progress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1100, __pyx_L7_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_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, 1100, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_v_progress = __pyx_t_2;
            __pyx_t_2 = 0;

            /* "apache_beam/runners/worker/operations.py":1101
 *       if self.element_start_output_bytes is not None:
 *         progress = self.dofn_runner.current_element_progress()
 *         if progress is not None:             # <<<<<<<<<<<<<<
 *           assert self.tagged_receivers is not None
 *           return progress.with_completed(
 */
            __pyx_t_9 = (__pyx_v_progress != Py_None);
            __pyx_t_8 = (__pyx_t_9 != 0);
            if (__pyx_t_8) {

              /* "apache_beam/runners/worker/operations.py":1102
 *         progress = self.dofn_runner.current_element_progress()
 *         if progress is not None:
 *           assert self.tagged_receivers is not None             # <<<<<<<<<<<<<<
 *           return progress.with_completed(
 *               self.tagged_receivers.total_output_bytes() -
 */
              #ifndef CYTHON_WITHOUT_ASSERTIONS
              if (unlikely(__pyx_assertions_enabled())) {
                __pyx_t_8 = (__pyx_v_self->__pyx_base.tagged_receivers != Py_None);
                if (unlikely(!(__pyx_t_8 != 0))) {
                  PyErr_SetNone(PyExc_AssertionError);
                  __PYX_ERR(0, 1102, __pyx_L7_error)
                }
              }
              #endif

              /* "apache_beam/runners/worker/operations.py":1103
 *         if progress is not None:
 *           assert self.tagged_receivers is not None
 *           return progress.with_completed(             # <<<<<<<<<<<<<<
 *               self.tagged_receivers.total_output_bytes() -
 *               self.element_start_output_bytes)
 */
              __Pyx_XDECREF(__pyx_r);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_progress, __pyx_n_s_with_completed); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1103, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_3);

              /* "apache_beam/runners/worker/operations.py":1104
 *           assert self.tagged_receivers is not None
 *           return progress.with_completed(
 *               self.tagged_receivers.total_output_bytes() -             # <<<<<<<<<<<<<<
 *               self.element_start_output_bytes)
 *       return None
 */
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.tagged_receivers, __pyx_n_s_total_output_bytes); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1104, __pyx_L7_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_4 = (__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_4)) __PYX_ERR(0, 1104, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_4);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

              /* "apache_beam/runners/worker/operations.py":1105
 *           return progress.with_completed(
 *               self.tagged_receivers.total_output_bytes() -
 *               self.element_start_output_bytes)             # <<<<<<<<<<<<<<
 *       return None
 * 
 */
              __pyx_t_10 = PyNumber_Subtract(__pyx_t_4, __pyx_v_self->element_start_output_bytes); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1104, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __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_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_10);
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1103, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_r = __pyx_t_2;
              __pyx_t_2 = 0;
              goto __pyx_L11_try_return;

              /* "apache_beam/runners/worker/operations.py":1101
 *       if self.element_start_output_bytes is not None:
 *         progress = self.dofn_runner.current_element_progress()
 *         if progress is not None:             # <<<<<<<<<<<<<<
 *           assert self.tagged_receivers is not None
 *           return progress.with_completed(
 */
            }

            /* "apache_beam/runners/worker/operations.py":1099
 *     # type: () -> Optional[iobase.RestrictionProgress]
 *     with self.lock:
 *       if self.element_start_output_bytes is not None:             # <<<<<<<<<<<<<<
 *         progress = self.dofn_runner.current_element_progress()
 *         if progress is not None:
 */
          }

          /* "apache_beam/runners/worker/operations.py":1106
 *               self.tagged_receivers.total_output_bytes() -
 *               self.element_start_output_bytes)
 *       return None             # <<<<<<<<<<<<<<
 * 
 *   def monitoring_infos(self, transform_id, tag_to_pcollection_id):
 */
          __Pyx_XDECREF(__pyx_r);
          __pyx_r = Py_None; __Pyx_INCREF(Py_None);
          goto __pyx_L11_try_return;

          /* "apache_beam/runners/worker/operations.py":1098
 *   def current_element_progress(self):
 *     # type: () -> Optional[iobase.RestrictionProgress]
 *     with self.lock:             # <<<<<<<<<<<<<<
 *       if self.element_start_output_bytes is not None:
 *         progress = self.dofn_runner.current_element_progress()
 */
        }
        __pyx_L7_error:;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        /*except:*/ {
          __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfProcessSizedElements.current_element_progress", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_10) < 0) __PYX_ERR(0, 1098, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_4 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_3, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1098, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1098, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (__pyx_t_8 < 0) __PYX_ERR(0, 1098, __pyx_L9_except_error)
          __pyx_t_9 = ((!(__pyx_t_8 != 0)) != 0);
          if (__pyx_t_9) {
            __Pyx_GIVEREF(__pyx_t_2);
            __Pyx_GIVEREF(__pyx_t_3);
            __Pyx_XGIVEREF(__pyx_t_10);
            __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_3, __pyx_t_10);
            __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_10 = 0; 
            __PYX_ERR(0, 1098, __pyx_L9_except_error)
          }
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          goto __pyx_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);
      }
    }
    /*finally:*/ {
      /*normal exit:*/{
        if (__pyx_t_1) {
          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__29, NULL);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1098, __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_1) {
          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__29, NULL);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1098, __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_L18;
    __pyx_L3_error:;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L1_error;
    __pyx_L18:;
  }

  /* "apache_beam/runners/worker/operations.py":1096
 *     return None
 * 
 *   def current_element_progress(self):             # <<<<<<<<<<<<<<
 *     # type: () -> Optional[iobase.RestrictionProgress]
 *     with self.lock:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfProcessSizedElements.current_element_progress", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_progress);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":1108
 *       return None
 * 
 *   def monitoring_infos(self, transform_id, tag_to_pcollection_id):             # <<<<<<<<<<<<<<
 *     # type: (str, Dict[str, str]) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo]
 * 
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_9monitoring_infos(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_v_self, PyObject *__pyx_v_transform_id, PyObject *__pyx_v_tag_to_pcollection_id, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_progress_coder = NULL;
  PyObject *__pyx_v_infos = NULL;
  PyObject *__pyx_v_current_element_progress = NULL;
  PyObject *__pyx_v_completed = NULL;
  PyObject *__pyx_v_remaining = NULL;
  PyObject *__pyx_v_completed_mi = NULL;
  PyObject *__pyx_v_remaining_mi = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_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;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__94)
  __Pyx_RefNannySetupContext("monitoring_infos", 0);
  __Pyx_TraceCall("monitoring_infos", __pyx_f[0], 1108, 0, __PYX_ERR(0, 1108, __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_monitoring_infos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1108, __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_6worker_10operations_23SdfProcessSizedElements_9monitoring_infos)) {
        __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_transform_id, __pyx_v_tag_to_pcollection_id};
          __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, 1108, __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_transform_id, __pyx_v_tag_to_pcollection_id};
          __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, 1108, __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, 1108, __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_transform_id);
          __Pyx_GIVEREF(__pyx_v_transform_id);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_transform_id);
          __Pyx_INCREF(__pyx_v_tag_to_pcollection_id);
          __Pyx_GIVEREF(__pyx_v_tag_to_pcollection_id);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_tag_to_pcollection_id);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1108, __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/worker/operations.py":1111
 *     # type: (str, Dict[str, str]) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo]
 * 
 *     progress_coder = coders.IterableCoder(coders.FloatCoder())             # <<<<<<<<<<<<<<
 * 
 *     with self.lock:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_coders); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_IterableCoder); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_coders); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_FloatCoder); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(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_2 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1111, __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_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, 1111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_progress_coder = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":1113
 *     progress_coder = coders.IterableCoder(coders.FloatCoder())
 * 
 *     with self.lock:             # <<<<<<<<<<<<<<
 *       infos = super(SdfProcessSizedElements,
 *                     self).monitoring_infos(transform_id, tag_to_pcollection_id)
 */
  /*with:*/ {
    __pyx_t_7 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->lock, __pyx_n_s_exit); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->lock, __pyx_n_s_enter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1113, __pyx_L3_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_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1113, __pyx_L3_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    /*try:*/ {
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_9);
        __Pyx_XGOTREF(__pyx_t_10);
        /*try:*/ {

          /* "apache_beam/runners/worker/operations.py":1114
 * 
 *     with self.lock:
 *       infos = super(SdfProcessSizedElements,             # <<<<<<<<<<<<<<
 *                     self).monitoring_infos(transform_id, tag_to_pcollection_id)
 *       current_element_progress = self.current_element_progress()
 */
          __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1114, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_INCREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements));
          __Pyx_GIVEREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements));
          PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements));
          __Pyx_INCREF(((PyObject *)__pyx_v_self));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
          PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self));
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1114, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "apache_beam/runners/worker/operations.py":1115
 *     with self.lock:
 *       infos = super(SdfProcessSizedElements,
 *                     self).monitoring_infos(transform_id, tag_to_pcollection_id)             # <<<<<<<<<<<<<<
 *       current_element_progress = self.current_element_progress()
 *       if current_element_progress:
 */
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_monitoring_infos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1115, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = NULL;
          __pyx_t_5 = 0;
          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_5 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_3)) {
            PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_transform_id, __pyx_v_tag_to_pcollection_id};
            __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, 1115, __pyx_L7_error)
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_GOTREF(__pyx_t_1);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
            PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_transform_id, __pyx_v_tag_to_pcollection_id};
            __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, 1115, __pyx_L7_error)
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_GOTREF(__pyx_t_1);
          } else
          #endif
          {
            __pyx_t_4 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1115, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_4);
            if (__pyx_t_2) {
              __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
            }
            __Pyx_INCREF(__pyx_v_transform_id);
            __Pyx_GIVEREF(__pyx_v_transform_id);
            PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_5, __pyx_v_transform_id);
            __Pyx_INCREF(__pyx_v_tag_to_pcollection_id);
            __Pyx_GIVEREF(__pyx_v_tag_to_pcollection_id);
            PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_5, __pyx_v_tag_to_pcollection_id);
            __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1115, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          }
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_v_infos = __pyx_t_1;
          __pyx_t_1 = 0;

          /* "apache_beam/runners/worker/operations.py":1116
 *       infos = super(SdfProcessSizedElements,
 *                     self).monitoring_infos(transform_id, tag_to_pcollection_id)
 *       current_element_progress = self.current_element_progress()             # <<<<<<<<<<<<<<
 *       if current_element_progress:
 *         if current_element_progress.completed_work:
 */
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_current_element_progress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1116, __pyx_L7_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, 1116, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_v_current_element_progress = __pyx_t_1;
          __pyx_t_1 = 0;

          /* "apache_beam/runners/worker/operations.py":1117
 *                     self).monitoring_infos(transform_id, tag_to_pcollection_id)
 *       current_element_progress = self.current_element_progress()
 *       if current_element_progress:             # <<<<<<<<<<<<<<
 *         if current_element_progress.completed_work:
 *           completed = current_element_progress.completed_work
 */
          __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_current_element_progress); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1117, __pyx_L7_error)
          if (__pyx_t_11) {

            /* "apache_beam/runners/worker/operations.py":1118
 *       current_element_progress = self.current_element_progress()
 *       if current_element_progress:
 *         if current_element_progress.completed_work:             # <<<<<<<<<<<<<<
 *           completed = current_element_progress.completed_work
 *           remaining = current_element_progress.remaining_work
 */
            __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_current_element_progress, __pyx_n_s_completed_work); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1118, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1118, __pyx_L7_error)
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            if (__pyx_t_11) {

              /* "apache_beam/runners/worker/operations.py":1119
 *       if current_element_progress:
 *         if current_element_progress.completed_work:
 *           completed = current_element_progress.completed_work             # <<<<<<<<<<<<<<
 *           remaining = current_element_progress.remaining_work
 *         else:
 */
              __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_current_element_progress, __pyx_n_s_completed_work); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1119, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_v_completed = __pyx_t_1;
              __pyx_t_1 = 0;

              /* "apache_beam/runners/worker/operations.py":1120
 *         if current_element_progress.completed_work:
 *           completed = current_element_progress.completed_work
 *           remaining = current_element_progress.remaining_work             # <<<<<<<<<<<<<<
 *         else:
 *           completed = current_element_progress.fraction_completed
 */
              __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_current_element_progress, __pyx_n_s_remaining_work); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1120, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_v_remaining = __pyx_t_1;
              __pyx_t_1 = 0;

              /* "apache_beam/runners/worker/operations.py":1118
 *       current_element_progress = self.current_element_progress()
 *       if current_element_progress:
 *         if current_element_progress.completed_work:             # <<<<<<<<<<<<<<
 *           completed = current_element_progress.completed_work
 *           remaining = current_element_progress.remaining_work
 */
              goto __pyx_L14;
            }

            /* "apache_beam/runners/worker/operations.py":1122
 *           remaining = current_element_progress.remaining_work
 *         else:
 *           completed = current_element_progress.fraction_completed             # <<<<<<<<<<<<<<
 *           remaining = current_element_progress.fraction_remaining
 *         assert completed is not None
 */
            /*else*/ {
              __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_current_element_progress, __pyx_n_s_fraction_completed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1122, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_v_completed = __pyx_t_1;
              __pyx_t_1 = 0;

              /* "apache_beam/runners/worker/operations.py":1123
 *         else:
 *           completed = current_element_progress.fraction_completed
 *           remaining = current_element_progress.fraction_remaining             # <<<<<<<<<<<<<<
 *         assert completed is not None
 *         assert remaining is not None
 */
              __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_current_element_progress, __pyx_n_s_fraction_remaining); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1123, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_v_remaining = __pyx_t_1;
              __pyx_t_1 = 0;
            }
            __pyx_L14:;

            /* "apache_beam/runners/worker/operations.py":1124
 *           completed = current_element_progress.fraction_completed
 *           remaining = current_element_progress.fraction_remaining
 *         assert completed is not None             # <<<<<<<<<<<<<<
 *         assert remaining is not None
 *         completed_mi = metrics_pb2.MonitoringInfo(
 */
            #ifndef CYTHON_WITHOUT_ASSERTIONS
            if (unlikely(__pyx_assertions_enabled())) {
              __pyx_t_11 = (__pyx_v_completed != Py_None);
              if (unlikely(!(__pyx_t_11 != 0))) {
                PyErr_SetNone(PyExc_AssertionError);
                __PYX_ERR(0, 1124, __pyx_L7_error)
              }
            }
            #endif

            /* "apache_beam/runners/worker/operations.py":1125
 *           remaining = current_element_progress.fraction_remaining
 *         assert completed is not None
 *         assert remaining is not None             # <<<<<<<<<<<<<<
 *         completed_mi = metrics_pb2.MonitoringInfo(
 *             urn=monitoring_infos.WORK_COMPLETED_URN,
 */
            #ifndef CYTHON_WITHOUT_ASSERTIONS
            if (unlikely(__pyx_assertions_enabled())) {
              __pyx_t_11 = (__pyx_v_remaining != Py_None);
              if (unlikely(!(__pyx_t_11 != 0))) {
                PyErr_SetNone(PyExc_AssertionError);
                __PYX_ERR(0, 1125, __pyx_L7_error)
              }
            }
            #endif

            /* "apache_beam/runners/worker/operations.py":1126
 *         assert completed is not None
 *         assert remaining is not None
 *         completed_mi = metrics_pb2.MonitoringInfo(             # <<<<<<<<<<<<<<
 *             urn=monitoring_infos.WORK_COMPLETED_URN,
 *             type=monitoring_infos.PROGRESS_TYPE,
 */
            __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_metrics_pb2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1126, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_MonitoringInfo); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1126, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

            /* "apache_beam/runners/worker/operations.py":1127
 *         assert remaining is not None
 *         completed_mi = metrics_pb2.MonitoringInfo(
 *             urn=monitoring_infos.WORK_COMPLETED_URN,             # <<<<<<<<<<<<<<
 *             type=monitoring_infos.PROGRESS_TYPE,
 *             labels=monitoring_infos.create_labels(ptransform=transform_id),
 */
            __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1127, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_monitoring_infos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1127, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_WORK_COMPLETED_URN); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1127, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_urn, __pyx_t_2) < 0) __PYX_ERR(0, 1127, __pyx_L7_error)
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "apache_beam/runners/worker/operations.py":1128
 *         completed_mi = metrics_pb2.MonitoringInfo(
 *             urn=monitoring_infos.WORK_COMPLETED_URN,
 *             type=monitoring_infos.PROGRESS_TYPE,             # <<<<<<<<<<<<<<
 *             labels=monitoring_infos.create_labels(ptransform=transform_id),
 *             payload=progress_coder.encode([completed]))
 */
            __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_monitoring_infos); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1128, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_PROGRESS_TYPE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1128, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_type, __pyx_t_4) < 0) __PYX_ERR(0, 1127, __pyx_L7_error)
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "apache_beam/runners/worker/operations.py":1129
 *             urn=monitoring_infos.WORK_COMPLETED_URN,
 *             type=monitoring_infos.PROGRESS_TYPE,
 *             labels=monitoring_infos.create_labels(ptransform=transform_id),             # <<<<<<<<<<<<<<
 *             payload=progress_coder.encode([completed]))
 *         remaining_mi = metrics_pb2.MonitoringInfo(
 */
            __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_monitoring_infos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1129, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_create_labels); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1129, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1129, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_4);
            if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_ptransform, __pyx_v_transform_id) < 0) __PYX_ERR(0, 1129, __pyx_L7_error)
            __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1129, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_labels, __pyx_t_6) < 0) __PYX_ERR(0, 1127, __pyx_L7_error)
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

            /* "apache_beam/runners/worker/operations.py":1130
 *             type=monitoring_infos.PROGRESS_TYPE,
 *             labels=monitoring_infos.create_labels(ptransform=transform_id),
 *             payload=progress_coder.encode([completed]))             # <<<<<<<<<<<<<<
 *         remaining_mi = metrics_pb2.MonitoringInfo(
 *             urn=monitoring_infos.WORK_REMAINING_URN,
 */
            __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_progress_coder, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1130, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1130, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_INCREF(__pyx_v_completed);
            __Pyx_GIVEREF(__pyx_v_completed);
            PyList_SET_ITEM(__pyx_t_2, 0, __pyx_v_completed);
            __pyx_t_12 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
              __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_4);
              if (likely(__pyx_t_12)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
                __Pyx_INCREF(__pyx_t_12);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_4, function);
              }
            }
            __pyx_t_6 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_12, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2);
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1130, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_payload, __pyx_t_6) < 0) __PYX_ERR(0, 1127, __pyx_L7_error)
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

            /* "apache_beam/runners/worker/operations.py":1126
 *         assert completed is not None
 *         assert remaining is not None
 *         completed_mi = metrics_pb2.MonitoringInfo(             # <<<<<<<<<<<<<<
 *             urn=monitoring_infos.WORK_COMPLETED_URN,
 *             type=monitoring_infos.PROGRESS_TYPE,
 */
            __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1126, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __pyx_v_completed_mi = __pyx_t_6;
            __pyx_t_6 = 0;

            /* "apache_beam/runners/worker/operations.py":1131
 *             labels=monitoring_infos.create_labels(ptransform=transform_id),
 *             payload=progress_coder.encode([completed]))
 *         remaining_mi = metrics_pb2.MonitoringInfo(             # <<<<<<<<<<<<<<
 *             urn=monitoring_infos.WORK_REMAINING_URN,
 *             type=monitoring_infos.PROGRESS_TYPE,
 */
            __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_metrics_pb2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1131, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_MonitoringInfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1131, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

            /* "apache_beam/runners/worker/operations.py":1132
 *             payload=progress_coder.encode([completed]))
 *         remaining_mi = metrics_pb2.MonitoringInfo(
 *             urn=monitoring_infos.WORK_REMAINING_URN,             # <<<<<<<<<<<<<<
 *             type=monitoring_infos.PROGRESS_TYPE,
 *             labels=monitoring_infos.create_labels(ptransform=transform_id),
 */
            __pyx_t_6 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1132, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_monitoring_infos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1132, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_WORK_REMAINING_URN); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1132, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_urn, __pyx_t_4) < 0) __PYX_ERR(0, 1132, __pyx_L7_error)
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "apache_beam/runners/worker/operations.py":1133
 *         remaining_mi = metrics_pb2.MonitoringInfo(
 *             urn=monitoring_infos.WORK_REMAINING_URN,
 *             type=monitoring_infos.PROGRESS_TYPE,             # <<<<<<<<<<<<<<
 *             labels=monitoring_infos.create_labels(ptransform=transform_id),
 *             payload=progress_coder.encode([remaining]))
 */
            __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_monitoring_infos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1133, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_PROGRESS_TYPE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1133, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_type, __pyx_t_3) < 0) __PYX_ERR(0, 1132, __pyx_L7_error)
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

            /* "apache_beam/runners/worker/operations.py":1134
 *             urn=monitoring_infos.WORK_REMAINING_URN,
 *             type=monitoring_infos.PROGRESS_TYPE,
 *             labels=monitoring_infos.create_labels(ptransform=transform_id),             # <<<<<<<<<<<<<<
 *             payload=progress_coder.encode([remaining]))
 *         infos[monitoring_infos.to_key(completed_mi)] = completed_mi
 */
            __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_monitoring_infos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1134, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_create_labels); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1134, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1134, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_3);
            if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_ptransform, __pyx_v_transform_id) < 0) __PYX_ERR(0, 1134, __pyx_L7_error)
            __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1134, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_labels, __pyx_t_2) < 0) __PYX_ERR(0, 1132, __pyx_L7_error)
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "apache_beam/runners/worker/operations.py":1135
 *             type=monitoring_infos.PROGRESS_TYPE,
 *             labels=monitoring_infos.create_labels(ptransform=transform_id),
 *             payload=progress_coder.encode([remaining]))             # <<<<<<<<<<<<<<
 *         infos[monitoring_infos.to_key(completed_mi)] = completed_mi
 *         infos[monitoring_infos.to_key(remaining_mi)] = remaining_mi
 */
            __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_progress_coder, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1135, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1135, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_INCREF(__pyx_v_remaining);
            __Pyx_GIVEREF(__pyx_v_remaining);
            PyList_SET_ITEM(__pyx_t_4, 0, __pyx_v_remaining);
            __pyx_t_12 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
              __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3);
              if (likely(__pyx_t_12)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                __Pyx_INCREF(__pyx_t_12);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_3, function);
              }
            }
            __pyx_t_2 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_12, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1135, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_payload, __pyx_t_2) < 0) __PYX_ERR(0, 1132, __pyx_L7_error)
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "apache_beam/runners/worker/operations.py":1131
 *             labels=monitoring_infos.create_labels(ptransform=transform_id),
 *             payload=progress_coder.encode([completed]))
 *         remaining_mi = metrics_pb2.MonitoringInfo(             # <<<<<<<<<<<<<<
 *             urn=monitoring_infos.WORK_REMAINING_URN,
 *             type=monitoring_infos.PROGRESS_TYPE,
 */
            __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1131, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __pyx_v_remaining_mi = __pyx_t_2;
            __pyx_t_2 = 0;

            /* "apache_beam/runners/worker/operations.py":1136
 *             labels=monitoring_infos.create_labels(ptransform=transform_id),
 *             payload=progress_coder.encode([remaining]))
 *         infos[monitoring_infos.to_key(completed_mi)] = completed_mi             # <<<<<<<<<<<<<<
 *         infos[monitoring_infos.to_key(remaining_mi)] = remaining_mi
 *     return infos
 */
            __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_monitoring_infos); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1136, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_to_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1136, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __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_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_v_completed_mi) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_completed_mi);
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1136, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            if (unlikely(PyObject_SetItem(__pyx_v_infos, __pyx_t_2, __pyx_v_completed_mi) < 0)) __PYX_ERR(0, 1136, __pyx_L7_error)
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "apache_beam/runners/worker/operations.py":1137
 *             payload=progress_coder.encode([remaining]))
 *         infos[monitoring_infos.to_key(completed_mi)] = completed_mi
 *         infos[monitoring_infos.to_key(remaining_mi)] = remaining_mi             # <<<<<<<<<<<<<<
 *     return infos
 * 
 */
            __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_monitoring_infos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1137, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_to_key); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1137, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __pyx_t_1 = NULL;
            if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
              __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
              if (likely(__pyx_t_1)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
                __Pyx_INCREF(__pyx_t_1);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_6, function);
              }
            }
            __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_v_remaining_mi) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_remaining_mi);
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1137, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (unlikely(PyObject_SetItem(__pyx_v_infos, __pyx_t_2, __pyx_v_remaining_mi) < 0)) __PYX_ERR(0, 1137, __pyx_L7_error)
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "apache_beam/runners/worker/operations.py":1117
 *                     self).monitoring_infos(transform_id, tag_to_pcollection_id)
 *       current_element_progress = self.current_element_progress()
 *       if current_element_progress:             # <<<<<<<<<<<<<<
 *         if current_element_progress.completed_work:
 *           completed = current_element_progress.completed_work
 */
          }

          /* "apache_beam/runners/worker/operations.py":1113
 *     progress_coder = coders.IterableCoder(coders.FloatCoder())
 * 
 *     with self.lock:             # <<<<<<<<<<<<<<
 *       infos = super(SdfProcessSizedElements,
 *                     self).monitoring_infos(transform_id, tag_to_pcollection_id)
 */
        }
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L12_try_end;
        __pyx_L7_error:;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        /*except:*/ {
          __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfProcessSizedElements.monitoring_infos", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_6, &__pyx_t_1) < 0) __PYX_ERR(0, 1113, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_3 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1113, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_3, NULL);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1113, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_13);
          __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_13);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          if (__pyx_t_11 < 0) __PYX_ERR(0, 1113, __pyx_L9_except_error)
          __pyx_t_14 = ((!(__pyx_t_11 != 0)) != 0);
          if (__pyx_t_14) {
            __Pyx_GIVEREF(__pyx_t_2);
            __Pyx_GIVEREF(__pyx_t_6);
            __Pyx_XGIVEREF(__pyx_t_1);
            __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_6, __pyx_t_1);
            __pyx_t_2 = 0; __pyx_t_6 = 0; __pyx_t_1 = 0; 
            __PYX_ERR(0, 1113, __pyx_L9_except_error)
          }
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          goto __pyx_L8_exception_handled;
        }
        __pyx_L9_except_error:;
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
        goto __pyx_L1_error;
        __pyx_L8_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
        __pyx_L12_try_end:;
      }
    }
    /*finally:*/ {
      /*normal exit:*/{
        if (__pyx_t_7) {
          __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__29, NULL);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1113, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        }
        goto __pyx_L6;
      }
      __pyx_L6:;
    }
    goto __pyx_L18;
    __pyx_L3_error:;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    goto __pyx_L1_error;
    __pyx_L18:;
  }

  /* "apache_beam/runners/worker/operations.py":1138
 *         infos[monitoring_infos.to_key(completed_mi)] = completed_mi
 *         infos[monitoring_infos.to_key(remaining_mi)] = remaining_mi
 *     return infos             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_v_infos)) { __Pyx_RaiseUnboundLocalError("infos"); __PYX_ERR(0, 1138, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_v_infos);
  __pyx_r = __pyx_v_infos;
  goto __pyx_L0;

  /* "apache_beam/runners/worker/operations.py":1108
 *       return None
 * 
 *   def monitoring_infos(self, transform_id, tag_to_pcollection_id):             # <<<<<<<<<<<<<<
 *     # type: (str, Dict[str, str]) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfProcessSizedElements.monitoring_infos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_progress_coder);
  __Pyx_XDECREF(__pyx_v_infos);
  __Pyx_XDECREF(__pyx_v_current_element_progress);
  __Pyx_XDECREF(__pyx_v_completed);
  __Pyx_XDECREF(__pyx_v_remaining);
  __Pyx_XDECREF(__pyx_v_completed_mi);
  __Pyx_XDECREF(__pyx_v_remaining_mi);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_9monitoring_infos(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_9monitoring_infos = {"monitoring_infos", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_9monitoring_infos, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_9monitoring_infos(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_transform_id = 0;
  PyObject *__pyx_v_tag_to_pcollection_id = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("monitoring_infos (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_transform_id,&__pyx_n_s_tag_to_pcollection_id,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_transform_id)) != 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_tag_to_pcollection_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("monitoring_infos", 1, 2, 2, 1); __PYX_ERR(0, 1108, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "monitoring_infos") < 0)) __PYX_ERR(0, 1108, __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_transform_id = values[0];
    __pyx_v_tag_to_pcollection_id = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("monitoring_infos", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1108, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfProcessSizedElements.monitoring_infos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_8monitoring_infos(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *)__pyx_v_self), __pyx_v_transform_id, __pyx_v_tag_to_pcollection_id);

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_8monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_v_self, PyObject *__pyx_v_transform_id, PyObject *__pyx_v_tag_to_pcollection_id) {
  PyObject *__pyx_r = NULL;
  __Pyx_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("monitoring_infos", 0);
  __Pyx_TraceCall("monitoring_infos (wrapper)", __pyx_f[0], 1108, 0, __PYX_ERR(0, 1108, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_monitoring_infos(__pyx_v_self, __pyx_v_transform_id, __pyx_v_tag_to_pcollection_id, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfProcessSizedElements.monitoring_infos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_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_6worker_10operations_23SdfProcessSizedElements_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_11__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_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_6worker_10operations_23SdfProcessSizedElements_10__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_10__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_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__95)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error));

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.dofn_runner, self.element_start_output_bytes, self.execution_context, self.fn, self.input_info, self.lock, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.side_input_maps, self.spec, self.state_sampler, self.step_name, self.tagged_receivers, self.timer_inputs, self.timer_specs, self.user_state_context)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.__pyx_base.debug_logging_enabled); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.__pyx_base.setup_done); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(26); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.consumers);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.consumers);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->__pyx_base.__pyx_base.consumers);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.counter_factory);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.counter_factory);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->__pyx_base.__pyx_base.counter_factory);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.data_sampler);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.data_sampler);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->__pyx_base.__pyx_base.data_sampler);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.dofn_runner));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.dofn_runner));
  PyTuple_SET_ITEM(__pyx_t_3, 4, ((PyObject *)__pyx_v_self->__pyx_base.dofn_runner));
  __Pyx_INCREF(__pyx_v_self->element_start_output_bytes);
  __Pyx_GIVEREF(__pyx_v_self->element_start_output_bytes);
  PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_self->element_start_output_bytes);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.execution_context);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.execution_context);
  PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_v_self->__pyx_base.__pyx_base.execution_context);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.fn);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.fn);
  PyTuple_SET_ITEM(__pyx_t_3, 7, __pyx_v_self->__pyx_base.fn);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.input_info);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.input_info);
  PyTuple_SET_ITEM(__pyx_t_3, 8, __pyx_v_self->__pyx_base.input_info);
  __Pyx_INCREF(__pyx_v_self->lock);
  __Pyx_GIVEREF(__pyx_v_self->lock);
  PyTuple_SET_ITEM(__pyx_t_3, 9, __pyx_v_self->lock);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.metrics_container);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.metrics_container);
  PyTuple_SET_ITEM(__pyx_t_3, 10, __pyx_v_self->__pyx_base.__pyx_base.metrics_container);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.name_context);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.name_context);
  PyTuple_SET_ITEM(__pyx_t_3, 11, __pyx_v_self->__pyx_base.__pyx_base.name_context);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.operation_name);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.operation_name);
  PyTuple_SET_ITEM(__pyx_t_3, 12, __pyx_v_self->__pyx_base.__pyx_base.operation_name);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.receivers);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.receivers);
  PyTuple_SET_ITEM(__pyx_t_3, 13, __pyx_v_self->__pyx_base.__pyx_base.receivers);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.scoped_finish_state);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.scoped_finish_state);
  PyTuple_SET_ITEM(__pyx_t_3, 14, __pyx_v_self->__pyx_base.__pyx_base.scoped_finish_state);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.scoped_process_state);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.scoped_process_state);
  PyTuple_SET_ITEM(__pyx_t_3, 15, __pyx_v_self->__pyx_base.__pyx_base.scoped_process_state);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.scoped_start_state);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.scoped_start_state);
  PyTuple_SET_ITEM(__pyx_t_3, 16, __pyx_v_self->__pyx_base.__pyx_base.scoped_start_state);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 17, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.side_input_maps);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.side_input_maps);
  PyTuple_SET_ITEM(__pyx_t_3, 18, __pyx_v_self->__pyx_base.side_input_maps);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.spec);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.spec);
  PyTuple_SET_ITEM(__pyx_t_3, 19, __pyx_v_self->__pyx_base.__pyx_base.spec);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.state_sampler);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.state_sampler);
  PyTuple_SET_ITEM(__pyx_t_3, 20, __pyx_v_self->__pyx_base.__pyx_base.state_sampler);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.step_name);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.step_name);
  PyTuple_SET_ITEM(__pyx_t_3, 21, __pyx_v_self->__pyx_base.__pyx_base.step_name);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.tagged_receivers);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.tagged_receivers);
  PyTuple_SET_ITEM(__pyx_t_3, 22, __pyx_v_self->__pyx_base.tagged_receivers);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.timer_inputs);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.timer_inputs);
  PyTuple_SET_ITEM(__pyx_t_3, 23, __pyx_v_self->__pyx_base.timer_inputs);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.timer_specs);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.timer_specs);
  PyTuple_SET_ITEM(__pyx_t_3, 24, __pyx_v_self->__pyx_base.timer_specs);
  __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_3, 25, __pyx_v_self->__pyx_base.user_state_context);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.dofn_runner, self.element_start_output_bytes, self.execution_context, self.fn, self.input_info, self.lock, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.side_input_maps, self.spec, self.state_sampler, self.step_name, self.tagged_receivers, self.timer_inputs, self.timer_specs, self.user_state_context)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v__dict = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":7
 *     state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.dofn_runner, self.element_start_output_bytes, self.execution_context, self.fn, self.input_info, self.lock, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.side_input_maps, self.spec, self.state_sampler, self.step_name, self.tagged_receivers, self.timer_inputs, self.timer_specs, self.user_state_context)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         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(2, 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(2, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.dofn_runner is not None or self.element_start_output_bytes is not None or self.execution_context is not None or self.fn is not None or self.input_info is not None or self.lock is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.side_input_maps is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.tagged_receivers is not None or self.timer_inputs is not None or self.timer_specs is not None or self.user_state_context is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.dofn_runner, self.element_start_output_bytes, self.execution_context, self.fn, self.input_info, self.lock, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.side_input_maps, self.spec, self.state_sampler, self.step_name, self.tagged_receivers, self.timer_inputs, self.timer_specs, self.user_state_context)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.dofn_runner is not None or self.element_start_output_bytes is not None or self.execution_context is not None or self.fn is not None or self.input_info is not None or self.lock is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.side_input_maps is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.tagged_receivers is not None or self.timer_inputs is not None or self.timer_specs is not None or self.user_state_context is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_SdfProcessSizedElements, (type(self), 0x8c483fa, None), state
 */
  /*else*/ {
    __pyx_t_4 = (__pyx_v_self->__pyx_base.__pyx_base.consumers != 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->__pyx_base.__pyx_base.counter_factory != 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->__pyx_base.__pyx_base.data_sampler != 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 = (((PyObject *)__pyx_v_self->__pyx_base.dofn_runner) != 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->element_start_output_bytes != 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->__pyx_base.__pyx_base.execution_context != 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->__pyx_base.fn != 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->__pyx_base.input_info != 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->lock != 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->__pyx_base.__pyx_base.metrics_container != 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->__pyx_base.__pyx_base.name_context != 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->__pyx_base.__pyx_base.operation_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->__pyx_base.__pyx_base.receivers != ((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->__pyx_base.__pyx_base.scoped_finish_state != 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->__pyx_base.__pyx_base.scoped_process_state != 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->__pyx_base.__pyx_base.scoped_start_state != 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->__pyx_base.side_input_maps != 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->__pyx_base.__pyx_base.spec != 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->__pyx_base.__pyx_base.state_sampler != 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->__pyx_base.__pyx_base.step_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->__pyx_base.tagged_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->__pyx_base.timer_inputs != ((PyObject*)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->__pyx_base.timer_specs != ((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->__pyx_base.user_state_context != 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.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.dofn_runner is not None or self.element_start_output_bytes is not None or self.execution_context is not None or self.fn is not None or self.input_info is not None or self.lock is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.side_input_maps is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.tagged_receivers is not None or self.timer_inputs is not None or self.timer_specs is not None or self.user_state_context is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_SdfProcessSizedElements, (type(self), 0x8c483fa, None), state
 *     else:
 */
  __pyx_t_5 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":13
 *         use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.dofn_runner is not None or self.element_start_output_bytes is not None or self.execution_context is not None or self.fn is not None or self.input_info is not None or self.lock is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.side_input_maps is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.tagged_receivers is not None or self.timer_inputs is not None or self.timer_specs is not None or self.user_state_context is not None
 *     if use_setstate:
 *         return __pyx_unpickle_SdfProcessSizedElements, (type(self), 0x8c483fa, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_SdfProcessSizedElements, (type(self), 0x8c483fa, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_SdfProcessSizedEl); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_147096570);
    __Pyx_GIVEREF(__pyx_int_147096570);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_147096570);
    __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(2, 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.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.dofn_runner is not None or self.element_start_output_bytes is not None or self.execution_context is not None or self.fn is not None or self.input_info is not None or self.lock is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.side_input_maps is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.tagged_receivers is not None or self.timer_inputs is not None or self.timer_specs is not None or self.user_state_context is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_SdfProcessSizedElements, (type(self), 0x8c483fa, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_SdfProcessSizedElements, (type(self), 0x8c483fa, None), state
 *     else:
 *         return __pyx_unpickle_SdfProcessSizedElements, (type(self), 0x8c483fa, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_SdfProcessSizedElements__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_SdfProcessSizedEl); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_147096570);
    __Pyx_GIVEREF(__pyx_int_147096570);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_147096570);
    __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(2, 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.worker.operations.SdfProcessSizedElements.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_SdfProcessSizedElements, (type(self), 0x8c483fa, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_SdfProcessSizedElements__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_13__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_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_6worker_10operations_23SdfProcessSizedElements_12__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_12__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__96)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[2], 16, 0, __PYX_ERR(2, 16, __pyx_L1_error));

  /* "(tree fragment)":17
 *         return __pyx_unpickle_SdfProcessSizedElements, (type(self), 0x8c483fa, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_SdfProcessSizedElements__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(2, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_SdfProcessSizedElements__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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_SdfProcessSizedElements, (type(self), 0x8c483fa, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_SdfProcessSizedElements__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfProcessSizedElements.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":1143
 * class CombineOperation(Operation):
 *   """A Combine operation executing a CombineFn for each input element."""
 *   def __init__(self, name_context, spec, counter_factory, state_sampler):             # <<<<<<<<<<<<<<
 *     super(CombineOperation,
 *           self).__init__(name_context, spec, counter_factory, state_sampler)
 */

/* Python wrapper */
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name_context = 0;
  PyObject *__pyx_v_spec = 0;
  PyObject *__pyx_v_counter_factory = 0;
  PyObject *__pyx_v_state_sampler = 0;
  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_name_context,&__pyx_n_s_spec,&__pyx_n_s_counter_factory,&__pyx_n_s_state_sampler,0};
    PyObject* values[4] = {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  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_name_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_spec)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 1); __PYX_ERR(0, 1143, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_counter_factory)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 2); __PYX_ERR(0, 1143, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_state_sampler)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 3); __PYX_ERR(0, 1143, __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, 1143, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      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);
    }
    __pyx_v_name_context = values[0];
    __pyx_v_spec = values[1];
    __pyx_v_counter_factory = values[2];
    __pyx_v_state_sampler = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1143, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.CombineOperation.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_16CombineOperation___init__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *)__pyx_v_self), __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler);

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_16CombineOperation___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self, PyObject *__pyx_v_name_context, PyObject *__pyx_v_spec, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_state_sampler) {
  PyObject *__pyx_v_fn = NULL;
  PyObject *__pyx_v_args = NULL;
  PyObject *__pyx_v_kwargs = NULL;
  int __pyx_r;
  __Pyx_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)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 1143, 0, __PYX_ERR(0, 1143, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":1144
 *   """A Combine operation executing a CombineFn for each input element."""
 *   def __init__(self, name_context, spec, counter_factory, state_sampler):
 *     super(CombineOperation,             # <<<<<<<<<<<<<<
 *           self).__init__(name_context, spec, counter_factory, state_sampler)
 *     # Combiners do not accept deferred side-inputs (the ignored fourth argument)
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation));
  __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, 1144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":1145
 *   def __init__(self, name_context, spec, counter_factory, state_sampler):
 *     super(CombineOperation,
 *           self).__init__(name_context, spec, counter_factory, state_sampler)             # <<<<<<<<<<<<<<
 *     # Combiners do not accept deferred side-inputs (the ignored fourth argument)
 *     # and therefore the code to handle the extra args/kwargs is simpler than for
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1145, __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[5] = {__pyx_t_3, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 4+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1145, __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[5] = {__pyx_t_3, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 4+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1145, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(4+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1145, __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_name_context);
    __Pyx_GIVEREF(__pyx_v_name_context);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_name_context);
    __Pyx_INCREF(__pyx_v_spec);
    __Pyx_GIVEREF(__pyx_v_spec);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_spec);
    __Pyx_INCREF(__pyx_v_counter_factory);
    __Pyx_GIVEREF(__pyx_v_counter_factory);
    PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_counter_factory);
    __Pyx_INCREF(__pyx_v_state_sampler);
    __Pyx_GIVEREF(__pyx_v_state_sampler);
    PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_4, __pyx_v_state_sampler);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1145, __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/worker/operations.py":1149
 *     # and therefore the code to handle the extra args/kwargs is simpler than for
 *     # the DoFn's of ParDo.
 *     fn, args, kwargs = pickler.loads(self.spec.serialized_fn)[:3]             # <<<<<<<<<<<<<<
 *     self.phased_combine_fn = (
 *         PhasedCombineFnExecutor(self.spec.phase, fn, args, kwargs))
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pickler); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_loads); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.spec, __pyx_n_s_serialized_fn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  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_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 3, NULL, NULL, &__pyx_slice__97, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1149, __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 != 3)) {
      if (size > 3) __Pyx_RaiseTooManyValuesError(3);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 1149, __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_2 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 2); 
    } else {
      __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 2); 
    }
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #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, 1149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext;
    index = 0; __pyx_t_1 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    index = 1; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 2; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 3) < 0) __PYX_ERR(0, 1149, __pyx_L1_error)
    __pyx_t_7 = NULL;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 1149, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_fn = __pyx_t_1;
  __pyx_t_1 = 0;
  __pyx_v_args = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_kwargs = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "apache_beam/runners/worker/operations.py":1151
 *     fn, args, kwargs = pickler.loads(self.spec.serialized_fn)[:3]
 *     self.phased_combine_fn = (
 *         PhasedCombineFnExecutor(self.spec.phase, fn, args, kwargs))             # <<<<<<<<<<<<<<
 * 
 *   def setup(self, data_sampler=None):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PhasedCombineFnExecutor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.spec, __pyx_n_s_phase); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = NULL;
  __pyx_t_4 = 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_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[5] = {__pyx_t_1, __pyx_t_2, __pyx_v_fn, __pyx_v_args, __pyx_v_kwargs};
    __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 4+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1151, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_t_5);
    __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[5] = {__pyx_t_1, __pyx_t_2, __pyx_v_fn, __pyx_v_args, __pyx_v_kwargs};
    __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 4+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1151, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(4+__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_1) {
      __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __pyx_t_1 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_4, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_fn);
    __Pyx_GIVEREF(__pyx_v_fn);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_4, __pyx_v_fn);
    __Pyx_INCREF(__pyx_v_args);
    __Pyx_GIVEREF(__pyx_v_args);
    PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_4, __pyx_v_args);
    __Pyx_INCREF(__pyx_v_kwargs);
    __Pyx_GIVEREF(__pyx_v_kwargs);
    PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_4, __pyx_v_kwargs);
    __pyx_t_2 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "apache_beam/runners/worker/operations.py":1150
 *     # the DoFn's of ParDo.
 *     fn, args, kwargs = pickler.loads(self.spec.serialized_fn)[:3]
 *     self.phased_combine_fn = (             # <<<<<<<<<<<<<<
 *         PhasedCombineFnExecutor(self.spec.phase, fn, args, kwargs))
 * 
 */
  __Pyx_GIVEREF(__pyx_t_5);
  __Pyx_GOTREF(__pyx_v_self->phased_combine_fn);
  __Pyx_DECREF(__pyx_v_self->phased_combine_fn);
  __pyx_v_self->phased_combine_fn = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "apache_beam/runners/worker/operations.py":1143
 * class CombineOperation(Operation):
 *   """A Combine operation executing a CombineFn for each input element."""
 *   def __init__(self, name_context, spec, counter_factory, state_sampler):             # <<<<<<<<<<<<<<
 *     super(CombineOperation,
 *           self).__init__(name_context, spec, counter_factory, state_sampler)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.CombineOperation.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fn);
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":1153
 *         PhasedCombineFnExecutor(self.spec.phase, fn, args, kwargs))
 * 
 *   def setup(self, data_sampler=None):             # <<<<<<<<<<<<<<
 *     # type: (Optional[DataSampler]) -> None
 *     with self.scoped_start_state:
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_3setup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_16CombineOperation_3setup = {"setup", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_3setup, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_3setup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data_sampler = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setup (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data_sampler,0};
    PyObject* values[1] = {0};
    values[0] = ((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  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_data_sampler);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setup") < 0)) __PYX_ERR(0, 1153, __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_data_sampler = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setup", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1153, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.CombineOperation.setup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_16CombineOperation_2setup(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *)__pyx_v_self), __pyx_v_data_sampler);

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16CombineOperation_2setup(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self, PyObject *__pyx_v_data_sampler) {
  PyObject *__pyx_r = NULL;
  __Pyx_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;
  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__98)
  __Pyx_RefNannySetupContext("setup", 0);
  __Pyx_TraceCall("setup", __pyx_f[0], 1153, 0, __PYX_ERR(0, 1153, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":1155
 *   def setup(self, data_sampler=None):
 *     # type: (Optional[DataSampler]) -> None
 *     with self.scoped_start_state:             # <<<<<<<<<<<<<<
 *       _LOGGER.debug('Setup called for %s', self)
 *       super(CombineOperation, self).setup(data_sampler)
 */
  /*with:*/ {
    __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_start_state, __pyx_n_s_exit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1155, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_start_state, __pyx_n_s_enter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1155, __pyx_L3_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_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, 1155, __pyx_L3_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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/worker/operations.py":1156
 *     # type: (Optional[DataSampler]) -> None
 *     with self.scoped_start_state:
 *       _LOGGER.debug('Setup called for %s', self)             # <<<<<<<<<<<<<<
 *       super(CombineOperation, self).setup(data_sampler)
 *       self.phased_combine_fn.combine_fn.setup()
 */
          __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_LOGGER); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1156, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_debug); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1156, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = NULL;
          __pyx_t_8 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(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_8 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_4)) {
            PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_kp_u_Setup_called_for_s, ((PyObject *)__pyx_v_self)};
            __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1156, __pyx_L7_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[3] = {__pyx_t_3, __pyx_kp_u_Setup_called_for_s, ((PyObject *)__pyx_v_self)};
            __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1156, __pyx_L7_error)
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_GOTREF(__pyx_t_2);
          } else
          #endif
          {
            __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1156, __pyx_L7_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_INCREF(__pyx_kp_u_Setup_called_for_s);
            __Pyx_GIVEREF(__pyx_kp_u_Setup_called_for_s);
            PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_kp_u_Setup_called_for_s);
            __Pyx_INCREF(((PyObject *)__pyx_v_self));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
            PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, ((PyObject *)__pyx_v_self));
            __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1156, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          }
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "apache_beam/runners/worker/operations.py":1157
 *     with self.scoped_start_state:
 *       _LOGGER.debug('Setup called for %s', self)
 *       super(CombineOperation, self).setup(data_sampler)             # <<<<<<<<<<<<<<
 *       self.phased_combine_fn.combine_fn.setup()
 * 
 */
          __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1157, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_INCREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation));
          __Pyx_GIVEREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation));
          PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation));
          __Pyx_INCREF(((PyObject *)__pyx_v_self));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
          PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_self));
          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1157, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_setup); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1157, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __pyx_t_9 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
            __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
            if (likely(__pyx_t_9)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_9);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_4, function);
            }
          }
          __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_9, __pyx_v_data_sampler) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_data_sampler);
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1157, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "apache_beam/runners/worker/operations.py":1158
 *       _LOGGER.debug('Setup called for %s', self)
 *       super(CombineOperation, self).setup(data_sampler)
 *       self.phased_combine_fn.combine_fn.setup()             # <<<<<<<<<<<<<<
 * 
 *   def process(self, o):
 */
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->phased_combine_fn, __pyx_n_s_combine_fn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1158, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_setup); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1158, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
            __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9);
            if (likely(__pyx_t_4)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
              __Pyx_INCREF(__pyx_t_4);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_9, function);
            }
          }
          __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_9);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1158, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "apache_beam/runners/worker/operations.py":1155
 *   def setup(self, data_sampler=None):
 *     # type: (Optional[DataSampler]) -> None
 *     with self.scoped_start_state:             # <<<<<<<<<<<<<<
 *       _LOGGER.debug('Setup called for %s', self)
 *       super(CombineOperation, self).setup(data_sampler)
 */
        }
        __Pyx_XDECREF(__pyx_t_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_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        /*except:*/ {
          __Pyx_AddTraceback("apache_beam.runners.worker.operations.CombineOperation.setup", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_9, &__pyx_t_4) < 0) __PYX_ERR(0, 1155, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_3 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_9, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1155, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1155, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (__pyx_t_11 < 0) __PYX_ERR(0, 1155, __pyx_L9_except_error)
          __pyx_t_12 = ((!(__pyx_t_11 != 0)) != 0);
          if (__pyx_t_12) {
            __Pyx_GIVEREF(__pyx_t_2);
            __Pyx_GIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_4);
            __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_9, __pyx_t_4);
            __pyx_t_2 = 0; __pyx_t_9 = 0; __pyx_t_4 = 0; 
            __PYX_ERR(0, 1155, __pyx_L9_except_error)
          }
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          goto __pyx_L8_exception_handled;
        }
        __pyx_L9_except_error:;
        __Pyx_XGIVEREF(__pyx_t_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_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_1) {
          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__29, NULL);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1155, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        goto __pyx_L6;
      }
      __pyx_L6:;
    }
    goto __pyx_L16;
    __pyx_L3_error:;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L1_error;
    __pyx_L16:;
  }

  /* "apache_beam/runners/worker/operations.py":1153
 *         PhasedCombineFnExecutor(self.spec.phase, fn, args, kwargs))
 * 
 *   def setup(self, data_sampler=None):             # <<<<<<<<<<<<<<
 *     # type: (Optional[DataSampler]) -> None
 *     with self.scoped_start_state:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.CombineOperation.setup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":1160
 *       self.phased_combine_fn.combine_fn.setup()
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_5process(PyObject *__pyx_v_self, PyObject *__pyx_v_o); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_16CombineOperation_process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_values = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_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;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__99)
  __Pyx_RefNannySetupContext("process", 0);
  __Pyx_TraceCall("process", __pyx_f[0], 1160, 0, __PYX_ERR(0, 1160, __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, 1160, __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_6worker_10operations_16CombineOperation_5process)) {
        __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_o)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_o));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1160, __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/worker/operations.py":1162
 *   def process(self, o):
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:             # <<<<<<<<<<<<<<
 *       if self.debug_logging_enabled:
 *         _LOGGER.debug('Processing [%s] in %s', o, self)
 */
  /*with:*/ {
    __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_process_state, __pyx_n_s_exit); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1162, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_process_state, __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1162, __pyx_L3_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, 1162, __pyx_L3_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:*/ {
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_6);
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_8);
        /*try:*/ {

          /* "apache_beam/runners/worker/operations.py":1163
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:
 *       if self.debug_logging_enabled:             # <<<<<<<<<<<<<<
 *         _LOGGER.debug('Processing [%s] in %s', o, self)
 *       key, values = o.value
 */
          __pyx_t_9 = (__pyx_v_self->__pyx_base.debug_logging_enabled != 0);
          if (__pyx_t_9) {

            /* "apache_beam/runners/worker/operations.py":1164
 *     with self.scoped_process_state:
 *       if self.debug_logging_enabled:
 *         _LOGGER.debug('Processing [%s] in %s', o, self)             # <<<<<<<<<<<<<<
 *       key, values = o.value
 *       self.output(o.with_value((key, self.phased_combine_fn.apply(values))))
 */
            __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_LOGGER); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1164, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_debug); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1164, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_2 = NULL;
            __pyx_t_10 = 0;
            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_10 = 1;
              }
            }
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_3)) {
              PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_kp_u_Processing_s_in_s, ((PyObject *)__pyx_v_o), ((PyObject *)__pyx_v_self)};
              __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1164, __pyx_L7_error)
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_GOTREF(__pyx_t_1);
            } else
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
              PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_kp_u_Processing_s_in_s, ((PyObject *)__pyx_v_o), ((PyObject *)__pyx_v_self)};
              __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1164, __pyx_L7_error)
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_GOTREF(__pyx_t_1);
            } else
            #endif
            {
              __pyx_t_4 = PyTuple_New(3+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1164, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_4);
              if (__pyx_t_2) {
                __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
              }
              __Pyx_INCREF(__pyx_kp_u_Processing_s_in_s);
              __Pyx_GIVEREF(__pyx_kp_u_Processing_s_in_s);
              PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_10, __pyx_kp_u_Processing_s_in_s);
              __Pyx_INCREF(((PyObject *)__pyx_v_o));
              __Pyx_GIVEREF(((PyObject *)__pyx_v_o));
              PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_10, ((PyObject *)__pyx_v_o));
              __Pyx_INCREF(((PyObject *)__pyx_v_self));
              __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
              PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_10, ((PyObject *)__pyx_v_self));
              __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1164, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            }
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

            /* "apache_beam/runners/worker/operations.py":1163
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:
 *       if self.debug_logging_enabled:             # <<<<<<<<<<<<<<
 *         _LOGGER.debug('Processing [%s] in %s', o, self)
 *       key, values = o.value
 */
          }

          /* "apache_beam/runners/worker/operations.py":1165
 *       if self.debug_logging_enabled:
 *         _LOGGER.debug('Processing [%s] in %s', o, self)
 *       key, values = o.value             # <<<<<<<<<<<<<<
 *       self.output(o.with_value((key, self.phased_combine_fn.apply(values))))
 * 
 */
          __pyx_t_1 = __pyx_v_o->value;
          __Pyx_INCREF(__pyx_t_1);
          if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
            PyObject* sequence = __pyx_t_1;
            Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
            if (unlikely(size != 2)) {
              if (size > 2) __Pyx_RaiseTooManyValuesError(2);
              else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
              __PYX_ERR(0, 1165, __pyx_L7_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            if (likely(PyTuple_CheckExact(sequence))) {
              __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
              __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
            } else {
              __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
              __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
            }
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            #else
            __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1165, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1165, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          } else {
            Py_ssize_t index = -1;
            __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1165, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __pyx_t_11 = Py_TYPE(__pyx_t_2)->tp_iternext;
            index = 0; __pyx_t_3 = __pyx_t_11(__pyx_t_2); if (unlikely(!__pyx_t_3)) goto __pyx_L14_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_3);
            index = 1; __pyx_t_4 = __pyx_t_11(__pyx_t_2); if (unlikely(!__pyx_t_4)) goto __pyx_L14_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_4);
            if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_2), 2) < 0) __PYX_ERR(0, 1165, __pyx_L7_error)
            __pyx_t_11 = NULL;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            goto __pyx_L15_unpacking_done;
            __pyx_L14_unpacking_failed:;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_11 = NULL;
            if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
            __PYX_ERR(0, 1165, __pyx_L7_error)
            __pyx_L15_unpacking_done:;
          }
          __pyx_v_key = __pyx_t_3;
          __pyx_t_3 = 0;
          __pyx_v_values = __pyx_t_4;
          __pyx_t_4 = 0;

          /* "apache_beam/runners/worker/operations.py":1166
 *         _LOGGER.debug('Processing [%s] in %s', o, self)
 *       key, values = o.value
 *       self.output(o.with_value((key, self.phased_combine_fn.apply(values))))             # <<<<<<<<<<<<<<
 * 
 *   def finish(self):
 */
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->phased_combine_fn, __pyx_n_s_apply); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1166, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_3 = NULL;
          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_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_v_values) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_values);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1166, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1166, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_INCREF(__pyx_v_key);
          __Pyx_GIVEREF(__pyx_v_key);
          PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_key);
          __Pyx_GIVEREF(__pyx_t_1);
          PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
          __pyx_t_1 = 0;
          __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_v_o->__pyx_vtab)->with_value(__pyx_v_o, __pyx_t_4, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1166, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_CombineOperation *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.output(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_t_1), 0, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1166, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "apache_beam/runners/worker/operations.py":1162
 *   def process(self, o):
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:             # <<<<<<<<<<<<<<
 *       if self.debug_logging_enabled:
 *         _LOGGER.debug('Processing [%s] in %s', o, self)
 */
        }
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L12_try_end;
        __pyx_L7_error:;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        /*except:*/ {
          __Pyx_AddTraceback("apache_beam.runners.worker.operations.CombineOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_1, &__pyx_t_3) < 0) __PYX_ERR(0, 1162, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_2 = PyTuple_Pack(3, __pyx_t_4, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1162, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1162, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (__pyx_t_9 < 0) __PYX_ERR(0, 1162, __pyx_L9_except_error)
          __pyx_t_13 = ((!(__pyx_t_9 != 0)) != 0);
          if (__pyx_t_13) {
            __Pyx_GIVEREF(__pyx_t_4);
            __Pyx_GIVEREF(__pyx_t_1);
            __Pyx_XGIVEREF(__pyx_t_3);
            __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_1, __pyx_t_3);
            __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_t_3 = 0; 
            __PYX_ERR(0, 1162, __pyx_L9_except_error)
          }
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          goto __pyx_L8_exception_handled;
        }
        __pyx_L9_except_error:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        goto __pyx_L1_error;
        __pyx_L8_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        __pyx_L12_try_end:;
      }
    }
    /*finally:*/ {
      /*normal exit:*/{
        if (__pyx_t_5) {
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__29, NULL);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1162, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        goto __pyx_L6;
      }
      __pyx_L6:;
    }
    goto __pyx_L19;
    __pyx_L3_error:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L1_error;
    __pyx_L19:;
  }

  /* "apache_beam/runners/worker/operations.py":1160
 *       self.phased_combine_fn.combine_fn.setup()
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.CombineOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_values);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_5process(PyObject *__pyx_v_self, PyObject *__pyx_v_o); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_16CombineOperation_5process = {"process", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_5process, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_5process(PyObject *__pyx_v_self, PyObject *__pyx_v_o) {
  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_o), __pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, 1, "o", 0))) __PYX_ERR(0, 1160, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_16CombineOperation_4process(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *)__pyx_v_self), ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_v_o));

  /* 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_6worker_10operations_16CombineOperation_4process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__99)
  __Pyx_RefNannySetupContext("process", 0);
  __Pyx_TraceCall("process (wrapper)", __pyx_f[0], 1160, 0, __PYX_ERR(0, 1160, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_16CombineOperation_process(__pyx_v_self, __pyx_v_o, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.CombineOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":1168
 *       self.output(o.with_value((key, self.phased_combine_fn.apply(values))))
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     _LOGGER.debug('Finishing %s', self)
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_7finish(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_16CombineOperation_finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__100)
  __Pyx_RefNannySetupContext("finish", 0);
  __Pyx_TraceCall("finish", __pyx_f[0], 1168, 0, __PYX_ERR(0, 1168, __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_finish); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1168, __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_6worker_10operations_16CombineOperation_7finish)) {
        __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, 1168, __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/worker/operations.py":1170
 *   def finish(self):
 *     # type: () -> None
 *     _LOGGER.debug('Finishing %s', self)             # <<<<<<<<<<<<<<
 *     super(CombineOperation, self).finish()
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_LOGGER); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_debug); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  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_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_kp_u_Finishing_s, ((PyObject *)__pyx_v_self)};
    __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, 1170, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_kp_u_Finishing_s, ((PyObject *)__pyx_v_self)};
    __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, 1170, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_4 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1170, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_kp_u_Finishing_s);
    __Pyx_GIVEREF(__pyx_kp_u_Finishing_s);
    PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_5, __pyx_kp_u_Finishing_s);
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_5, ((PyObject *)__pyx_v_self));
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1170, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":1171
 *     # type: () -> None
 *     _LOGGER.debug('Finishing %s', self)
 *     super(CombineOperation, self).finish()             # <<<<<<<<<<<<<<
 * 
 *   def teardown(self):
 */
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation));
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self));
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_finish); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1171, __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_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, 1171, __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/worker/operations.py":1168
 *       self.output(o.with_value((key, self.phased_combine_fn.apply(values))))
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     _LOGGER.debug('Finishing %s', self)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.CombineOperation.finish", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_7finish(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_16CombineOperation_7finish = {"finish", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_7finish, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_7finish(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_6worker_10operations_16CombineOperation_6finish(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16CombineOperation_6finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__100)
  __Pyx_RefNannySetupContext("finish", 0);
  __Pyx_TraceCall("finish (wrapper)", __pyx_f[0], 1168, 0, __PYX_ERR(0, 1168, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_16CombineOperation_finish(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.CombineOperation.finish", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":1173
 *     super(CombineOperation, self).finish()
 * 
 *   def teardown(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     with self.scoped_finish_state:
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_9teardown(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_16CombineOperation_teardown(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_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;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  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__101)
  __Pyx_RefNannySetupContext("teardown", 0);
  __Pyx_TraceCall("teardown", __pyx_f[0], 1173, 0, __PYX_ERR(0, 1173, __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_teardown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1173, __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_6worker_10operations_16CombineOperation_9teardown)) {
        __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, 1173, __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/worker/operations.py":1175
 *   def teardown(self):
 *     # type: () -> None
 *     with self.scoped_finish_state:             # <<<<<<<<<<<<<<
 *       _LOGGER.debug('Teardown called for %s', self)
 *       super(CombineOperation, self).teardown()
 */
  /*with:*/ {
    __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_finish_state, __pyx_n_s_exit); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_finish_state, __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1175, __pyx_L3_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, 1175, __pyx_L3_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:*/ {
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_6);
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_8);
        /*try:*/ {

          /* "apache_beam/runners/worker/operations.py":1176
 *     # type: () -> None
 *     with self.scoped_finish_state:
 *       _LOGGER.debug('Teardown called for %s', self)             # <<<<<<<<<<<<<<
 *       super(CombineOperation, self).teardown()
 *       self.phased_combine_fn.combine_fn.teardown()
 */
          __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_LOGGER); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1176, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_debug); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1176, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = NULL;
          __pyx_t_9 = 0;
          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_9 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_3)) {
            PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_kp_u_Teardown_called_for_s, ((PyObject *)__pyx_v_self)};
            __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1176, __pyx_L7_error)
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_GOTREF(__pyx_t_1);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
            PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_kp_u_Teardown_called_for_s, ((PyObject *)__pyx_v_self)};
            __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1176, __pyx_L7_error)
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_GOTREF(__pyx_t_1);
          } else
          #endif
          {
            __pyx_t_4 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1176, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_4);
            if (__pyx_t_2) {
              __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
            }
            __Pyx_INCREF(__pyx_kp_u_Teardown_called_for_s);
            __Pyx_GIVEREF(__pyx_kp_u_Teardown_called_for_s);
            PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_9, __pyx_kp_u_Teardown_called_for_s);
            __Pyx_INCREF(((PyObject *)__pyx_v_self));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
            PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_9, ((PyObject *)__pyx_v_self));
            __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1176, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          }
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "apache_beam/runners/worker/operations.py":1177
 *     with self.scoped_finish_state:
 *       _LOGGER.debug('Teardown called for %s', self)
 *       super(CombineOperation, self).teardown()             # <<<<<<<<<<<<<<
 *       self.phased_combine_fn.combine_fn.teardown()
 * 
 */
          __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1177, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_INCREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation));
          __Pyx_GIVEREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation));
          PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation));
          __Pyx_INCREF(((PyObject *)__pyx_v_self));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
          PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self));
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1177, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_teardown); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1177, __pyx_L7_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_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, 1177, __pyx_L7_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/worker/operations.py":1178
 *       _LOGGER.debug('Teardown called for %s', self)
 *       super(CombineOperation, self).teardown()
 *       self.phased_combine_fn.combine_fn.teardown()             # <<<<<<<<<<<<<<
 * 
 * 
 */
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->phased_combine_fn, __pyx_n_s_combine_fn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1178, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_teardown); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1178, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = NULL;
          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_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1178, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "apache_beam/runners/worker/operations.py":1175
 *   def teardown(self):
 *     # type: () -> None
 *     with self.scoped_finish_state:             # <<<<<<<<<<<<<<
 *       _LOGGER.debug('Teardown called for %s', self)
 *       super(CombineOperation, self).teardown()
 */
        }
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L12_try_end;
        __pyx_L7_error:;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        /*except:*/ {
          __Pyx_AddTraceback("apache_beam.runners.worker.operations.CombineOperation.teardown", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_3) < 0) __PYX_ERR(0, 1175, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_2 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1175, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1175, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (__pyx_t_11 < 0) __PYX_ERR(0, 1175, __pyx_L9_except_error)
          __pyx_t_12 = ((!(__pyx_t_11 != 0)) != 0);
          if (__pyx_t_12) {
            __Pyx_GIVEREF(__pyx_t_1);
            __Pyx_GIVEREF(__pyx_t_4);
            __Pyx_XGIVEREF(__pyx_t_3);
            __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_4, __pyx_t_3);
            __pyx_t_1 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; 
            __PYX_ERR(0, 1175, __pyx_L9_except_error)
          }
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          goto __pyx_L8_exception_handled;
        }
        __pyx_L9_except_error:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        goto __pyx_L1_error;
        __pyx_L8_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        __pyx_L12_try_end:;
      }
    }
    /*finally:*/ {
      /*normal exit:*/{
        if (__pyx_t_5) {
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__29, NULL);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1175, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        goto __pyx_L6;
      }
      __pyx_L6:;
    }
    goto __pyx_L16;
    __pyx_L3_error:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L1_error;
    __pyx_L16:;
  }

  /* "apache_beam/runners/worker/operations.py":1173
 *     super(CombineOperation, self).finish()
 * 
 *   def teardown(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     with self.scoped_finish_state:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.CombineOperation.teardown", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_9teardown(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_16CombineOperation_9teardown = {"teardown", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_9teardown, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_9teardown(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_6worker_10operations_16CombineOperation_8teardown(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16CombineOperation_8teardown(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__101)
  __Pyx_RefNannySetupContext("teardown", 0);
  __Pyx_TraceCall("teardown (wrapper)", __pyx_f[0], 1173, 0, __PYX_ERR(0, 1173, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_16CombineOperation_teardown(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.CombineOperation.teardown", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_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_6worker_10operations_16CombineOperation_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_16CombineOperation_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_11__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_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_6worker_10operations_16CombineOperation_10__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16CombineOperation_10__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_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__102)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error));

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.phased_combine_fn, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.debug_logging_enabled); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.setup_done); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(17); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.consumers);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.consumers);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->__pyx_base.consumers);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.counter_factory);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.counter_factory);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->__pyx_base.counter_factory);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.data_sampler);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.data_sampler);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->__pyx_base.data_sampler);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.execution_context);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.execution_context);
  PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_self->__pyx_base.execution_context);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.metrics_container);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.metrics_container);
  PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_self->__pyx_base.metrics_container);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.name_context);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.name_context);
  PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_v_self->__pyx_base.name_context);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.operation_name);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.operation_name);
  PyTuple_SET_ITEM(__pyx_t_3, 7, __pyx_v_self->__pyx_base.operation_name);
  __Pyx_INCREF(__pyx_v_self->phased_combine_fn);
  __Pyx_GIVEREF(__pyx_v_self->phased_combine_fn);
  PyTuple_SET_ITEM(__pyx_t_3, 8, __pyx_v_self->phased_combine_fn);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.receivers);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.receivers);
  PyTuple_SET_ITEM(__pyx_t_3, 9, __pyx_v_self->__pyx_base.receivers);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.scoped_finish_state);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.scoped_finish_state);
  PyTuple_SET_ITEM(__pyx_t_3, 10, __pyx_v_self->__pyx_base.scoped_finish_state);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.scoped_process_state);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.scoped_process_state);
  PyTuple_SET_ITEM(__pyx_t_3, 11, __pyx_v_self->__pyx_base.scoped_process_state);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.scoped_start_state);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.scoped_start_state);
  PyTuple_SET_ITEM(__pyx_t_3, 12, __pyx_v_self->__pyx_base.scoped_start_state);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 13, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.spec);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.spec);
  PyTuple_SET_ITEM(__pyx_t_3, 14, __pyx_v_self->__pyx_base.spec);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.state_sampler);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.state_sampler);
  PyTuple_SET_ITEM(__pyx_t_3, 15, __pyx_v_self->__pyx_base.state_sampler);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.step_name);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.step_name);
  PyTuple_SET_ITEM(__pyx_t_3, 16, __pyx_v_self->__pyx_base.step_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.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.phased_combine_fn, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v__dict = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":7
 *     state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.phased_combine_fn, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         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(2, 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(2, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.phased_combine_fn is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.phased_combine_fn, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.phased_combine_fn is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_CombineOperation, (type(self), 0xc1cd107, None), state
 */
  /*else*/ {
    __pyx_t_4 = (__pyx_v_self->__pyx_base.consumers != 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->__pyx_base.counter_factory != 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->__pyx_base.data_sampler != 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->__pyx_base.execution_context != 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->__pyx_base.metrics_container != 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->__pyx_base.name_context != 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->__pyx_base.operation_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->phased_combine_fn != 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->__pyx_base.receivers != ((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->__pyx_base.scoped_finish_state != 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->__pyx_base.scoped_process_state != 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->__pyx_base.scoped_start_state != 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->__pyx_base.spec != 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->__pyx_base.state_sampler != 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->__pyx_base.step_name != 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.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.phased_combine_fn is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_CombineOperation, (type(self), 0xc1cd107, None), state
 *     else:
 */
  __pyx_t_5 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":13
 *         use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.phased_combine_fn is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None
 *     if use_setstate:
 *         return __pyx_unpickle_CombineOperation, (type(self), 0xc1cd107, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_CombineOperation, (type(self), 0xc1cd107, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_CombineOperation); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_203215111);
    __Pyx_GIVEREF(__pyx_int_203215111);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_203215111);
    __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(2, 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.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.phased_combine_fn is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_CombineOperation, (type(self), 0xc1cd107, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_CombineOperation, (type(self), 0xc1cd107, None), state
 *     else:
 *         return __pyx_unpickle_CombineOperation, (type(self), 0xc1cd107, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_CombineOperation__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_CombineOperation); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_203215111);
    __Pyx_GIVEREF(__pyx_int_203215111);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_203215111);
    __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(2, 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.worker.operations.CombineOperation.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_CombineOperation, (type(self), 0xc1cd107, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CombineOperation__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_16CombineOperation_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_13__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_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_6worker_10operations_16CombineOperation_12__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16CombineOperation_12__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__103)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[2], 16, 0, __PYX_ERR(2, 16, __pyx_L1_error));

  /* "(tree fragment)":17
 *         return __pyx_unpickle_CombineOperation, (type(self), 0xc1cd107, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_CombineOperation__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(2, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_CombineOperation__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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_CombineOperation, (type(self), 0xc1cd107, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CombineOperation__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.CombineOperation.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":1181
 * 
 * 
 * def create_pgbk_op(step_name, spec, counter_factory, state_sampler):             # <<<<<<<<<<<<<<
 *   if spec.combine_fn:
 *     return PGBKCVOperation(step_name, spec, counter_factory, state_sampler)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_5create_pgbk_op(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_5create_pgbk_op = {"create_pgbk_op", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_5create_pgbk_op, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_5create_pgbk_op(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_step_name = 0;
  PyObject *__pyx_v_spec = 0;
  PyObject *__pyx_v_counter_factory = 0;
  PyObject *__pyx_v_state_sampler = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create_pgbk_op (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_step_name,&__pyx_n_s_spec,&__pyx_n_s_counter_factory,&__pyx_n_s_state_sampler,0};
    PyObject* values[4] = {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  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_step_name)) != 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_spec)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("create_pgbk_op", 1, 4, 4, 1); __PYX_ERR(0, 1181, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_counter_factory)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("create_pgbk_op", 1, 4, 4, 2); __PYX_ERR(0, 1181, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_state_sampler)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("create_pgbk_op", 1, 4, 4, 3); __PYX_ERR(0, 1181, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create_pgbk_op") < 0)) __PYX_ERR(0, 1181, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      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);
    }
    __pyx_v_step_name = values[0];
    __pyx_v_spec = values[1];
    __pyx_v_counter_factory = values[2];
    __pyx_v_state_sampler = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create_pgbk_op", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1181, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.create_pgbk_op", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_4create_pgbk_op(__pyx_self, __pyx_v_step_name, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler);

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_4create_pgbk_op(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_step_name, PyObject *__pyx_v_spec, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_state_sampler) {
  PyObject *__pyx_r = NULL;
  __Pyx_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;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__104)
  __Pyx_RefNannySetupContext("create_pgbk_op", 0);
  __Pyx_TraceCall("create_pgbk_op", __pyx_f[0], 1181, 0, __PYX_ERR(0, 1181, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":1182
 * 
 * def create_pgbk_op(step_name, spec, counter_factory, state_sampler):
 *   if spec.combine_fn:             # <<<<<<<<<<<<<<
 *     return PGBKCVOperation(step_name, spec, counter_factory, state_sampler)
 *   else:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_spec, __pyx_n_s_combine_fn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1182, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "apache_beam/runners/worker/operations.py":1183
 * def create_pgbk_op(step_name, spec, counter_factory, state_sampler):
 *   if spec.combine_fn:
 *     return PGBKCVOperation(step_name, spec, counter_factory, state_sampler)             # <<<<<<<<<<<<<<
 *   else:
 *     return PGBKOperation(step_name, spec, counter_factory, state_sampler)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1183, __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_INCREF(__pyx_v_spec);
    __Pyx_GIVEREF(__pyx_v_spec);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_spec);
    __Pyx_INCREF(__pyx_v_counter_factory);
    __Pyx_GIVEREF(__pyx_v_counter_factory);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_counter_factory);
    __Pyx_INCREF(__pyx_v_state_sampler);
    __Pyx_GIVEREF(__pyx_v_state_sampler);
    PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_state_sampler);
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1183, __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/worker/operations.py":1182
 * 
 * def create_pgbk_op(step_name, spec, counter_factory, state_sampler):
 *   if spec.combine_fn:             # <<<<<<<<<<<<<<
 *     return PGBKCVOperation(step_name, spec, counter_factory, state_sampler)
 *   else:
 */
  }

  /* "apache_beam/runners/worker/operations.py":1185
 *     return PGBKCVOperation(step_name, spec, counter_factory, state_sampler)
 *   else:
 *     return PGBKOperation(step_name, spec, counter_factory, state_sampler)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PGBKOperation); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(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_5 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[5] = {__pyx_t_4, __pyx_v_step_name, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1185, __pyx_L1_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_1)) {
      PyObject *__pyx_temp[5] = {__pyx_t_4, __pyx_v_step_name, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1185, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(4+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1185, __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_step_name);
      __Pyx_GIVEREF(__pyx_v_step_name);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_step_name);
      __Pyx_INCREF(__pyx_v_spec);
      __Pyx_GIVEREF(__pyx_v_spec);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_spec);
      __Pyx_INCREF(__pyx_v_counter_factory);
      __Pyx_GIVEREF(__pyx_v_counter_factory);
      PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_counter_factory);
      __Pyx_INCREF(__pyx_v_state_sampler);
      __Pyx_GIVEREF(__pyx_v_state_sampler);
      PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_5, __pyx_v_state_sampler);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "apache_beam/runners/worker/operations.py":1181
 * 
 * 
 * def create_pgbk_op(step_name, spec, counter_factory, state_sampler):             # <<<<<<<<<<<<<<
 *   if spec.combine_fn:
 *     return PGBKCVOperation(step_name, spec, counter_factory, state_sampler)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.create_pgbk_op", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":1195
 *   values in this bundle, memory permitting.
 *   """
 *   def __init__(self, name_context, spec, counter_factory, state_sampler):             # <<<<<<<<<<<<<<
 *     super(PGBKOperation,
 *           self).__init__(name_context, spec, counter_factory, state_sampler)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_13PGBKOperation_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_13PGBKOperation_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_13PGBKOperation_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_13PGBKOperation_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_name_context = 0;
  PyObject *__pyx_v_spec = 0;
  PyObject *__pyx_v_counter_factory = 0;
  PyObject *__pyx_v_state_sampler = 0;
  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_name_context,&__pyx_n_s_spec,&__pyx_n_s_counter_factory,&__pyx_n_s_state_sampler,0};
    PyObject* values[5] = {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  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_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_name_context)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 1); __PYX_ERR(0, 1195, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_spec)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 2); __PYX_ERR(0, 1195, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_counter_factory)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 3); __PYX_ERR(0, 1195, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_state_sampler)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 4); __PYX_ERR(0, 1195, __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, 1195, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      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);
    }
    __pyx_v_self = values[0];
    __pyx_v_name_context = values[1];
    __pyx_v_spec = values[2];
    __pyx_v_counter_factory = values[3];
    __pyx_v_state_sampler = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1195, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKOperation.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_13PGBKOperation___init__(__pyx_self, __pyx_v_self, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler);

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_13PGBKOperation___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name_context, PyObject *__pyx_v_spec, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_state_sampler) {
  PyObject *__pyx_r = NULL;
  __Pyx_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_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], 1195, 0, __PYX_ERR(0, 1195, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":1196
 *   """
 *   def __init__(self, name_context, spec, counter_factory, state_sampler):
 *     super(PGBKOperation,             # <<<<<<<<<<<<<<
 *           self).__init__(name_context, spec, counter_factory, state_sampler)
 *     assert not self.spec.combine_fn
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PGBKOperation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "apache_beam/runners/worker/operations.py":1197
 *   def __init__(self, name_context, spec, counter_factory, state_sampler):
 *     super(PGBKOperation,
 *           self).__init__(name_context, spec, counter_factory, state_sampler)             # <<<<<<<<<<<<<<
 *     assert not self.spec.combine_fn
 *     self.table = collections.defaultdict(list)
 */
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
  __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":1196
 *   """
 *   def __init__(self, name_context, spec, counter_factory, state_sampler):
 *     super(PGBKOperation,             # <<<<<<<<<<<<<<
 *           self).__init__(name_context, spec, counter_factory, state_sampler)
 *     assert not self.spec.combine_fn
 */
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "apache_beam/runners/worker/operations.py":1197
 *   def __init__(self, name_context, spec, counter_factory, state_sampler):
 *     super(PGBKOperation,
 *           self).__init__(name_context, spec, counter_factory, state_sampler)             # <<<<<<<<<<<<<<
 *     assert not self.spec.combine_fn
 *     self.table = collections.defaultdict(list)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  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_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[5] = {__pyx_t_2, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 4+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1197, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[5] = {__pyx_t_2, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 4+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1197, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(4+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_name_context);
    __Pyx_GIVEREF(__pyx_v_name_context);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_name_context);
    __Pyx_INCREF(__pyx_v_spec);
    __Pyx_GIVEREF(__pyx_v_spec);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_spec);
    __Pyx_INCREF(__pyx_v_counter_factory);
    __Pyx_GIVEREF(__pyx_v_counter_factory);
    PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_counter_factory);
    __Pyx_INCREF(__pyx_v_state_sampler);
    __Pyx_GIVEREF(__pyx_v_state_sampler);
    PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_4, __pyx_v_state_sampler);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":1198
 *     super(PGBKOperation,
 *           self).__init__(name_context, spec, counter_factory, state_sampler)
 *     assert not self.spec.combine_fn             # <<<<<<<<<<<<<<
 *     self.table = collections.defaultdict(list)
 *     self.size = 0
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_spec); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1198, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_combine_fn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1198, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1198, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!((!__pyx_t_6) != 0))) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 1198, __pyx_L1_error)
    }
  }
  #endif

  /* "apache_beam/runners/worker/operations.py":1199
 *           self).__init__(name_context, spec, counter_factory, state_sampler)
 *     assert not self.spec.combine_fn
 *     self.table = collections.defaultdict(list)             # <<<<<<<<<<<<<<
 *     self.size = 0
 *     # TODO(robertwb) Make this configurable.
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_collections); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_defaultdict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_1, ((PyObject *)(&PyList_Type))) : __Pyx_PyObject_CallOneArg(__pyx_t_5, ((PyObject *)(&PyList_Type)));
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_table, __pyx_t_3) < 0) __PYX_ERR(0, 1199, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "apache_beam/runners/worker/operations.py":1200
 *     assert not self.spec.combine_fn
 *     self.table = collections.defaultdict(list)
 *     self.size = 0             # <<<<<<<<<<<<<<
 *     # TODO(robertwb) Make this configurable.
 *     self.max_size = 10 * 1000
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_size, __pyx_int_0) < 0) __PYX_ERR(0, 1200, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":1202
 *     self.size = 0
 *     # TODO(robertwb) Make this configurable.
 *     self.max_size = 10 * 1000             # <<<<<<<<<<<<<<
 * 
 *   def process(self, o):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_max_size, __pyx_int_10000) < 0) __PYX_ERR(0, 1202, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":1195
 *   values in this bundle, memory permitting.
 *   """
 *   def __init__(self, name_context, spec, counter_factory, state_sampler):             # <<<<<<<<<<<<<<
 *     super(PGBKOperation,
 *           self).__init__(name_context, spec, counter_factory, state_sampler)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKOperation.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":1204
 *     self.max_size = 10 * 1000
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_13PGBKOperation_3process(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_13PGBKOperation_3process = {"process", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_13PGBKOperation_3process, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_13PGBKOperation_3process(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_o = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("process (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_o,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_o)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("process", 1, 2, 2, 1); __PYX_ERR(0, 1204, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "process") < 0)) __PYX_ERR(0, 1204, __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_o = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("process", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1204, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_13PGBKOperation_2process(__pyx_self, __pyx_v_self, __pyx_v_o);

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_13PGBKOperation_2process(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_o) {
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_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;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__106)
  __Pyx_RefNannySetupContext("process", 0);
  __Pyx_TraceCall("process", __pyx_f[0], 1204, 0, __PYX_ERR(0, 1204, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":1206
 *   def process(self, o):
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:             # <<<<<<<<<<<<<<
 *       # TODO(robertwb): Structural (hashable) values.
 *       key = o.value[0], tuple(o.windows)
 */
  /*with:*/ {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_scoped_process_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1206, __pyx_L3_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, 1206, __pyx_L3_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    /*try:*/ {
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_6);
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_8);
        /*try:*/ {

          /* "apache_beam/runners/worker/operations.py":1208
 *     with self.scoped_process_state:
 *       # TODO(robertwb): Structural (hashable) values.
 *       key = o.value[0], tuple(o.windows)             # <<<<<<<<<<<<<<
 *       self.table[key].append(o)
 *       self.size += 1
 */
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_o, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1208, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1208, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_o, __pyx_n_s_windows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1208, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1208, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1208, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
          __pyx_t_3 = 0;
          __pyx_t_4 = 0;
          __pyx_v_key = ((PyObject*)__pyx_t_1);
          __pyx_t_1 = 0;

          /* "apache_beam/runners/worker/operations.py":1209
 *       # TODO(robertwb): Structural (hashable) values.
 *       key = o.value[0], tuple(o.windows)
 *       self.table[key].append(o)             # <<<<<<<<<<<<<<
 *       self.size += 1
 *       if self.size > self.max_size:
 */
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_table); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1209, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1209, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_9 = __Pyx_PyObject_Append(__pyx_t_4, __pyx_v_o); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 1209, __pyx_L7_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "apache_beam/runners/worker/operations.py":1210
 *       key = o.value[0], tuple(o.windows)
 *       self.table[key].append(o)
 *       self.size += 1             # <<<<<<<<<<<<<<
 *       if self.size > self.max_size:
 *         self.flush(9 * self.max_size // 10)
 */
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1210, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1210, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_size, __pyx_t_1) < 0) __PYX_ERR(0, 1210, __pyx_L7_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "apache_beam/runners/worker/operations.py":1211
 *       self.table[key].append(o)
 *       self.size += 1
 *       if self.size > self.max_size:             # <<<<<<<<<<<<<<
 *         self.flush(9 * self.max_size // 10)
 * 
 */
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1211, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_max_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1211, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1211, __pyx_L7_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1211, __pyx_L7_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (__pyx_t_10) {

            /* "apache_beam/runners/worker/operations.py":1212
 *       self.size += 1
 *       if self.size > self.max_size:
 *         self.flush(9 * self.max_size // 10)             # <<<<<<<<<<<<<<
 * 
 *   def finish(self):
 */
            __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_flush); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1212, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_max_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1212, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_5 = PyNumber_Multiply(__pyx_int_9, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1212, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __pyx_t_1 = __Pyx_PyInt_FloorDivideObjC(__pyx_t_5, __pyx_int_10, 10, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1212, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __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_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1);
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1212, __pyx_L7_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/worker/operations.py":1211
 *       self.table[key].append(o)
 *       self.size += 1
 *       if self.size > self.max_size:             # <<<<<<<<<<<<<<
 *         self.flush(9 * self.max_size // 10)
 * 
 */
          }

          /* "apache_beam/runners/worker/operations.py":1206
 *   def process(self, o):
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:             # <<<<<<<<<<<<<<
 *       # TODO(robertwb): Structural (hashable) values.
 *       key = o.value[0], tuple(o.windows)
 */
        }
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L12_try_end;
        __pyx_L7_error:;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        /*except:*/ {
          __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_1) < 0) __PYX_ERR(0, 1206, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_5 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1206, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_11 = __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_11)) __PYX_ERR(0, 1206, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (__pyx_t_10 < 0) __PYX_ERR(0, 1206, __pyx_L9_except_error)
          __pyx_t_12 = ((!(__pyx_t_10 != 0)) != 0);
          if (__pyx_t_12) {
            __Pyx_GIVEREF(__pyx_t_3);
            __Pyx_GIVEREF(__pyx_t_4);
            __Pyx_XGIVEREF(__pyx_t_1);
            __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_4, __pyx_t_1);
            __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_1 = 0; 
            __PYX_ERR(0, 1206, __pyx_L9_except_error)
          }
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          goto __pyx_L8_exception_handled;
        }
        __pyx_L9_except_error:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        goto __pyx_L1_error;
        __pyx_L8_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        __pyx_L12_try_end:;
      }
    }
    /*finally:*/ {
      /*normal exit:*/{
        if (__pyx_t_2) {
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__29, NULL);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1206, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        goto __pyx_L6;
      }
      __pyx_L6:;
    }
    goto __pyx_L17;
    __pyx_L3_error:;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L1_error;
    __pyx_L17:;
  }

  /* "apache_beam/runners/worker/operations.py":1204
 *     self.max_size = 10 * 1000
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":1214
 *         self.flush(9 * self.max_size // 10)
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     self.flush(0)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_13PGBKOperation_5finish(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_13PGBKOperation_5finish = {"finish", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_13PGBKOperation_5finish, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_13PGBKOperation_5finish(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("finish (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_13PGBKOperation_4finish(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_13PGBKOperation_4finish(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__107)
  __Pyx_RefNannySetupContext("finish", 0);
  __Pyx_TraceCall("finish", __pyx_f[0], 1214, 0, __PYX_ERR(0, 1214, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":1216
 *   def finish(self):
 *     # type: () -> None
 *     self.flush(0)             # <<<<<<<<<<<<<<
 *     super().finish()
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_flush); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1216, __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_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_int_0);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":1217
 *     # type: () -> None
 *     self.flush(0)
 *     super().finish()             # <<<<<<<<<<<<<<
 * 
 *   def flush(self, target):
 */
  __pyx_t_2 = __Pyx_CyFunction_GetClassObj(__pyx_self);
  if (!__pyx_t_2) { PyErr_SetString(PyExc_SystemError, "super(): empty __class__ cell"); __PYX_ERR(0, 1217, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1217, __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_finish); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1217, __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 && 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_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1217, __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/worker/operations.py":1214
 *         self.flush(9 * self.max_size // 10)
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     self.flush(0)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKOperation.finish", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":1219
 *     super().finish()
 * 
 *   def flush(self, target):             # <<<<<<<<<<<<<<
 *     # type: (int) -> None
 *     limit = self.size - target
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_13PGBKOperation_7flush(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_13PGBKOperation_7flush = {"flush", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_13PGBKOperation_7flush, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_13PGBKOperation_7flush(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_target = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("flush (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_target,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_target)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("flush", 1, 2, 2, 1); __PYX_ERR(0, 1219, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "flush") < 0)) __PYX_ERR(0, 1219, __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_target = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("flush", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1219, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKOperation.flush", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_13PGBKOperation_6flush(__pyx_self, __pyx_v_self, __pyx_v_target);

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_13PGBKOperation_6flush(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_target) {
  PyObject *__pyx_v_limit = NULL;
  PyObject *__pyx_v_ix = NULL;
  PyObject *__pyx_v_kw = NULL;
  PyObject *__pyx_v_vs = NULL;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_windows = NULL;
  PyObject *__pyx_v_output_value = NULL;
  struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value = NULL;
  PyObject *__pyx_8genexpr6__pyx_v_v = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__108)
  __Pyx_RefNannySetupContext("flush", 0);
  __Pyx_TraceCall("flush", __pyx_f[0], 1219, 0, __PYX_ERR(0, 1219, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":1221
 *   def flush(self, target):
 *     # type: (int) -> None
 *     limit = self.size - target             # <<<<<<<<<<<<<<
 *     for ix, (kw, vs) in enumerate(list(self.table.items())):
 *       if ix >= limit:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_Subtract(__pyx_t_1, __pyx_v_target); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_limit = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":1222
 *     # type: (int) -> None
 *     limit = self.size - target
 *     for ix, (kw, vs) in enumerate(list(self.table.items())):             # <<<<<<<<<<<<<<
 *       if ix >= limit:
 *         break
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_t_2 = __pyx_int_0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_table); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  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_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (__pyx_t_5 >= 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_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1222, __pyx_L1_error)
    #else
    __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1222, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    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, 1222, __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_6 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_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, 1222, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1222, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1222, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
      index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 1222, __pyx_L1_error)
      __pyx_t_8 = 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_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 1222, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_kw, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_vs, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_ix, __pyx_t_2);
    __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1222, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2);
    __pyx_t_2 = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "apache_beam/runners/worker/operations.py":1223
 *     limit = self.size - target
 *     for ix, (kw, vs) in enumerate(list(self.table.items())):
 *       if ix >= limit:             # <<<<<<<<<<<<<<
 *         break
 *       del self.table[kw]
 */
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_ix, __pyx_v_limit, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1223, __pyx_L1_error)
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1223, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_9) {

      /* "apache_beam/runners/worker/operations.py":1224
 *     for ix, (kw, vs) in enumerate(list(self.table.items())):
 *       if ix >= limit:
 *         break             # <<<<<<<<<<<<<<
 *       del self.table[kw]
 *       key, windows = kw
 */
      goto __pyx_L4_break;

      /* "apache_beam/runners/worker/operations.py":1223
 *     limit = self.size - target
 *     for ix, (kw, vs) in enumerate(list(self.table.items())):
 *       if ix >= limit:             # <<<<<<<<<<<<<<
 *         break
 *       del self.table[kw]
 */
    }

    /* "apache_beam/runners/worker/operations.py":1225
 *       if ix >= limit:
 *         break
 *       del self.table[kw]             # <<<<<<<<<<<<<<
 *       key, windows = kw
 *       output_value = [v.value[1] for v in vs]
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_table); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1225, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (unlikely(PyObject_DelItem(__pyx_t_4, __pyx_v_kw) < 0)) __PYX_ERR(0, 1225, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "apache_beam/runners/worker/operations.py":1226
 *         break
 *       del self.table[kw]
 *       key, windows = kw             # <<<<<<<<<<<<<<
 *       output_value = [v.value[1] for v in vs]
 *       windowed_value = WindowedValue((key, output_value),
 */
    if ((likely(PyTuple_CheckExact(__pyx_v_kw))) || (PyList_CheckExact(__pyx_v_kw))) {
      PyObject* sequence = __pyx_v_kw;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 1226, __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, 1226, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1226, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
    } else {
      Py_ssize_t index = -1;
      __pyx_t_3 = PyObject_GetIter(__pyx_v_kw); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1226, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext;
      index = 0; __pyx_t_4 = __pyx_t_8(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L8_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_3); if (unlikely(!__pyx_t_6)) goto __pyx_L8_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_3), 2) < 0) __PYX_ERR(0, 1226, __pyx_L1_error)
      __pyx_t_8 = 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_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 1226, __pyx_L1_error)
      __pyx_L9_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_windows, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "apache_beam/runners/worker/operations.py":1227
 *       del self.table[kw]
 *       key, windows = kw
 *       output_value = [v.value[1] for v in vs]             # <<<<<<<<<<<<<<
 *       windowed_value = WindowedValue((key, output_value),
 *                                      vs[0].timestamp,
 */
    { /* enter inner scope */
      __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1227, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (likely(PyList_CheckExact(__pyx_v_vs)) || PyTuple_CheckExact(__pyx_v_vs)) {
        __pyx_t_4 = __pyx_v_vs; __Pyx_INCREF(__pyx_t_4); __pyx_t_10 = 0;
        __pyx_t_11 = NULL;
      } else {
        __pyx_t_10 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_vs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1227, __pyx_L12_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_11 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1227, __pyx_L12_error)
      }
      for (;;) {
        if (likely(!__pyx_t_11)) {
          if (likely(PyList_CheckExact(__pyx_t_4))) {
            if (__pyx_t_10 >= 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_10); __Pyx_INCREF(__pyx_t_3); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 1227, __pyx_L12_error)
            #else
            __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1227, __pyx_L12_error)
            __Pyx_GOTREF(__pyx_t_3);
            #endif
          } else {
            if (__pyx_t_10 >= 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_10); __Pyx_INCREF(__pyx_t_3); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 1227, __pyx_L12_error)
            #else
            __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1227, __pyx_L12_error)
            __Pyx_GOTREF(__pyx_t_3);
            #endif
          }
        } else {
          __pyx_t_3 = __pyx_t_11(__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, 1227, __pyx_L12_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_XDECREF_SET(__pyx_8genexpr6__pyx_v_v, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr6__pyx_v_v, __pyx_n_s_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1227, __pyx_L12_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1227, __pyx_L12_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 1227, __pyx_L12_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_v); __pyx_8genexpr6__pyx_v_v = 0;
      goto __pyx_L15_exit_scope;
      __pyx_L12_error:;
      __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_v); __pyx_8genexpr6__pyx_v_v = 0;
      goto __pyx_L1_error;
      __pyx_L15_exit_scope:;
    } /* exit inner scope */
    __Pyx_XDECREF_SET(__pyx_v_output_value, ((PyObject*)__pyx_t_6));
    __pyx_t_6 = 0;

    /* "apache_beam/runners/worker/operations.py":1228
 *       key, windows = kw
 *       output_value = [v.value[1] for v in vs]
 *       windowed_value = WindowedValue((key, output_value),             # <<<<<<<<<<<<<<
 *                                      vs[0].timestamp,
 *                                      windows)
 */
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1228, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_key);
    __Pyx_GIVEREF(__pyx_v_key);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_key);
    __Pyx_INCREF(__pyx_v_output_value);
    __Pyx_GIVEREF(__pyx_v_output_value);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_output_value);

    /* "apache_beam/runners/worker/operations.py":1229
 *       output_value = [v.value[1] for v in vs]
 *       windowed_value = WindowedValue((key, output_value),
 *                                      vs[0].timestamp,             # <<<<<<<<<<<<<<
 *                                      windows)
 *       self.output(windowed_value)
 */
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_vs, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_timestamp); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "apache_beam/runners/worker/operations.py":1228
 *       key, windows = kw
 *       output_value = [v.value[1] for v in vs]
 *       windowed_value = WindowedValue((key, output_value),             # <<<<<<<<<<<<<<
 *                                      vs[0].timestamp,
 *                                      windows)
 */
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1228, __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_7);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_7);
    __Pyx_INCREF(__pyx_v_windows);
    __Pyx_GIVEREF(__pyx_v_windows);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_windows);
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue), __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1228, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_windowed_value, ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_t_7));
    __pyx_t_7 = 0;

    /* "apache_beam/runners/worker/operations.py":1231
 *                                      vs[0].timestamp,
 *                                      windows)
 *       self.output(windowed_value)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_output); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __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_7 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, ((PyObject *)__pyx_v_windowed_value)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_windowed_value));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "apache_beam/runners/worker/operations.py":1222
 *     # type: (int) -> None
 *     limit = self.size - target
 *     for ix, (kw, vs) in enumerate(list(self.table.items())):             # <<<<<<<<<<<<<<
 *       if ix >= limit:
 *         break
 */
  }
  __pyx_L4_break:;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":1219
 *     super().finish()
 * 
 *   def flush(self, target):             # <<<<<<<<<<<<<<
 *     # type: (int) -> None
 *     limit = self.size - target
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKOperation.flush", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_limit);
  __Pyx_XDECREF(__pyx_v_ix);
  __Pyx_XDECREF(__pyx_v_kw);
  __Pyx_XDECREF(__pyx_v_vs);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_windows);
  __Pyx_XDECREF(__pyx_v_output_value);
  __Pyx_XDECREF((PyObject *)__pyx_v_windowed_value);
  __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_v);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":1235
 * 
 * class PGBKCVOperation(Operation):
 *   def __init__(             # <<<<<<<<<<<<<<
 *       self, name_context, spec, counter_factory, state_sampler, windowing=None):
 *     super(PGBKCVOperation,
 */

/* Python wrapper */
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name_context = 0;
  PyObject *__pyx_v_spec = 0;
  PyObject *__pyx_v_counter_factory = 0;
  PyObject *__pyx_v_state_sampler = 0;
  PyObject *__pyx_v_windowing = 0;
  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_name_context,&__pyx_n_s_spec,&__pyx_n_s_counter_factory,&__pyx_n_s_state_sampler,&__pyx_n_s_windowing,0};
    PyObject* values[5] = {0,0,0,0,0};

    /* "apache_beam/runners/worker/operations.py":1236
 * class PGBKCVOperation(Operation):
 *   def __init__(
 *       self, name_context, spec, counter_factory, state_sampler, windowing=None):             # <<<<<<<<<<<<<<
 *     super(PGBKCVOperation,
 *           self).__init__(name_context, spec, counter_factory, state_sampler)
 */
    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_name_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_spec)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 5, 1); __PYX_ERR(0, 1235, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_counter_factory)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 5, 2); __PYX_ERR(0, 1235, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_state_sampler)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 5, 3); __PYX_ERR(0, 1235, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_windowing);
          if (value) { values[4] = 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, 1235, __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);
        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_name_context = values[0];
    __pyx_v_spec = values[1];
    __pyx_v_counter_factory = values[2];
    __pyx_v_state_sampler = values[3];
    __pyx_v_windowing = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1235, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation___init__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self), __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler, __pyx_v_windowing);

  /* "apache_beam/runners/worker/operations.py":1235
 * 
 * class PGBKCVOperation(Operation):
 *   def __init__(             # <<<<<<<<<<<<<<
 *       self, name_context, spec, counter_factory, state_sampler, windowing=None):
 *     super(PGBKCVOperation,
 */

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_name_context, PyObject *__pyx_v_spec, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_state_sampler, PyObject *__pyx_v_windowing) {
  PyObject *__pyx_v_fn = NULL;
  PyObject *__pyx_v_args = NULL;
  PyObject *__pyx_v_kwargs = NULL;
  PyObject *__pyx_v_tsc_type = NULL;
  int __pyx_r;
  __Pyx_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)(PyObject *);
  int __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  long __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 1235, 0, __PYX_ERR(0, 1235, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":1237
 *   def __init__(
 *       self, name_context, spec, counter_factory, state_sampler, windowing=None):
 *     super(PGBKCVOperation,             # <<<<<<<<<<<<<<
 *           self).__init__(name_context, spec, counter_factory, state_sampler)
 *     # Combiners do not accept deferred side-inputs (the ignored fourth
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation));
  __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, 1237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":1238
 *       self, name_context, spec, counter_factory, state_sampler, windowing=None):
 *     super(PGBKCVOperation,
 *           self).__init__(name_context, spec, counter_factory, state_sampler)             # <<<<<<<<<<<<<<
 *     # Combiners do not accept deferred side-inputs (the ignored fourth
 *     # argument) and therefore the code to handle the extra args/kwargs is
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1238, __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[5] = {__pyx_t_3, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 4+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1238, __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[5] = {__pyx_t_3, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 4+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1238, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(4+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1238, __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_name_context);
    __Pyx_GIVEREF(__pyx_v_name_context);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_name_context);
    __Pyx_INCREF(__pyx_v_spec);
    __Pyx_GIVEREF(__pyx_v_spec);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_spec);
    __Pyx_INCREF(__pyx_v_counter_factory);
    __Pyx_GIVEREF(__pyx_v_counter_factory);
    PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_counter_factory);
    __Pyx_INCREF(__pyx_v_state_sampler);
    __Pyx_GIVEREF(__pyx_v_state_sampler);
    PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_4, __pyx_v_state_sampler);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1238, __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/worker/operations.py":1242
 *     # argument) and therefore the code to handle the extra args/kwargs is
 *     # simpler than for the DoFn's of ParDo.
 *     fn, args, kwargs = pickler.loads(self.spec.combine_fn)[:3]             # <<<<<<<<<<<<<<
 *     self.combine_fn = curry_combine_fn(fn, args, kwargs)
 *     self.combine_fn_add_input = self.combine_fn.add_input
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pickler); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_loads); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.spec, __pyx_n_s_combine_fn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  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_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 3, NULL, NULL, &__pyx_slice__97, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1242, __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 != 3)) {
      if (size > 3) __Pyx_RaiseTooManyValuesError(3);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 1242, __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_2 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 2); 
    } else {
      __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 2); 
    }
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1242, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1242, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1242, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #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, 1242, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext;
    index = 0; __pyx_t_1 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    index = 1; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 2; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 3) < 0) __PYX_ERR(0, 1242, __pyx_L1_error)
    __pyx_t_7 = NULL;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 1242, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_fn = __pyx_t_1;
  __pyx_t_1 = 0;
  __pyx_v_args = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_kwargs = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "apache_beam/runners/worker/operations.py":1243
 *     # simpler than for the DoFn's of ParDo.
 *     fn, args, kwargs = pickler.loads(self.spec.combine_fn)[:3]
 *     self.combine_fn = curry_combine_fn(fn, args, kwargs)             # <<<<<<<<<<<<<<
 *     self.combine_fn_add_input = self.combine_fn.add_input
 *     if self.combine_fn.compact.__func__ is core.CombineFn.compact:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_curry_combine_fn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  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_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_v_fn, __pyx_v_args, __pyx_v_kwargs};
    __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1243, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 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_2, __pyx_v_fn, __pyx_v_args, __pyx_v_kwargs};
    __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1243, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_5);
  } else
  #endif
  {
    __pyx_t_1 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1243, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_fn);
    __Pyx_GIVEREF(__pyx_v_fn);
    PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_4, __pyx_v_fn);
    __Pyx_INCREF(__pyx_v_args);
    __Pyx_GIVEREF(__pyx_v_args);
    PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_4, __pyx_v_args);
    __Pyx_INCREF(__pyx_v_kwargs);
    __Pyx_GIVEREF(__pyx_v_kwargs);
    PyTuple_SET_ITEM(__pyx_t_1, 2+__pyx_t_4, __pyx_v_kwargs);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1243, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_5);
  __Pyx_GOTREF(__pyx_v_self->combine_fn);
  __Pyx_DECREF(__pyx_v_self->combine_fn);
  __pyx_v_self->combine_fn = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "apache_beam/runners/worker/operations.py":1244
 *     fn, args, kwargs = pickler.loads(self.spec.combine_fn)[:3]
 *     self.combine_fn = curry_combine_fn(fn, args, kwargs)
 *     self.combine_fn_add_input = self.combine_fn.add_input             # <<<<<<<<<<<<<<
 *     if self.combine_fn.compact.__func__ is core.CombineFn.compact:
 *       self.combine_fn_compact = None
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->combine_fn, __pyx_n_s_add_input); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __Pyx_GOTREF(__pyx_v_self->combine_fn_add_input);
  __Pyx_DECREF(__pyx_v_self->combine_fn_add_input);
  __pyx_v_self->combine_fn_add_input = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "apache_beam/runners/worker/operations.py":1245
 *     self.combine_fn = curry_combine_fn(fn, args, kwargs)
 *     self.combine_fn_add_input = self.combine_fn.add_input
 *     if self.combine_fn.compact.__func__ is core.CombineFn.compact:             # <<<<<<<<<<<<<<
 *       self.combine_fn_compact = None
 *     else:
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->combine_fn, __pyx_n_s_compact); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_func); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_core); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_CombineFn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_compact); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = (__pyx_t_3 == __pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_9 = (__pyx_t_8 != 0);
  if (__pyx_t_9) {

    /* "apache_beam/runners/worker/operations.py":1246
 *     self.combine_fn_add_input = self.combine_fn.add_input
 *     if self.combine_fn.compact.__func__ is core.CombineFn.compact:
 *       self.combine_fn_compact = None             # <<<<<<<<<<<<<<
 *     else:
 *       self.combine_fn_compact = self.combine_fn.compact
 */
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    __Pyx_GOTREF(__pyx_v_self->combine_fn_compact);
    __Pyx_DECREF(__pyx_v_self->combine_fn_compact);
    __pyx_v_self->combine_fn_compact = Py_None;

    /* "apache_beam/runners/worker/operations.py":1245
 *     self.combine_fn = curry_combine_fn(fn, args, kwargs)
 *     self.combine_fn_add_input = self.combine_fn.add_input
 *     if self.combine_fn.compact.__func__ is core.CombineFn.compact:             # <<<<<<<<<<<<<<
 *       self.combine_fn_compact = None
 *     else:
 */
    goto __pyx_L5;
  }

  /* "apache_beam/runners/worker/operations.py":1248
 *       self.combine_fn_compact = None
 *     else:
 *       self.combine_fn_compact = self.combine_fn.compact             # <<<<<<<<<<<<<<
 *     if windowing:
 *       self.is_default_windowing = windowing.is_default()
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->combine_fn, __pyx_n_s_compact); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1248, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __Pyx_GOTREF(__pyx_v_self->combine_fn_compact);
    __Pyx_DECREF(__pyx_v_self->combine_fn_compact);
    __pyx_v_self->combine_fn_compact = __pyx_t_5;
    __pyx_t_5 = 0;
  }
  __pyx_L5:;

  /* "apache_beam/runners/worker/operations.py":1249
 *     else:
 *       self.combine_fn_compact = self.combine_fn.compact
 *     if windowing:             # <<<<<<<<<<<<<<
 *       self.is_default_windowing = windowing.is_default()
 *       tsc_type = windowing.timestamp_combiner
 */
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_windowing); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1249, __pyx_L1_error)
  if (__pyx_t_9) {

    /* "apache_beam/runners/worker/operations.py":1250
 *       self.combine_fn_compact = self.combine_fn.compact
 *     if windowing:
 *       self.is_default_windowing = windowing.is_default()             # <<<<<<<<<<<<<<
 *       tsc_type = windowing.timestamp_combiner
 *       self.timestamp_combiner = (
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowing, __pyx_n_s_is_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __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_5 = (__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_5)) __PYX_ERR(0, 1250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1250, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_self->is_default_windowing = __pyx_t_9;

    /* "apache_beam/runners/worker/operations.py":1251
 *     if windowing:
 *       self.is_default_windowing = windowing.is_default()
 *       tsc_type = windowing.timestamp_combiner             # <<<<<<<<<<<<<<
 *       self.timestamp_combiner = (
 *           None if tsc_type == window.TimestampCombiner.OUTPUT_AT_EOW else
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowing, __pyx_n_s_timestamp_combiner); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_tsc_type = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "apache_beam/runners/worker/operations.py":1253
 *       tsc_type = windowing.timestamp_combiner
 *       self.timestamp_combiner = (
 *           None if tsc_type == window.TimestampCombiner.OUTPUT_AT_EOW else             # <<<<<<<<<<<<<<
 *           window.TimestampCombiner.get_impl(tsc_type, windowing.windowfn))
 *     else:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_window); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_TimestampCombiner); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1253, __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_OUTPUT_AT_EOW); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_tsc_type, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1253, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1253, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_9) {
      __Pyx_INCREF(Py_None);
      __pyx_t_5 = Py_None;
    } else {

      /* "apache_beam/runners/worker/operations.py":1254
 *       self.timestamp_combiner = (
 *           None if tsc_type == window.TimestampCombiner.OUTPUT_AT_EOW else
 *           window.TimestampCombiner.get_impl(tsc_type, windowing.windowfn))             # <<<<<<<<<<<<<<
 *     else:
 *       self.is_default_windowing = False  # unknown
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_window); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1254, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_TimestampCombiner); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1254, __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_get_impl); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1254, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowing, __pyx_n_s_windowfn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1254, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = NULL;
      __pyx_t_4 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_4 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_tsc_type, __pyx_t_2};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1254, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 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_6, __pyx_v_tsc_type, __pyx_t_2};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1254, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else
      #endif
      {
        __pyx_t_10 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1254, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        if (__pyx_t_6) {
          __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_6); __pyx_t_6 = NULL;
        }
        __Pyx_INCREF(__pyx_v_tsc_type);
        __Pyx_GIVEREF(__pyx_v_tsc_type);
        PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_4, __pyx_v_tsc_type);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_4, __pyx_t_2);
        __pyx_t_2 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1254, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_5 = __pyx_t_1;
      __pyx_t_1 = 0;
    }

    /* "apache_beam/runners/worker/operations.py":1252
 *       self.is_default_windowing = windowing.is_default()
 *       tsc_type = windowing.timestamp_combiner
 *       self.timestamp_combiner = (             # <<<<<<<<<<<<<<
 *           None if tsc_type == window.TimestampCombiner.OUTPUT_AT_EOW else
 *           window.TimestampCombiner.get_impl(tsc_type, windowing.windowfn))
 */
    __Pyx_GIVEREF(__pyx_t_5);
    __Pyx_GOTREF(__pyx_v_self->timestamp_combiner);
    __Pyx_DECREF(__pyx_v_self->timestamp_combiner);
    __pyx_v_self->timestamp_combiner = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "apache_beam/runners/worker/operations.py":1249
 *     else:
 *       self.combine_fn_compact = self.combine_fn.compact
 *     if windowing:             # <<<<<<<<<<<<<<
 *       self.is_default_windowing = windowing.is_default()
 *       tsc_type = windowing.timestamp_combiner
 */
    goto __pyx_L6;
  }

  /* "apache_beam/runners/worker/operations.py":1256
 *           window.TimestampCombiner.get_impl(tsc_type, windowing.windowfn))
 *     else:
 *       self.is_default_windowing = False  # unknown             # <<<<<<<<<<<<<<
 *       self.timestamp_combiner = None
 *     # Optimization for the (known tiny accumulator, often wide keyspace)
 */
  /*else*/ {
    __pyx_v_self->is_default_windowing = 0;

    /* "apache_beam/runners/worker/operations.py":1257
 *     else:
 *       self.is_default_windowing = False  # unknown
 *       self.timestamp_combiner = None             # <<<<<<<<<<<<<<
 *     # Optimization for the (known tiny accumulator, often wide keyspace)
 *     # combine functions.
 */
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    __Pyx_GOTREF(__pyx_v_self->timestamp_combiner);
    __Pyx_DECREF(__pyx_v_self->timestamp_combiner);
    __pyx_v_self->timestamp_combiner = Py_None;
  }
  __pyx_L6:;

  /* "apache_beam/runners/worker/operations.py":1263
 *     self.max_keys = (
 *         1000 * 1000 if
 *         isinstance(fn, (combiners.CountCombineFn, combiners.MeanCombineFn)) or             # <<<<<<<<<<<<<<
 *         # TODO(b/36597732): Replace this 'or' part by adding the 'cy' optimized
 *         # combiners to the short list above.
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_combiners); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_CountCombineFn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_combiners); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_MeanCombineFn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_12 = PyObject_IsInstance(__pyx_v_fn, __pyx_t_1); 
  __pyx_t_13 = (__pyx_t_12 != 0);
  if (!__pyx_t_13) {
  } else {
    __pyx_t_8 = __pyx_t_13;
    goto __pyx_L9_bool_binop_done;
  }
  __pyx_t_13 = PyObject_IsInstance(__pyx_v_fn, __pyx_t_3); 
  __pyx_t_12 = (__pyx_t_13 != 0);
  __pyx_t_8 = __pyx_t_12;
  __pyx_L9_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_12 = (__pyx_t_8 != 0);
  if (!__pyx_t_12) {
  } else {
    __pyx_t_9 = __pyx_t_12;
    goto __pyx_L7_bool_binop_done;
  }

  /* "apache_beam/runners/worker/operations.py":1267
 *         # combiners to the short list above.
 *         (
 *             isinstance(fn, core.CallableWrapperCombineFn) and             # <<<<<<<<<<<<<<
 *             fn._fn in (min, max, sum)) else 100 * 1000)  # pylint: disable=protected-access
 *     self.key_count = 0
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_core); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_CallableWrapperCombineFn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_12 = PyObject_IsInstance(__pyx_v_fn, __pyx_t_3); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 1267, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_8 = (__pyx_t_12 != 0);
  if (__pyx_t_8) {
  } else {
    __pyx_t_9 = __pyx_t_8;
    goto __pyx_L7_bool_binop_done;
  }

  /* "apache_beam/runners/worker/operations.py":1268
 *         (
 *             isinstance(fn, core.CallableWrapperCombineFn) and
 *             fn._fn in (min, max, sum)) else 100 * 1000)  # pylint: disable=protected-access             # <<<<<<<<<<<<<<
 *     self.key_count = 0
 *     self.table = {}
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_fn, __pyx_n_s_fn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_builtin_min, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1268, __pyx_L1_error)
  __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1268, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!__pyx_t_12) {
  } else {
    __pyx_t_8 = __pyx_t_12;
    goto __pyx_L12_bool_binop_done;
  }
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_builtin_max, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1268, __pyx_L1_error)
  __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1268, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!__pyx_t_12) {
  } else {
    __pyx_t_8 = __pyx_t_12;
    goto __pyx_L12_bool_binop_done;
  }
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_builtin_sum, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1268, __pyx_L1_error)
  __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1268, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = __pyx_t_12;
  __pyx_L12_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_12 = (__pyx_t_8 != 0);
  __pyx_t_9 = __pyx_t_12;
  __pyx_L7_bool_binop_done:;
  if (__pyx_t_9) {
    __pyx_t_11 = 0xF4240;
  } else {
    __pyx_t_11 = 0x186A0;
  }

  /* "apache_beam/runners/worker/operations.py":1261
 *     # combine functions.
 *     # TODO(b/36567833): Bound by in-memory size rather than key count.
 *     self.max_keys = (             # <<<<<<<<<<<<<<
 *         1000 * 1000 if
 *         isinstance(fn, (combiners.CountCombineFn, combiners.MeanCombineFn)) or
 */
  __pyx_v_self->max_keys = __pyx_t_11;

  /* "apache_beam/runners/worker/operations.py":1269
 *             isinstance(fn, core.CallableWrapperCombineFn) and
 *             fn._fn in (min, max, sum)) else 100 * 1000)  # pylint: disable=protected-access
 *     self.key_count = 0             # <<<<<<<<<<<<<<
 *     self.table = {}
 * 
 */
  __pyx_v_self->key_count = 0;

  /* "apache_beam/runners/worker/operations.py":1270
 *             fn._fn in (min, max, sum)) else 100 * 1000)  # pylint: disable=protected-access
 *     self.key_count = 0
 *     self.table = {}             # <<<<<<<<<<<<<<
 * 
 *   def setup(self, data_sampler=None):
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->table);
  __Pyx_DECREF(__pyx_v_self->table);
  __pyx_v_self->table = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "apache_beam/runners/worker/operations.py":1235
 * 
 * class PGBKCVOperation(Operation):
 *   def __init__(             # <<<<<<<<<<<<<<
 *       self, name_context, spec, counter_factory, state_sampler, windowing=None):
 *     super(PGBKCVOperation,
 */

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fn);
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_XDECREF(__pyx_v_tsc_type);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":1272
 *     self.table = {}
 * 
 *   def setup(self, data_sampler=None):             # <<<<<<<<<<<<<<
 *     # type: (Optional[DataSampler]) -> None
 *     with self.scoped_start_state:
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_3setup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_3setup = {"setup", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_3setup, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_3setup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data_sampler = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setup (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data_sampler,0};
    PyObject* values[1] = {0};
    values[0] = ((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  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_data_sampler);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setup") < 0)) __PYX_ERR(0, 1272, __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_data_sampler = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setup", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1272, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.setup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_2setup(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self), __pyx_v_data_sampler);

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_2setup(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_data_sampler) {
  PyObject *__pyx_r = NULL;
  __Pyx_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;
  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__109)
  __Pyx_RefNannySetupContext("setup", 0);
  __Pyx_TraceCall("setup", __pyx_f[0], 1272, 0, __PYX_ERR(0, 1272, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":1274
 *   def setup(self, data_sampler=None):
 *     # type: (Optional[DataSampler]) -> None
 *     with self.scoped_start_state:             # <<<<<<<<<<<<<<
 *       _LOGGER.debug('Setup called for %s', self)
 *       super(PGBKCVOperation, self).setup(data_sampler)
 */
  /*with:*/ {
    __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_start_state, __pyx_n_s_exit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1274, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_start_state, __pyx_n_s_enter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1274, __pyx_L3_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_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, 1274, __pyx_L3_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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/worker/operations.py":1275
 *     # type: (Optional[DataSampler]) -> None
 *     with self.scoped_start_state:
 *       _LOGGER.debug('Setup called for %s', self)             # <<<<<<<<<<<<<<
 *       super(PGBKCVOperation, self).setup(data_sampler)
 *       self.combine_fn.setup()
 */
          __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_LOGGER); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1275, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_debug); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1275, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = NULL;
          __pyx_t_8 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(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_8 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_4)) {
            PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_kp_u_Setup_called_for_s, ((PyObject *)__pyx_v_self)};
            __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1275, __pyx_L7_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[3] = {__pyx_t_3, __pyx_kp_u_Setup_called_for_s, ((PyObject *)__pyx_v_self)};
            __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1275, __pyx_L7_error)
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_GOTREF(__pyx_t_2);
          } else
          #endif
          {
            __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1275, __pyx_L7_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_INCREF(__pyx_kp_u_Setup_called_for_s);
            __Pyx_GIVEREF(__pyx_kp_u_Setup_called_for_s);
            PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_kp_u_Setup_called_for_s);
            __Pyx_INCREF(((PyObject *)__pyx_v_self));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
            PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, ((PyObject *)__pyx_v_self));
            __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1275, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          }
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "apache_beam/runners/worker/operations.py":1276
 *     with self.scoped_start_state:
 *       _LOGGER.debug('Setup called for %s', self)
 *       super(PGBKCVOperation, self).setup(data_sampler)             # <<<<<<<<<<<<<<
 *       self.combine_fn.setup()
 * 
 */
          __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1276, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_INCREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation));
          __Pyx_GIVEREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation));
          PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation));
          __Pyx_INCREF(((PyObject *)__pyx_v_self));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
          PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_self));
          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1276, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_setup); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1276, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __pyx_t_9 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
            __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
            if (likely(__pyx_t_9)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_9);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_4, function);
            }
          }
          __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_9, __pyx_v_data_sampler) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_data_sampler);
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1276, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "apache_beam/runners/worker/operations.py":1277
 *       _LOGGER.debug('Setup called for %s', self)
 *       super(PGBKCVOperation, self).setup(data_sampler)
 *       self.combine_fn.setup()             # <<<<<<<<<<<<<<
 * 
 *   def process(self, wkv):
 */
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->combine_fn, __pyx_n_s_setup); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1277, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_9 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
            __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
            if (likely(__pyx_t_9)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_9);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_4, function);
            }
          }
          __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1277, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "apache_beam/runners/worker/operations.py":1274
 *   def setup(self, data_sampler=None):
 *     # type: (Optional[DataSampler]) -> None
 *     with self.scoped_start_state:             # <<<<<<<<<<<<<<
 *       _LOGGER.debug('Setup called for %s', self)
 *       super(PGBKCVOperation, self).setup(data_sampler)
 */
        }
        __Pyx_XDECREF(__pyx_t_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_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        /*except:*/ {
          __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.setup", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_9) < 0) __PYX_ERR(0, 1274, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_3 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_4, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1274, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1274, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (__pyx_t_11 < 0) __PYX_ERR(0, 1274, __pyx_L9_except_error)
          __pyx_t_12 = ((!(__pyx_t_11 != 0)) != 0);
          if (__pyx_t_12) {
            __Pyx_GIVEREF(__pyx_t_2);
            __Pyx_GIVEREF(__pyx_t_4);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_4, __pyx_t_9);
            __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_9 = 0; 
            __PYX_ERR(0, 1274, __pyx_L9_except_error)
          }
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          goto __pyx_L8_exception_handled;
        }
        __pyx_L9_except_error:;
        __Pyx_XGIVEREF(__pyx_t_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_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_1) {
          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__29, NULL);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1274, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        goto __pyx_L6;
      }
      __pyx_L6:;
    }
    goto __pyx_L16;
    __pyx_L3_error:;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L1_error;
    __pyx_L16:;
  }

  /* "apache_beam/runners/worker/operations.py":1272
 *     self.table = {}
 * 
 *   def setup(self, data_sampler=None):             # <<<<<<<<<<<<<<
 *     # type: (Optional[DataSampler]) -> None
 *     with self.scoped_start_state:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.setup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":1279
 *       self.combine_fn.setup()
 * 
 *   def process(self, wkv):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_5process(PyObject *__pyx_v_self, PyObject *__pyx_v_wkv); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_wkv, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_v_wkey = NULL;
  PyObject *__pyx_v_entry = NULL;
  long __pyx_v_target;
  PyObject *__pyx_v_old_wkeys = NULL;
  PyObject *__pyx_v_old_wkey = NULL;
  PyObject *__pyx_v_old_wvalue = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_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;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  int __pyx_t_10;
  int __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  int __pyx_t_16;
  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__110)
  __Pyx_RefNannySetupContext("process", 0);
  __Pyx_TraceCall("process", __pyx_f[0], 1279, 0, __PYX_ERR(0, 1279, __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, 1279, __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_6worker_10operations_15PGBKCVOperation_5process)) {
        __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_wkv)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_wkv));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1279, __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/worker/operations.py":1281
 *   def process(self, wkv):
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:             # <<<<<<<<<<<<<<
 *       key, value = wkv.value
 *       # pylint: disable=unidiomatic-typecheck
 */
  /*with:*/ {
    __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_process_state, __pyx_n_s_exit); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_process_state, __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1281, __pyx_L3_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, 1281, __pyx_L3_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:*/ {
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_6);
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_8);
        /*try:*/ {

          /* "apache_beam/runners/worker/operations.py":1282
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:
 *       key, value = wkv.value             # <<<<<<<<<<<<<<
 *       # pylint: disable=unidiomatic-typecheck
 *       # Optimization for the global window case.
 */
          __pyx_t_1 = __pyx_v_wkv->value;
          __Pyx_INCREF(__pyx_t_1);
          if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
            PyObject* sequence = __pyx_t_1;
            Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
            if (unlikely(size != 2)) {
              if (size > 2) __Pyx_RaiseTooManyValuesError(2);
              else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
              __PYX_ERR(0, 1282, __pyx_L7_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, 1282, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1282, __pyx_L7_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, 1282, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __pyx_t_9 = Py_TYPE(__pyx_t_4)->tp_iternext;
            index = 0; __pyx_t_2 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L13_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_2);
            index = 1; __pyx_t_3 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L13_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_3);
            if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1282, __pyx_L7_error)
            __pyx_t_9 = NULL;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            goto __pyx_L14_unpacking_done;
            __pyx_L13_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, 1282, __pyx_L7_error)
            __pyx_L14_unpacking_done:;
          }
          __pyx_v_key = __pyx_t_2;
          __pyx_t_2 = 0;
          __pyx_v_value = __pyx_t_3;
          __pyx_t_3 = 0;

          /* "apache_beam/runners/worker/operations.py":1285
 *       # pylint: disable=unidiomatic-typecheck
 *       # Optimization for the global window case.
 *       if self.is_default_windowing:             # <<<<<<<<<<<<<<
 *         wkey = key  # type: Hashable
 *       else:
 */
          __pyx_t_10 = (__pyx_v_self->is_default_windowing != 0);
          if (__pyx_t_10) {

            /* "apache_beam/runners/worker/operations.py":1286
 *       # Optimization for the global window case.
 *       if self.is_default_windowing:
 *         wkey = key  # type: Hashable             # <<<<<<<<<<<<<<
 *       else:
 *         wkey = tuple(wkv.windows), key
 */
            __Pyx_INCREF(__pyx_v_key);
            __pyx_v_wkey = __pyx_v_key;

            /* "apache_beam/runners/worker/operations.py":1285
 *       # pylint: disable=unidiomatic-typecheck
 *       # Optimization for the global window case.
 *       if self.is_default_windowing:             # <<<<<<<<<<<<<<
 *         wkey = key  # type: Hashable
 *       else:
 */
            goto __pyx_L15;
          }

          /* "apache_beam/runners/worker/operations.py":1288
 *         wkey = key  # type: Hashable
 *       else:
 *         wkey = tuple(wkv.windows), key             # <<<<<<<<<<<<<<
 *       entry = self.table.get(wkey, None)
 *       if entry is None:
 */
          /*else*/ {
            __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_v_wkv->windows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1288, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1288, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_GIVEREF(__pyx_t_1);
            PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
            __Pyx_INCREF(__pyx_v_key);
            __Pyx_GIVEREF(__pyx_v_key);
            PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_key);
            __pyx_t_1 = 0;
            __pyx_v_wkey = __pyx_t_3;
            __pyx_t_3 = 0;
          }
          __pyx_L15:;

          /* "apache_beam/runners/worker/operations.py":1289
 *       else:
 *         wkey = tuple(wkv.windows), key
 *       entry = self.table.get(wkey, None)             # <<<<<<<<<<<<<<
 *       if entry is None:
 *         if self.key_count >= self.max_keys:
 */
          if (unlikely(__pyx_v_self->table == Py_None)) {
            PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
            __PYX_ERR(0, 1289, __pyx_L7_error)
          }
          __pyx_t_3 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->table, __pyx_v_wkey, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1289, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_v_entry = __pyx_t_3;
          __pyx_t_3 = 0;

          /* "apache_beam/runners/worker/operations.py":1290
 *         wkey = tuple(wkv.windows), key
 *       entry = self.table.get(wkey, None)
 *       if entry is None:             # <<<<<<<<<<<<<<
 *         if self.key_count >= self.max_keys:
 *           target = self.key_count * 9 // 10
 */
          __pyx_t_10 = (__pyx_v_entry == Py_None);
          __pyx_t_11 = (__pyx_t_10 != 0);
          if (__pyx_t_11) {

            /* "apache_beam/runners/worker/operations.py":1291
 *       entry = self.table.get(wkey, None)
 *       if entry is None:
 *         if self.key_count >= self.max_keys:             # <<<<<<<<<<<<<<
 *           target = self.key_count * 9 // 10
 *           old_wkeys = []
 */
            __pyx_t_11 = ((__pyx_v_self->key_count >= __pyx_v_self->max_keys) != 0);
            if (__pyx_t_11) {

              /* "apache_beam/runners/worker/operations.py":1292
 *       if entry is None:
 *         if self.key_count >= self.max_keys:
 *           target = self.key_count * 9 // 10             # <<<<<<<<<<<<<<
 *           old_wkeys = []
 *           # TODO(robertwb): Use an LRU cache?
 */
              __pyx_v_target = __Pyx_div_long((__pyx_v_self->key_count * 9), 10);

              /* "apache_beam/runners/worker/operations.py":1293
 *         if self.key_count >= self.max_keys:
 *           target = self.key_count * 9 // 10
 *           old_wkeys = []             # <<<<<<<<<<<<<<
 *           # TODO(robertwb): Use an LRU cache?
 *           for old_wkey, old_wvalue in self.table.items():
 */
              __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1293, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_v_old_wkeys = ((PyObject*)__pyx_t_3);
              __pyx_t_3 = 0;

              /* "apache_beam/runners/worker/operations.py":1295
 *           old_wkeys = []
 *           # TODO(robertwb): Use an LRU cache?
 *           for old_wkey, old_wvalue in self.table.items():             # <<<<<<<<<<<<<<
 *             old_wkeys.append(old_wkey)  # Can't mutate while iterating.
 *             self.output_key(old_wkey, old_wvalue[0], old_wvalue[1])
 */
              __pyx_t_12 = 0;
              if (unlikely(__pyx_v_self->table == Py_None)) {
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
                __PYX_ERR(0, 1295, __pyx_L7_error)
              }
              __pyx_t_1 = __Pyx_dict_iterator(__pyx_v_self->table, 1, __pyx_n_s_items, (&__pyx_t_13), (&__pyx_t_14)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1295, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_XDECREF(__pyx_t_3);
              __pyx_t_3 = __pyx_t_1;
              __pyx_t_1 = 0;
              while (1) {
                __pyx_t_15 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_13, &__pyx_t_12, &__pyx_t_1, &__pyx_t_2, NULL, __pyx_t_14);
                if (unlikely(__pyx_t_15 == 0)) break;
                if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 1295, __pyx_L7_error)
                __Pyx_GOTREF(__pyx_t_1);
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_XDECREF_SET(__pyx_v_old_wkey, __pyx_t_1);
                __pyx_t_1 = 0;
                __Pyx_XDECREF_SET(__pyx_v_old_wvalue, __pyx_t_2);
                __pyx_t_2 = 0;

                /* "apache_beam/runners/worker/operations.py":1296
 *           # TODO(robertwb): Use an LRU cache?
 *           for old_wkey, old_wvalue in self.table.items():
 *             old_wkeys.append(old_wkey)  # Can't mutate while iterating.             # <<<<<<<<<<<<<<
 *             self.output_key(old_wkey, old_wvalue[0], old_wvalue[1])
 *             self.key_count -= 1
 */
                __pyx_t_16 = __Pyx_PyList_Append(__pyx_v_old_wkeys, __pyx_v_old_wkey); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 1296, __pyx_L7_error)

                /* "apache_beam/runners/worker/operations.py":1297
 *           for old_wkey, old_wvalue in self.table.items():
 *             old_wkeys.append(old_wkey)  # Can't mutate while iterating.
 *             self.output_key(old_wkey, old_wvalue[0], old_wvalue[1])             # <<<<<<<<<<<<<<
 *             self.key_count -= 1
 *             if self.key_count <= target:
 */
                __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_old_wvalue, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1297, __pyx_L7_error)
                __Pyx_GOTREF(__pyx_t_2);
                __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_old_wvalue, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1297, __pyx_L7_error)
                __Pyx_GOTREF(__pyx_t_1);
                __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self->__pyx_base.__pyx_vtab)->output_key(__pyx_v_self, __pyx_v_old_wkey, __pyx_t_2, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1297, __pyx_L7_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

                /* "apache_beam/runners/worker/operations.py":1298
 *             old_wkeys.append(old_wkey)  # Can't mutate while iterating.
 *             self.output_key(old_wkey, old_wvalue[0], old_wvalue[1])
 *             self.key_count -= 1             # <<<<<<<<<<<<<<
 *             if self.key_count <= target:
 *               break
 */
                __pyx_v_self->key_count = (__pyx_v_self->key_count - 1);

                /* "apache_beam/runners/worker/operations.py":1299
 *             self.output_key(old_wkey, old_wvalue[0], old_wvalue[1])
 *             self.key_count -= 1
 *             if self.key_count <= target:             # <<<<<<<<<<<<<<
 *               break
 *           for old_wkey in reversed(old_wkeys):
 */
                __pyx_t_11 = ((__pyx_v_self->key_count <= __pyx_v_target) != 0);
                if (__pyx_t_11) {

                  /* "apache_beam/runners/worker/operations.py":1300
 *             self.key_count -= 1
 *             if self.key_count <= target:
 *               break             # <<<<<<<<<<<<<<
 *           for old_wkey in reversed(old_wkeys):
 *             del self.table[old_wkey]
 */
                  goto __pyx_L19_break;

                  /* "apache_beam/runners/worker/operations.py":1299
 *             self.output_key(old_wkey, old_wvalue[0], old_wvalue[1])
 *             self.key_count -= 1
 *             if self.key_count <= target:             # <<<<<<<<<<<<<<
 *               break
 *           for old_wkey in reversed(old_wkeys):
 */
                }
              }
              __pyx_L19_break:;
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

              /* "apache_beam/runners/worker/operations.py":1301
 *             if self.key_count <= target:
 *               break
 *           for old_wkey in reversed(old_wkeys):             # <<<<<<<<<<<<<<
 *             del self.table[old_wkey]
 *         self.key_count += 1
 */
              __pyx_t_3 = __pyx_v_old_wkeys; __Pyx_INCREF(__pyx_t_3); __pyx_t_13 = PyList_GET_SIZE(__pyx_t_3) - 1;
              for (;;) {
                if (__pyx_t_13 < 0) break;
                if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_3)) break;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_13); __Pyx_INCREF(__pyx_t_4); __pyx_t_13--; if (unlikely(0 < 0)) __PYX_ERR(0, 1301, __pyx_L7_error)
                #else
                __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_13); __pyx_t_13--; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1301, __pyx_L7_error)
                __Pyx_GOTREF(__pyx_t_4);
                #endif
                __Pyx_XDECREF_SET(__pyx_v_old_wkey, __pyx_t_4);
                __pyx_t_4 = 0;

                /* "apache_beam/runners/worker/operations.py":1302
 *               break
 *           for old_wkey in reversed(old_wkeys):
 *             del self.table[old_wkey]             # <<<<<<<<<<<<<<
 *         self.key_count += 1
 *         # We save the accumulator as a one element list so we can efficiently
 */
                if (unlikely(__pyx_v_self->table == Py_None)) {
                  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
                  __PYX_ERR(0, 1302, __pyx_L7_error)
                }
                if (unlikely(PyDict_DelItem(__pyx_v_self->table, __pyx_v_old_wkey) < 0)) __PYX_ERR(0, 1302, __pyx_L7_error)

                /* "apache_beam/runners/worker/operations.py":1301
 *             if self.key_count <= target:
 *               break
 *           for old_wkey in reversed(old_wkeys):             # <<<<<<<<<<<<<<
 *             del self.table[old_wkey]
 *         self.key_count += 1
 */
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

              /* "apache_beam/runners/worker/operations.py":1291
 *       entry = self.table.get(wkey, None)
 *       if entry is None:
 *         if self.key_count >= self.max_keys:             # <<<<<<<<<<<<<<
 *           target = self.key_count * 9 // 10
 *           old_wkeys = []
 */
            }

            /* "apache_beam/runners/worker/operations.py":1303
 *           for old_wkey in reversed(old_wkeys):
 *             del self.table[old_wkey]
 *         self.key_count += 1             # <<<<<<<<<<<<<<
 *         # We save the accumulator as a one element list so we can efficiently
 *         # mutate when new values are added without searching the cache again.
 */
            __pyx_v_self->key_count = (__pyx_v_self->key_count + 1);

            /* "apache_beam/runners/worker/operations.py":1306
 *         # We save the accumulator as a one element list so we can efficiently
 *         # mutate when new values are added without searching the cache again.
 *         entry = self.table[wkey] = [self.combine_fn.create_accumulator(), None]             # <<<<<<<<<<<<<<
 *         if not self.is_default_windowing:
 *           # Conditional as the timestamp attribute is lazily initialized.
 */
            __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->combine_fn, __pyx_n_s_create_accumulator); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1306, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_1 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
              __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
              if (likely(__pyx_t_1)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
                __Pyx_INCREF(__pyx_t_1);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_4, function);
              }
            }
            __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1306, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1306, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_GIVEREF(__pyx_t_3);
            PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
            __Pyx_INCREF(Py_None);
            __Pyx_GIVEREF(Py_None);
            PyList_SET_ITEM(__pyx_t_4, 1, Py_None);
            __pyx_t_3 = 0;
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_DECREF_SET(__pyx_v_entry, __pyx_t_4);
            if (unlikely(__pyx_v_self->table == Py_None)) {
              PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
              __PYX_ERR(0, 1306, __pyx_L7_error)
            }
            if (unlikely(PyDict_SetItem(__pyx_v_self->table, __pyx_v_wkey, __pyx_t_4) < 0)) __PYX_ERR(0, 1306, __pyx_L7_error)
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "apache_beam/runners/worker/operations.py":1307
 *         # mutate when new values are added without searching the cache again.
 *         entry = self.table[wkey] = [self.combine_fn.create_accumulator(), None]
 *         if not self.is_default_windowing:             # <<<<<<<<<<<<<<
 *           # Conditional as the timestamp attribute is lazily initialized.
 *           entry[1] = wkv.timestamp
 */
            __pyx_t_11 = ((!(__pyx_v_self->is_default_windowing != 0)) != 0);
            if (__pyx_t_11) {

              /* "apache_beam/runners/worker/operations.py":1309
 *         if not self.is_default_windowing:
 *           # Conditional as the timestamp attribute is lazily initialized.
 *           entry[1] = wkv.timestamp             # <<<<<<<<<<<<<<
 *       entry[0] = self.combine_fn_add_input(entry[0], value)
 *       if not self.is_default_windowing and self.timestamp_combiner:
 */
              __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_wkv), __pyx_n_s_timestamp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1309, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_4);
              if (unlikely(__Pyx_SetItemInt(__pyx_v_entry, 1, __pyx_t_4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) __PYX_ERR(0, 1309, __pyx_L7_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "apache_beam/runners/worker/operations.py":1307
 *         # mutate when new values are added without searching the cache again.
 *         entry = self.table[wkey] = [self.combine_fn.create_accumulator(), None]
 *         if not self.is_default_windowing:             # <<<<<<<<<<<<<<
 *           # Conditional as the timestamp attribute is lazily initialized.
 *           entry[1] = wkv.timestamp
 */
            }

            /* "apache_beam/runners/worker/operations.py":1290
 *         wkey = tuple(wkv.windows), key
 *       entry = self.table.get(wkey, None)
 *       if entry is None:             # <<<<<<<<<<<<<<
 *         if self.key_count >= self.max_keys:
 *           target = self.key_count * 9 // 10
 */
          }

          /* "apache_beam/runners/worker/operations.py":1310
 *           # Conditional as the timestamp attribute is lazily initialized.
 *           entry[1] = wkv.timestamp
 *       entry[0] = self.combine_fn_add_input(entry[0], value)             # <<<<<<<<<<<<<<
 *       if not self.is_default_windowing and self.timestamp_combiner:
 *         entry[1] = self.timestamp_combiner.combine(entry[1], wkv.timestamp)
 */
          __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_entry, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1310, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_INCREF(__pyx_v_self->combine_fn_add_input);
          __pyx_t_1 = __pyx_v_self->combine_fn_add_input; __pyx_t_2 = NULL;
          __pyx_t_14 = 0;
          if (CYTHON_UNPACK_METHODS && likely(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_14 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_1)) {
            PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_3, __pyx_v_value};
            __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1310, __pyx_L7_error)
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
            PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_3, __pyx_v_value};
            __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1310, __pyx_L7_error)
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          } else
          #endif
          {
            __pyx_t_17 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1310, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_17);
            if (__pyx_t_2) {
              __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_2); __pyx_t_2 = NULL;
            }
            __Pyx_GIVEREF(__pyx_t_3);
            PyTuple_SET_ITEM(__pyx_t_17, 0+__pyx_t_14, __pyx_t_3);
            __Pyx_INCREF(__pyx_v_value);
            __Pyx_GIVEREF(__pyx_v_value);
            PyTuple_SET_ITEM(__pyx_t_17, 1+__pyx_t_14, __pyx_v_value);
            __pyx_t_3 = 0;
            __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_17, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1310, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
          }
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(__Pyx_SetItemInt(__pyx_v_entry, 0, __pyx_t_4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) __PYX_ERR(0, 1310, __pyx_L7_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "apache_beam/runners/worker/operations.py":1311
 *           entry[1] = wkv.timestamp
 *       entry[0] = self.combine_fn_add_input(entry[0], value)
 *       if not self.is_default_windowing and self.timestamp_combiner:             # <<<<<<<<<<<<<<
 *         entry[1] = self.timestamp_combiner.combine(entry[1], wkv.timestamp)
 * 
 */
          __pyx_t_10 = ((!(__pyx_v_self->is_default_windowing != 0)) != 0);
          if (__pyx_t_10) {
          } else {
            __pyx_t_11 = __pyx_t_10;
            goto __pyx_L25_bool_binop_done;
          }
          __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_self->timestamp_combiner); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1311, __pyx_L7_error)
          __pyx_t_11 = __pyx_t_10;
          __pyx_L25_bool_binop_done:;
          if (__pyx_t_11) {

            /* "apache_beam/runners/worker/operations.py":1312
 *       entry[0] = self.combine_fn_add_input(entry[0], value)
 *       if not self.is_default_windowing and self.timestamp_combiner:
 *         entry[1] = self.timestamp_combiner.combine(entry[1], wkv.timestamp)             # <<<<<<<<<<<<<<
 * 
 *   def finish(self):
 */
            __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->timestamp_combiner, __pyx_n_s_combine); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1312, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_17 = __Pyx_GetItemInt(__pyx_v_entry, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1312, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_17);
            __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_wkv), __pyx_n_s_timestamp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1312, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_2 = NULL;
            __pyx_t_14 = 0;
            if (CYTHON_UNPACK_METHODS && likely(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_14 = 1;
              }
            }
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_1)) {
              PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_17, __pyx_t_3};
              __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1312, __pyx_L7_error)
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_GOTREF(__pyx_t_4);
              __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            } else
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
              PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_17, __pyx_t_3};
              __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1312, __pyx_L7_error)
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_GOTREF(__pyx_t_4);
              __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            } else
            #endif
            {
              __pyx_t_18 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1312, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_18);
              if (__pyx_t_2) {
                __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_2); __pyx_t_2 = NULL;
              }
              __Pyx_GIVEREF(__pyx_t_17);
              PyTuple_SET_ITEM(__pyx_t_18, 0+__pyx_t_14, __pyx_t_17);
              __Pyx_GIVEREF(__pyx_t_3);
              PyTuple_SET_ITEM(__pyx_t_18, 1+__pyx_t_14, __pyx_t_3);
              __pyx_t_17 = 0;
              __pyx_t_3 = 0;
              __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_18, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1312, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_4);
              __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
            }
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            if (unlikely(__Pyx_SetItemInt(__pyx_v_entry, 1, __pyx_t_4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) __PYX_ERR(0, 1312, __pyx_L7_error)
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "apache_beam/runners/worker/operations.py":1311
 *           entry[1] = wkv.timestamp
 *       entry[0] = self.combine_fn_add_input(entry[0], value)
 *       if not self.is_default_windowing and self.timestamp_combiner:             # <<<<<<<<<<<<<<
 *         entry[1] = self.timestamp_combiner.combine(entry[1], wkv.timestamp)
 * 
 */
          }

          /* "apache_beam/runners/worker/operations.py":1281
 *   def process(self, wkv):
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:             # <<<<<<<<<<<<<<
 *       key, value = wkv.value
 *       # pylint: disable=unidiomatic-typecheck
 */
        }
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L12_try_end;
        __pyx_L7_error:;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
        __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        /*except:*/ {
          __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_1, &__pyx_t_18) < 0) __PYX_ERR(0, 1281, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GOTREF(__pyx_t_18);
          __pyx_t_3 = PyTuple_Pack(3, __pyx_t_4, __pyx_t_1, __pyx_t_18); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1281, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_19 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1281, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_19);
          __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_19);
          __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
          if (__pyx_t_11 < 0) __PYX_ERR(0, 1281, __pyx_L9_except_error)
          __pyx_t_10 = ((!(__pyx_t_11 != 0)) != 0);
          if (__pyx_t_10) {
            __Pyx_GIVEREF(__pyx_t_4);
            __Pyx_GIVEREF(__pyx_t_1);
            __Pyx_XGIVEREF(__pyx_t_18);
            __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_1, __pyx_t_18);
            __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_t_18 = 0; 
            __PYX_ERR(0, 1281, __pyx_L9_except_error)
          }
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
          goto __pyx_L8_exception_handled;
        }
        __pyx_L9_except_error:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        goto __pyx_L1_error;
        __pyx_L8_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        __pyx_L12_try_end:;
      }
    }
    /*finally:*/ {
      /*normal exit:*/{
        if (__pyx_t_5) {
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__29, NULL);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1281, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        goto __pyx_L6;
      }
      __pyx_L6:;
    }
    goto __pyx_L30;
    __pyx_L3_error:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L1_error;
    __pyx_L30:;
  }

  /* "apache_beam/runners/worker/operations.py":1279
 *       self.combine_fn.setup()
 * 
 *   def process(self, wkv):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_wkey);
  __Pyx_XDECREF(__pyx_v_entry);
  __Pyx_XDECREF(__pyx_v_old_wkeys);
  __Pyx_XDECREF(__pyx_v_old_wkey);
  __Pyx_XDECREF(__pyx_v_old_wvalue);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_5process(PyObject *__pyx_v_self, PyObject *__pyx_v_wkv); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_5process = {"process", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_5process, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_5process(PyObject *__pyx_v_self, PyObject *__pyx_v_wkv) {
  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_wkv), __pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, 1, "wkv", 0))) __PYX_ERR(0, 1279, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_4process(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self), ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_v_wkv));

  /* 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_6worker_10operations_15PGBKCVOperation_4process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_wkv) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__110)
  __Pyx_RefNannySetupContext("process", 0);
  __Pyx_TraceCall("process (wrapper)", __pyx_f[0], 1279, 0, __PYX_ERR(0, 1279, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_process(__pyx_v_self, __pyx_v_wkv, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":1314
 *         entry[1] = self.timestamp_combiner.combine(entry[1], wkv.timestamp)
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     for wkey, value in self.table.items():
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_7finish(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_wkey = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__111)
  __Pyx_RefNannySetupContext("finish", 0);
  __Pyx_TraceCall("finish", __pyx_f[0], 1314, 0, __PYX_ERR(0, 1314, __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_finish); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1314, __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_6worker_10operations_15PGBKCVOperation_7finish)) {
        __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, 1314, __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/worker/operations.py":1316
 *   def finish(self):
 *     # type: () -> None
 *     for wkey, value in self.table.items():             # <<<<<<<<<<<<<<
 *       self.output_key(wkey, value[0], value[1])
 *     self.table = {}
 */
  __pyx_t_5 = 0;
  if (unlikely(__pyx_v_self->table == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
    __PYX_ERR(0, 1316, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_self->table, 1, __pyx_n_s_items, (&__pyx_t_6), (&__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_1);
  __pyx_t_1 = __pyx_t_2;
  __pyx_t_2 = 0;
  while (1) {
    __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_6, &__pyx_t_5, &__pyx_t_2, &__pyx_t_3, NULL, __pyx_t_7);
    if (unlikely(__pyx_t_8 == 0)) break;
    if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 1316, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_wkey, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "apache_beam/runners/worker/operations.py":1317
 *     # type: () -> None
 *     for wkey, value in self.table.items():
 *       self.output_key(wkey, value[0], value[1])             # <<<<<<<<<<<<<<
 *     self.table = {}
 *     self.key_count = 0
 */
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1317, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_value, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1317, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self->__pyx_base.__pyx_vtab)->output_key(__pyx_v_self, __pyx_v_wkey, __pyx_t_3, __pyx_t_2, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1317, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":1318
 *     for wkey, value in self.table.items():
 *       self.output_key(wkey, value[0], value[1])
 *     self.table = {}             # <<<<<<<<<<<<<<
 *     self.key_count = 0
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->table);
  __Pyx_DECREF(__pyx_v_self->table);
  __pyx_v_self->table = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":1319
 *       self.output_key(wkey, value[0], value[1])
 *     self.table = {}
 *     self.key_count = 0             # <<<<<<<<<<<<<<
 * 
 *   def teardown(self):
 */
  __pyx_v_self->key_count = 0;

  /* "apache_beam/runners/worker/operations.py":1314
 *         entry[1] = self.timestamp_combiner.combine(entry[1], wkv.timestamp)
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     for wkey, value in self.table.items():
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.finish", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_wkey);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_7finish(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_7finish = {"finish", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_7finish, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_7finish(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_6worker_10operations_15PGBKCVOperation_6finish(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_6finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__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__111)
  __Pyx_RefNannySetupContext("finish", 0);
  __Pyx_TraceCall("finish (wrapper)", __pyx_f[0], 1314, 0, __PYX_ERR(0, 1314, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_finish(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.finish", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":1321
 *     self.key_count = 0
 * 
 *   def teardown(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     with self.scoped_finish_state:
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_9teardown(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_teardown(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_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;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  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__112)
  __Pyx_RefNannySetupContext("teardown", 0);
  __Pyx_TraceCall("teardown", __pyx_f[0], 1321, 0, __PYX_ERR(0, 1321, __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_teardown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1321, __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_6worker_10operations_15PGBKCVOperation_9teardown)) {
        __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, 1321, __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/worker/operations.py":1323
 *   def teardown(self):
 *     # type: () -> None
 *     with self.scoped_finish_state:             # <<<<<<<<<<<<<<
 *       _LOGGER.debug('Teardown called for %s', self)
 *       super(PGBKCVOperation, self).teardown()
 */
  /*with:*/ {
    __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_finish_state, __pyx_n_s_exit); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_finish_state, __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1323, __pyx_L3_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, 1323, __pyx_L3_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:*/ {
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_6);
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_8);
        /*try:*/ {

          /* "apache_beam/runners/worker/operations.py":1324
 *     # type: () -> None
 *     with self.scoped_finish_state:
 *       _LOGGER.debug('Teardown called for %s', self)             # <<<<<<<<<<<<<<
 *       super(PGBKCVOperation, self).teardown()
 *       self.combine_fn.teardown()
 */
          __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_LOGGER); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1324, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_debug); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1324, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = NULL;
          __pyx_t_9 = 0;
          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_9 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_3)) {
            PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_kp_u_Teardown_called_for_s, ((PyObject *)__pyx_v_self)};
            __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1324, __pyx_L7_error)
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_GOTREF(__pyx_t_1);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
            PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_kp_u_Teardown_called_for_s, ((PyObject *)__pyx_v_self)};
            __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1324, __pyx_L7_error)
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_GOTREF(__pyx_t_1);
          } else
          #endif
          {
            __pyx_t_4 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1324, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_4);
            if (__pyx_t_2) {
              __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
            }
            __Pyx_INCREF(__pyx_kp_u_Teardown_called_for_s);
            __Pyx_GIVEREF(__pyx_kp_u_Teardown_called_for_s);
            PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_9, __pyx_kp_u_Teardown_called_for_s);
            __Pyx_INCREF(((PyObject *)__pyx_v_self));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
            PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_9, ((PyObject *)__pyx_v_self));
            __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1324, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          }
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "apache_beam/runners/worker/operations.py":1325
 *     with self.scoped_finish_state:
 *       _LOGGER.debug('Teardown called for %s', self)
 *       super(PGBKCVOperation, self).teardown()             # <<<<<<<<<<<<<<
 *       self.combine_fn.teardown()
 * 
 */
          __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1325, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_INCREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation));
          __Pyx_GIVEREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation));
          PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation));
          __Pyx_INCREF(((PyObject *)__pyx_v_self));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
          PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self));
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1325, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_teardown); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1325, __pyx_L7_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_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, 1325, __pyx_L7_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/worker/operations.py":1326
 *       _LOGGER.debug('Teardown called for %s', self)
 *       super(PGBKCVOperation, self).teardown()
 *       self.combine_fn.teardown()             # <<<<<<<<<<<<<<
 * 
 *   def output_key(self, wkey, accumulator, timestamp):
 */
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->combine_fn, __pyx_n_s_teardown); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1326, __pyx_L7_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, 1326, __pyx_L7_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/worker/operations.py":1323
 *   def teardown(self):
 *     # type: () -> None
 *     with self.scoped_finish_state:             # <<<<<<<<<<<<<<
 *       _LOGGER.debug('Teardown called for %s', self)
 *       super(PGBKCVOperation, self).teardown()
 */
        }
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L12_try_end;
        __pyx_L7_error:;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        /*except:*/ {
          __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.teardown", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_4) < 0) __PYX_ERR(0, 1323, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_2 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1323, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1323, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (__pyx_t_11 < 0) __PYX_ERR(0, 1323, __pyx_L9_except_error)
          __pyx_t_12 = ((!(__pyx_t_11 != 0)) != 0);
          if (__pyx_t_12) {
            __Pyx_GIVEREF(__pyx_t_1);
            __Pyx_GIVEREF(__pyx_t_3);
            __Pyx_XGIVEREF(__pyx_t_4);
            __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_3, __pyx_t_4);
            __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; 
            __PYX_ERR(0, 1323, __pyx_L9_except_error)
          }
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          goto __pyx_L8_exception_handled;
        }
        __pyx_L9_except_error:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        goto __pyx_L1_error;
        __pyx_L8_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        __pyx_L12_try_end:;
      }
    }
    /*finally:*/ {
      /*normal exit:*/{
        if (__pyx_t_5) {
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__29, NULL);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1323, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        goto __pyx_L6;
      }
      __pyx_L6:;
    }
    goto __pyx_L16;
    __pyx_L3_error:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L1_error;
    __pyx_L16:;
  }

  /* "apache_beam/runners/worker/operations.py":1321
 *     self.key_count = 0
 * 
 *   def teardown(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     with self.scoped_finish_state:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.teardown", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_9teardown(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_9teardown = {"teardown", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_9teardown, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_9teardown(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_6worker_10operations_15PGBKCVOperation_8teardown(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_8teardown(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__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__112)
  __Pyx_RefNannySetupContext("teardown", 0);
  __Pyx_TraceCall("teardown (wrapper)", __pyx_f[0], 1321, 0, __PYX_ERR(0, 1321, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_teardown(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.teardown", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":1328
 *       self.combine_fn.teardown()
 * 
 *   def output_key(self, wkey, accumulator, timestamp):             # <<<<<<<<<<<<<<
 *     if self.combine_fn_compact is None:
 *       value = accumulator
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_11output_key(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_output_key(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_wkey, PyObject *__pyx_v_accumulator, PyObject *__pyx_v_timestamp, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_v_windows = NULL;
  PyObject *__pyx_v_key = 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)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__113)
  __Pyx_RefNannySetupContext("output_key", 0);
  __Pyx_TraceCall("output_key", __pyx_f[0], 1328, 0, __PYX_ERR(0, 1328, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_timestamp);
  /* 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_output_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1328, __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_6worker_10operations_15PGBKCVOperation_11output_key)) {
        __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, __pyx_v_wkey, __pyx_v_accumulator, __pyx_v_timestamp};
          __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, 1328, __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, __pyx_v_wkey, __pyx_v_accumulator, __pyx_v_timestamp};
          __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, 1328, __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, 1328, __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_wkey);
          __Pyx_GIVEREF(__pyx_v_wkey);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_wkey);
          __Pyx_INCREF(__pyx_v_accumulator);
          __Pyx_GIVEREF(__pyx_v_accumulator);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_accumulator);
          __Pyx_INCREF(__pyx_v_timestamp);
          __Pyx_GIVEREF(__pyx_v_timestamp);
          PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_timestamp);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1328, __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/worker/operations.py":1329
 * 
 *   def output_key(self, wkey, accumulator, timestamp):
 *     if self.combine_fn_compact is None:             # <<<<<<<<<<<<<<
 *       value = accumulator
 *     else:
 */
  __pyx_t_7 = (__pyx_v_self->combine_fn_compact == Py_None);
  __pyx_t_8 = (__pyx_t_7 != 0);
  if (__pyx_t_8) {

    /* "apache_beam/runners/worker/operations.py":1330
 *   def output_key(self, wkey, accumulator, timestamp):
 *     if self.combine_fn_compact is None:
 *       value = accumulator             # <<<<<<<<<<<<<<
 *     else:
 *       value = self.combine_fn_compact(accumulator)
 */
    __Pyx_INCREF(__pyx_v_accumulator);
    __pyx_v_value = __pyx_v_accumulator;

    /* "apache_beam/runners/worker/operations.py":1329
 * 
 *   def output_key(self, wkey, accumulator, timestamp):
 *     if self.combine_fn_compact is None:             # <<<<<<<<<<<<<<
 *       value = accumulator
 *     else:
 */
    goto __pyx_L3;
  }

  /* "apache_beam/runners/worker/operations.py":1332
 *       value = accumulator
 *     else:
 *       value = self.combine_fn_compact(accumulator)             # <<<<<<<<<<<<<<
 * 
 *     if self.is_default_windowing:
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_v_self->combine_fn_compact);
    __pyx_t_2 = __pyx_v_self->combine_fn_compact; __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_accumulator) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_accumulator);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1332, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_value = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "apache_beam/runners/worker/operations.py":1334
 *       value = self.combine_fn_compact(accumulator)
 * 
 *     if self.is_default_windowing:             # <<<<<<<<<<<<<<
 *       self.output(_globally_windowed_value.with_value((wkey, value)))
 *     else:
 */
  __pyx_t_8 = (__pyx_v_self->is_default_windowing != 0);
  if (__pyx_t_8) {

    /* "apache_beam/runners/worker/operations.py":1335
 * 
 *     if self.is_default_windowing:
 *       self.output(_globally_windowed_value.with_value((wkey, value)))             # <<<<<<<<<<<<<<
 *     else:
 *       windows, key = wkey
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1335, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_wkey);
    __Pyx_GIVEREF(__pyx_v_wkey);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_wkey);
    __Pyx_INCREF(__pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_value);
    __pyx_t_2 = ((PyObject *)((struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_v_11apache_beam_7runners_6worker_10operations__globally_windowed_value->__pyx_vtab)->with_value(__pyx_v_11apache_beam_7runners_6worker_10operations__globally_windowed_value, __pyx_t_1, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1335, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.output(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_t_2), 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1335, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/runners/worker/operations.py":1334
 *       value = self.combine_fn_compact(accumulator)
 * 
 *     if self.is_default_windowing:             # <<<<<<<<<<<<<<
 *       self.output(_globally_windowed_value.with_value((wkey, value)))
 *     else:
 */
    goto __pyx_L4;
  }

  /* "apache_beam/runners/worker/operations.py":1337
 *       self.output(_globally_windowed_value.with_value((wkey, value)))
 *     else:
 *       windows, key = wkey             # <<<<<<<<<<<<<<
 *       if self.timestamp_combiner is None:
 *         timestamp = windows[0].max_timestamp()
 */
  /*else*/ {
    if ((likely(PyTuple_CheckExact(__pyx_v_wkey))) || (PyList_CheckExact(__pyx_v_wkey))) {
      PyObject* sequence = __pyx_v_wkey;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 1337, __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_2 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      #else
      __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1337, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1337, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
    } else {
      Py_ssize_t index = -1;
      __pyx_t_3 = PyObject_GetIter(__pyx_v_wkey); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1337, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = Py_TYPE(__pyx_t_3)->tp_iternext;
      index = 0; __pyx_t_1 = __pyx_t_9(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_1);
      index = 1; __pyx_t_2 = __pyx_t_9(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_3), 2) < 0) __PYX_ERR(0, 1337, __pyx_L1_error)
      __pyx_t_9 = NULL;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_9 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 1337, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __pyx_v_windows = __pyx_t_1;
    __pyx_t_1 = 0;
    __pyx_v_key = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "apache_beam/runners/worker/operations.py":1338
 *     else:
 *       windows, key = wkey
 *       if self.timestamp_combiner is None:             # <<<<<<<<<<<<<<
 *         timestamp = windows[0].max_timestamp()
 *       self.output(WindowedValue((key, value), timestamp, windows))
 */
    __pyx_t_8 = (__pyx_v_self->timestamp_combiner == Py_None);
    __pyx_t_7 = (__pyx_t_8 != 0);
    if (__pyx_t_7) {

      /* "apache_beam/runners/worker/operations.py":1339
 *       windows, key = wkey
 *       if self.timestamp_combiner is None:
 *         timestamp = windows[0].max_timestamp()             # <<<<<<<<<<<<<<
 *       self.output(WindowedValue((key, value), timestamp, windows))
 * 
 */
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_windows, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1339, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_max_timestamp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1339, __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, 1339, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_timestamp, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "apache_beam/runners/worker/operations.py":1338
 *     else:
 *       windows, key = wkey
 *       if self.timestamp_combiner is None:             # <<<<<<<<<<<<<<
 *         timestamp = windows[0].max_timestamp()
 *       self.output(WindowedValue((key, value), timestamp, windows))
 */
    }

    /* "apache_beam/runners/worker/operations.py":1340
 *       if self.timestamp_combiner is None:
 *         timestamp = windows[0].max_timestamp()
 *       self.output(WindowedValue((key, value), timestamp, windows))             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_key);
    __Pyx_GIVEREF(__pyx_v_key);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_key);
    __Pyx_INCREF(__pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_value);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_timestamp);
    __Pyx_GIVEREF(__pyx_v_timestamp);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_timestamp);
    __Pyx_INCREF(__pyx_v_windows);
    __Pyx_GIVEREF(__pyx_v_windows);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_windows);
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.output(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_t_2), 0, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_L4:;

  /* "apache_beam/runners/worker/operations.py":1328
 *       self.combine_fn.teardown()
 * 
 *   def output_key(self, wkey, accumulator, timestamp):             # <<<<<<<<<<<<<<
 *     if self.combine_fn_compact is None:
 *       value = accumulator
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.output_key", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_windows);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_timestamp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_11output_key(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_11output_key = {"output_key", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_11output_key, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_11output_key(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_wkey = 0;
  PyObject *__pyx_v_accumulator = 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("output_key (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_wkey,&__pyx_n_s_accumulator,&__pyx_n_s_timestamp,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_wkey)) != 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_accumulator)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("output_key", 1, 3, 3, 1); __PYX_ERR(0, 1328, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timestamp)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("output_key", 1, 3, 3, 2); __PYX_ERR(0, 1328, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "output_key") < 0)) __PYX_ERR(0, 1328, __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_wkey = values[0];
    __pyx_v_accumulator = values[1];
    __pyx_v_timestamp = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("output_key", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1328, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.output_key", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10output_key(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self), __pyx_v_wkey, __pyx_v_accumulator, __pyx_v_timestamp);

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10output_key(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_wkey, PyObject *__pyx_v_accumulator, PyObject *__pyx_v_timestamp) {
  PyObject *__pyx_r = NULL;
  __Pyx_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("output_key", 0);
  __Pyx_TraceCall("output_key (wrapper)", __pyx_f[0], 1328, 0, __PYX_ERR(0, 1328, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_output_key(__pyx_v_self, __pyx_v_wkey, __pyx_v_accumulator, __pyx_v_timestamp, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.output_key", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.pxd":134
 * 
 * cdef class PGBKCVOperation(Operation):
 *   cdef public object combine_fn             # <<<<<<<<<<<<<<
 *   cdef public object combine_fn_add_input
 *   cdef public object combine_fn_compact
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10combine_fn_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10combine_fn_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10combine_fn___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10combine_fn___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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[1], 134, 0, __PYX_ERR(1, 134, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->combine_fn);
  __pyx_r = __pyx_v_self->combine_fn;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.combine_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_6worker_10operations_15PGBKCVOperation_10combine_fn_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10combine_fn_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10combine_fn_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10combine_fn_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_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[1], 134, 0, __PYX_ERR(1, 134, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->combine_fn);
  __Pyx_DECREF(__pyx_v_self->combine_fn);
  __pyx_v_self->combine_fn = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.combine_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_6worker_10operations_15PGBKCVOperation_10combine_fn_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10combine_fn_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10combine_fn_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self));

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10combine_fn_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self) {
  int __pyx_r;
  __Pyx_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[1], 134, 0, __PYX_ERR(1, 134, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->combine_fn);
  __Pyx_DECREF(__pyx_v_self->combine_fn);
  __pyx_v_self->combine_fn = Py_None;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.combine_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/worker/operations.pxd":135
 * cdef class PGBKCVOperation(Operation):
 *   cdef public object combine_fn
 *   cdef public object combine_fn_add_input             # <<<<<<<<<<<<<<
 *   cdef public object combine_fn_compact
 *   cdef public bint is_default_windowing
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20combine_fn_add_input_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20combine_fn_add_input_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20combine_fn_add_input___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20combine_fn_add_input___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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[1], 135, 0, __PYX_ERR(1, 135, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->combine_fn_add_input);
  __pyx_r = __pyx_v_self->combine_fn_add_input;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.combine_fn_add_input.__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_6worker_10operations_15PGBKCVOperation_20combine_fn_add_input_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20combine_fn_add_input_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20combine_fn_add_input_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20combine_fn_add_input_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_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[1], 135, 0, __PYX_ERR(1, 135, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->combine_fn_add_input);
  __Pyx_DECREF(__pyx_v_self->combine_fn_add_input);
  __pyx_v_self->combine_fn_add_input = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.combine_fn_add_input.__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_6worker_10operations_15PGBKCVOperation_20combine_fn_add_input_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20combine_fn_add_input_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20combine_fn_add_input_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self));

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20combine_fn_add_input_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self) {
  int __pyx_r;
  __Pyx_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[1], 135, 0, __PYX_ERR(1, 135, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->combine_fn_add_input);
  __Pyx_DECREF(__pyx_v_self->combine_fn_add_input);
  __pyx_v_self->combine_fn_add_input = Py_None;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.combine_fn_add_input.__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/worker/operations.pxd":136
 *   cdef public object combine_fn
 *   cdef public object combine_fn_add_input
 *   cdef public object combine_fn_compact             # <<<<<<<<<<<<<<
 *   cdef public bint is_default_windowing
 *   cdef public object timestamp_combiner
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18combine_fn_compact_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18combine_fn_compact_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18combine_fn_compact___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18combine_fn_compact___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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[1], 136, 0, __PYX_ERR(1, 136, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->combine_fn_compact);
  __pyx_r = __pyx_v_self->combine_fn_compact;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.combine_fn_compact.__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_6worker_10operations_15PGBKCVOperation_18combine_fn_compact_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18combine_fn_compact_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18combine_fn_compact_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18combine_fn_compact_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_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[1], 136, 0, __PYX_ERR(1, 136, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->combine_fn_compact);
  __Pyx_DECREF(__pyx_v_self->combine_fn_compact);
  __pyx_v_self->combine_fn_compact = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.combine_fn_compact.__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_6worker_10operations_15PGBKCVOperation_18combine_fn_compact_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18combine_fn_compact_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18combine_fn_compact_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self));

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18combine_fn_compact_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self) {
  int __pyx_r;
  __Pyx_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[1], 136, 0, __PYX_ERR(1, 136, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->combine_fn_compact);
  __Pyx_DECREF(__pyx_v_self->combine_fn_compact);
  __pyx_v_self->combine_fn_compact = Py_None;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.combine_fn_compact.__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/worker/operations.pxd":137
 *   cdef public object combine_fn_add_input
 *   cdef public object combine_fn_compact
 *   cdef public bint is_default_windowing             # <<<<<<<<<<<<<<
 *   cdef public object timestamp_combiner
 *   cdef dict table
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20is_default_windowing_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20is_default_windowing_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20is_default_windowing___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20is_default_windowing___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 137, 0, __PYX_ERR(1, 137, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->is_default_windowing); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.is_default_windowing.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20is_default_windowing_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20is_default_windowing_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20is_default_windowing_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20is_default_windowing_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 137, 0, __PYX_ERR(1, 137, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 137, __pyx_L1_error)
  __pyx_v_self->is_default_windowing = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.is_default_windowing.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.pxd":138
 *   cdef public object combine_fn_compact
 *   cdef public bint is_default_windowing
 *   cdef public object timestamp_combiner             # <<<<<<<<<<<<<<
 *   cdef dict table
 *   cdef long max_keys
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18timestamp_combiner_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18timestamp_combiner_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18timestamp_combiner___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18timestamp_combiner___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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[1], 138, 0, __PYX_ERR(1, 138, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->timestamp_combiner);
  __pyx_r = __pyx_v_self->timestamp_combiner;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.timestamp_combiner.__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_6worker_10operations_15PGBKCVOperation_18timestamp_combiner_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18timestamp_combiner_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18timestamp_combiner_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18timestamp_combiner_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_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[1], 138, 0, __PYX_ERR(1, 138, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->timestamp_combiner);
  __Pyx_DECREF(__pyx_v_self->timestamp_combiner);
  __pyx_v_self->timestamp_combiner = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.timestamp_combiner.__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_6worker_10operations_15PGBKCVOperation_18timestamp_combiner_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18timestamp_combiner_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18timestamp_combiner_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self));

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18timestamp_combiner_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self) {
  int __pyx_r;
  __Pyx_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[1], 138, 0, __PYX_ERR(1, 138, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->timestamp_combiner);
  __Pyx_DECREF(__pyx_v_self->timestamp_combiner);
  __pyx_v_self->timestamp_combiner = Py_None;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.timestamp_combiner.__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_6worker_10operations_15PGBKCVOperation_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_13__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_13__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_6worker_10operations_15PGBKCVOperation_12__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_12__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_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;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__114)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error));

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self.combine_fn, self.combine_fn_add_input, self.combine_fn_compact, self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.is_default_windowing, self.key_count, self.max_keys, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name, self.table, self.timestamp_combiner)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.debug_logging_enabled); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->is_default_windowing); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_self->key_count); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_v_self->max_keys); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.setup_done); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyTuple_New(24); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_v_self->combine_fn);
  __Pyx_GIVEREF(__pyx_v_self->combine_fn);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_self->combine_fn);
  __Pyx_INCREF(__pyx_v_self->combine_fn_add_input);
  __Pyx_GIVEREF(__pyx_v_self->combine_fn_add_input);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_self->combine_fn_add_input);
  __Pyx_INCREF(__pyx_v_self->combine_fn_compact);
  __Pyx_GIVEREF(__pyx_v_self->combine_fn_compact);
  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_self->combine_fn_compact);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.consumers);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.consumers);
  PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_v_self->__pyx_base.consumers);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.counter_factory);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.counter_factory);
  PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_v_self->__pyx_base.counter_factory);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.data_sampler);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.data_sampler);
  PyTuple_SET_ITEM(__pyx_t_6, 5, __pyx_v_self->__pyx_base.data_sampler);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_6, 6, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.execution_context);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.execution_context);
  PyTuple_SET_ITEM(__pyx_t_6, 7, __pyx_v_self->__pyx_base.execution_context);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_6, 8, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_6, 9, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_6, 10, __pyx_t_4);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.metrics_container);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.metrics_container);
  PyTuple_SET_ITEM(__pyx_t_6, 11, __pyx_v_self->__pyx_base.metrics_container);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.name_context);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.name_context);
  PyTuple_SET_ITEM(__pyx_t_6, 12, __pyx_v_self->__pyx_base.name_context);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.operation_name);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.operation_name);
  PyTuple_SET_ITEM(__pyx_t_6, 13, __pyx_v_self->__pyx_base.operation_name);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.receivers);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.receivers);
  PyTuple_SET_ITEM(__pyx_t_6, 14, __pyx_v_self->__pyx_base.receivers);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.scoped_finish_state);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.scoped_finish_state);
  PyTuple_SET_ITEM(__pyx_t_6, 15, __pyx_v_self->__pyx_base.scoped_finish_state);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.scoped_process_state);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.scoped_process_state);
  PyTuple_SET_ITEM(__pyx_t_6, 16, __pyx_v_self->__pyx_base.scoped_process_state);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.scoped_start_state);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.scoped_start_state);
  PyTuple_SET_ITEM(__pyx_t_6, 17, __pyx_v_self->__pyx_base.scoped_start_state);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 18, __pyx_t_5);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.spec);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.spec);
  PyTuple_SET_ITEM(__pyx_t_6, 19, __pyx_v_self->__pyx_base.spec);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.state_sampler);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.state_sampler);
  PyTuple_SET_ITEM(__pyx_t_6, 20, __pyx_v_self->__pyx_base.state_sampler);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.step_name);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.step_name);
  PyTuple_SET_ITEM(__pyx_t_6, 21, __pyx_v_self->__pyx_base.step_name);
  __Pyx_INCREF(__pyx_v_self->table);
  __Pyx_GIVEREF(__pyx_v_self->table);
  PyTuple_SET_ITEM(__pyx_t_6, 22, __pyx_v_self->table);
  __Pyx_INCREF(__pyx_v_self->timestamp_combiner);
  __Pyx_GIVEREF(__pyx_v_self->timestamp_combiner);
  PyTuple_SET_ITEM(__pyx_t_6, 23, __pyx_v_self->timestamp_combiner);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self.combine_fn, self.combine_fn_add_input, self.combine_fn_compact, self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.is_default_windowing, self.key_count, self.max_keys, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name, self.table, self.timestamp_combiner)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_6 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v__dict = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "(tree fragment)":7
 *     state = (self.combine_fn, self.combine_fn_add_input, self.combine_fn_compact, self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.is_default_windowing, self.key_count, self.max_keys, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name, self.table, self.timestamp_combiner)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_7 = (__pyx_v__dict != Py_None);
  __pyx_t_8 = (__pyx_t_7 != 0);
  if (__pyx_t_8) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v__dict);
    __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_5));
    __pyx_t_5 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.combine_fn is not None or self.combine_fn_add_input is not None or self.combine_fn_compact is not None or self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.table is not None or self.timestamp_combiner is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self.combine_fn, self.combine_fn_add_input, self.combine_fn_compact, self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.is_default_windowing, self.key_count, self.max_keys, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name, self.table, self.timestamp_combiner)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.combine_fn is not None or self.combine_fn_add_input is not None or self.combine_fn_compact is not None or self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.table is not None or self.timestamp_combiner is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_PGBKCVOperation, (type(self), 0xf08ce62, None), state
 */
  /*else*/ {
    __pyx_t_7 = (__pyx_v_self->combine_fn != Py_None);
    __pyx_t_9 = (__pyx_t_7 != 0);
    if (!__pyx_t_9) {
    } else {
      __pyx_t_8 = __pyx_t_9;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_9 = (__pyx_v_self->combine_fn_add_input != Py_None);
    __pyx_t_7 = (__pyx_t_9 != 0);
    if (!__pyx_t_7) {
    } else {
      __pyx_t_8 = __pyx_t_7;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_7 = (__pyx_v_self->combine_fn_compact != Py_None);
    __pyx_t_9 = (__pyx_t_7 != 0);
    if (!__pyx_t_9) {
    } else {
      __pyx_t_8 = __pyx_t_9;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_9 = (__pyx_v_self->__pyx_base.consumers != Py_None);
    __pyx_t_7 = (__pyx_t_9 != 0);
    if (!__pyx_t_7) {
    } else {
      __pyx_t_8 = __pyx_t_7;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_7 = (__pyx_v_self->__pyx_base.counter_factory != Py_None);
    __pyx_t_9 = (__pyx_t_7 != 0);
    if (!__pyx_t_9) {
    } else {
      __pyx_t_8 = __pyx_t_9;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_9 = (__pyx_v_self->__pyx_base.data_sampler != Py_None);
    __pyx_t_7 = (__pyx_t_9 != 0);
    if (!__pyx_t_7) {
    } else {
      __pyx_t_8 = __pyx_t_7;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_7 = (__pyx_v_self->__pyx_base.execution_context != Py_None);
    __pyx_t_9 = (__pyx_t_7 != 0);
    if (!__pyx_t_9) {
    } else {
      __pyx_t_8 = __pyx_t_9;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_9 = (__pyx_v_self->__pyx_base.metrics_container != Py_None);
    __pyx_t_7 = (__pyx_t_9 != 0);
    if (!__pyx_t_7) {
    } else {
      __pyx_t_8 = __pyx_t_7;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_7 = (__pyx_v_self->__pyx_base.name_context != Py_None);
    __pyx_t_9 = (__pyx_t_7 != 0);
    if (!__pyx_t_9) {
    } else {
      __pyx_t_8 = __pyx_t_9;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_9 = (__pyx_v_self->__pyx_base.operation_name != Py_None);
    __pyx_t_7 = (__pyx_t_9 != 0);
    if (!__pyx_t_7) {
    } else {
      __pyx_t_8 = __pyx_t_7;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_7 = (__pyx_v_self->__pyx_base.receivers != ((PyObject*)Py_None));
    __pyx_t_9 = (__pyx_t_7 != 0);
    if (!__pyx_t_9) {
    } else {
      __pyx_t_8 = __pyx_t_9;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_9 = (__pyx_v_self->__pyx_base.scoped_finish_state != Py_None);
    __pyx_t_7 = (__pyx_t_9 != 0);
    if (!__pyx_t_7) {
    } else {
      __pyx_t_8 = __pyx_t_7;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_7 = (__pyx_v_self->__pyx_base.scoped_process_state != Py_None);
    __pyx_t_9 = (__pyx_t_7 != 0);
    if (!__pyx_t_9) {
    } else {
      __pyx_t_8 = __pyx_t_9;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_9 = (__pyx_v_self->__pyx_base.scoped_start_state != Py_None);
    __pyx_t_7 = (__pyx_t_9 != 0);
    if (!__pyx_t_7) {
    } else {
      __pyx_t_8 = __pyx_t_7;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_7 = (__pyx_v_self->__pyx_base.spec != Py_None);
    __pyx_t_9 = (__pyx_t_7 != 0);
    if (!__pyx_t_9) {
    } else {
      __pyx_t_8 = __pyx_t_9;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_9 = (__pyx_v_self->__pyx_base.state_sampler != Py_None);
    __pyx_t_7 = (__pyx_t_9 != 0);
    if (!__pyx_t_7) {
    } else {
      __pyx_t_8 = __pyx_t_7;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_7 = (__pyx_v_self->__pyx_base.step_name != Py_None);
    __pyx_t_9 = (__pyx_t_7 != 0);
    if (!__pyx_t_9) {
    } else {
      __pyx_t_8 = __pyx_t_9;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_9 = (__pyx_v_self->table != ((PyObject*)Py_None));
    __pyx_t_7 = (__pyx_t_9 != 0);
    if (!__pyx_t_7) {
    } else {
      __pyx_t_8 = __pyx_t_7;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_7 = (__pyx_v_self->timestamp_combiner != Py_None);
    __pyx_t_9 = (__pyx_t_7 != 0);
    __pyx_t_8 = __pyx_t_9;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_8;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.combine_fn is not None or self.combine_fn_add_input is not None or self.combine_fn_compact is not None or self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.table is not None or self.timestamp_combiner is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_PGBKCVOperation, (type(self), 0xf08ce62, None), state
 *     else:
 */
  __pyx_t_8 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_8) {

    /* "(tree fragment)":13
 *         use_setstate = self.combine_fn is not None or self.combine_fn_add_input is not None or self.combine_fn_compact is not None or self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.table is not None or self.timestamp_combiner is not None
 *     if use_setstate:
 *         return __pyx_unpickle_PGBKCVOperation, (type(self), 0xf08ce62, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_PGBKCVOperation, (type(self), 0xf08ce62, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_PGBKCVOperation); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_252235362);
    __Pyx_GIVEREF(__pyx_int_252235362);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_int_252235362);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_6, 2, Py_None);
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __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_6);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_6);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state);
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.combine_fn is not None or self.combine_fn_add_input is not None or self.combine_fn_compact is not None or self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.table is not None or self.timestamp_combiner is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_PGBKCVOperation, (type(self), 0xf08ce62, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_PGBKCVOperation, (type(self), 0xf08ce62, None), state
 *     else:
 *         return __pyx_unpickle_PGBKCVOperation, (type(self), 0xf08ce62, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_PGBKCVOperation__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_PGBKCVOperation); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_252235362);
    __Pyx_GIVEREF(__pyx_int_252235362);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_int_252235362);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 15, __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_6);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6);
    __pyx_t_4 = 0;
    __pyx_t_6 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_PGBKCVOperation, (type(self), 0xf08ce62, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_PGBKCVOperation__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_15__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_15__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_6worker_10operations_15PGBKCVOperation_14__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_14__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__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__115)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[2], 16, 0, __PYX_ERR(2, 16, __pyx_L1_error));

  /* "(tree fragment)":17
 *         return __pyx_unpickle_PGBKCVOperation, (type(self), 0xf08ce62, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_PGBKCVOperation__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(2, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_PGBKCVOperation__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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_PGBKCVOperation, (type(self), 0xf08ce62, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_PGBKCVOperation__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":1349
 *   with all the items.
 *   """
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16FlattenOperation_1process(PyObject *__pyx_v_self, PyObject *__pyx_v_o); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_16FlattenOperation_process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_FlattenOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_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;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__116)
  __Pyx_RefNannySetupContext("process", 0);
  __Pyx_TraceCall("process", __pyx_f[0], 1349, 0, __PYX_ERR(0, 1349, __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, 1349, __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_6worker_10operations_16FlattenOperation_1process)) {
        __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_o)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_o));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1349, __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/worker/operations.py":1351
 *   def process(self, o):
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:             # <<<<<<<<<<<<<<
 *       if self.debug_logging_enabled:
 *         _LOGGER.debug('Processing [%s] in %s', o, self)
 */
  /*with:*/ {
    __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_process_state, __pyx_n_s_exit); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1351, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_process_state, __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1351, __pyx_L3_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, 1351, __pyx_L3_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:*/ {
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_6);
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_8);
        /*try:*/ {

          /* "apache_beam/runners/worker/operations.py":1352
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:
 *       if self.debug_logging_enabled:             # <<<<<<<<<<<<<<
 *         _LOGGER.debug('Processing [%s] in %s', o, self)
 *       self.output(o)
 */
          __pyx_t_9 = (__pyx_v_self->__pyx_base.debug_logging_enabled != 0);
          if (__pyx_t_9) {

            /* "apache_beam/runners/worker/operations.py":1353
 *     with self.scoped_process_state:
 *       if self.debug_logging_enabled:
 *         _LOGGER.debug('Processing [%s] in %s', o, self)             # <<<<<<<<<<<<<<
 *       self.output(o)
 * 
 */
            __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_LOGGER); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1353, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_debug); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1353, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_2 = NULL;
            __pyx_t_10 = 0;
            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_10 = 1;
              }
            }
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_3)) {
              PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_kp_u_Processing_s_in_s, ((PyObject *)__pyx_v_o), ((PyObject *)__pyx_v_self)};
              __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L7_error)
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_GOTREF(__pyx_t_1);
            } else
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
              PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_kp_u_Processing_s_in_s, ((PyObject *)__pyx_v_o), ((PyObject *)__pyx_v_self)};
              __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L7_error)
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_GOTREF(__pyx_t_1);
            } else
            #endif
            {
              __pyx_t_4 = PyTuple_New(3+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1353, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_4);
              if (__pyx_t_2) {
                __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
              }
              __Pyx_INCREF(__pyx_kp_u_Processing_s_in_s);
              __Pyx_GIVEREF(__pyx_kp_u_Processing_s_in_s);
              PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_10, __pyx_kp_u_Processing_s_in_s);
              __Pyx_INCREF(((PyObject *)__pyx_v_o));
              __Pyx_GIVEREF(((PyObject *)__pyx_v_o));
              PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_10, ((PyObject *)__pyx_v_o));
              __Pyx_INCREF(((PyObject *)__pyx_v_self));
              __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
              PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_10, ((PyObject *)__pyx_v_self));
              __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            }
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

            /* "apache_beam/runners/worker/operations.py":1352
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:
 *       if self.debug_logging_enabled:             # <<<<<<<<<<<<<<
 *         _LOGGER.debug('Processing [%s] in %s', o, self)
 *       self.output(o)
 */
          }

          /* "apache_beam/runners/worker/operations.py":1354
 *       if self.debug_logging_enabled:
 *         _LOGGER.debug('Processing [%s] in %s', o, self)
 *       self.output(o)             # <<<<<<<<<<<<<<
 * 
 * 
 */
          __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_FlattenOperation *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.output(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), __pyx_v_o, 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1354, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "apache_beam/runners/worker/operations.py":1351
 *   def process(self, o):
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:             # <<<<<<<<<<<<<<
 *       if self.debug_logging_enabled:
 *         _LOGGER.debug('Processing [%s] in %s', o, self)
 */
        }
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L12_try_end;
        __pyx_L7_error:;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        /*except:*/ {
          __Pyx_AddTraceback("apache_beam.runners.worker.operations.FlattenOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_4) < 0) __PYX_ERR(0, 1351, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_2 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1351, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1351, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (__pyx_t_9 < 0) __PYX_ERR(0, 1351, __pyx_L9_except_error)
          __pyx_t_12 = ((!(__pyx_t_9 != 0)) != 0);
          if (__pyx_t_12) {
            __Pyx_GIVEREF(__pyx_t_1);
            __Pyx_GIVEREF(__pyx_t_3);
            __Pyx_XGIVEREF(__pyx_t_4);
            __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_3, __pyx_t_4);
            __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; 
            __PYX_ERR(0, 1351, __pyx_L9_except_error)
          }
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          goto __pyx_L8_exception_handled;
        }
        __pyx_L9_except_error:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        goto __pyx_L1_error;
        __pyx_L8_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        __pyx_L12_try_end:;
      }
    }
    /*finally:*/ {
      /*normal exit:*/{
        if (__pyx_t_5) {
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__29, NULL);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1351, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        goto __pyx_L6;
      }
      __pyx_L6:;
    }
    goto __pyx_L17;
    __pyx_L3_error:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L1_error;
    __pyx_L17:;
  }

  /* "apache_beam/runners/worker/operations.py":1349
 *   with all the items.
 *   """
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.FlattenOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16FlattenOperation_1process(PyObject *__pyx_v_self, PyObject *__pyx_v_o); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_16FlattenOperation_1process = {"process", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_16FlattenOperation_1process, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16FlattenOperation_1process(PyObject *__pyx_v_self, PyObject *__pyx_v_o) {
  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_o), __pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, 1, "o", 0))) __PYX_ERR(0, 1349, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_16FlattenOperation_process(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_FlattenOperation *)__pyx_v_self), ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_v_o));

  /* 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_6worker_10operations_16FlattenOperation_process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_FlattenOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__116)
  __Pyx_RefNannySetupContext("process", 0);
  __Pyx_TraceCall("process (wrapper)", __pyx_f[0], 1349, 0, __PYX_ERR(0, 1349, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_16FlattenOperation_process(__pyx_v_self, __pyx_v_o, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.FlattenOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_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_6worker_10operations_16FlattenOperation_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_16FlattenOperation_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_16FlattenOperation_3__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16FlattenOperation_3__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_6worker_10operations_16FlattenOperation_2__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_FlattenOperation *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16FlattenOperation_2__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_FlattenOperation *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_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__117)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error));

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.debug_logging_enabled); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.setup_done); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(16); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.consumers);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.consumers);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->__pyx_base.consumers);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.counter_factory);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.counter_factory);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->__pyx_base.counter_factory);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.data_sampler);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.data_sampler);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->__pyx_base.data_sampler);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.execution_context);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.execution_context);
  PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_self->__pyx_base.execution_context);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.metrics_container);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.metrics_container);
  PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_self->__pyx_base.metrics_container);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.name_context);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.name_context);
  PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_v_self->__pyx_base.name_context);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.operation_name);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.operation_name);
  PyTuple_SET_ITEM(__pyx_t_3, 7, __pyx_v_self->__pyx_base.operation_name);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.receivers);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.receivers);
  PyTuple_SET_ITEM(__pyx_t_3, 8, __pyx_v_self->__pyx_base.receivers);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.scoped_finish_state);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.scoped_finish_state);
  PyTuple_SET_ITEM(__pyx_t_3, 9, __pyx_v_self->__pyx_base.scoped_finish_state);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.scoped_process_state);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.scoped_process_state);
  PyTuple_SET_ITEM(__pyx_t_3, 10, __pyx_v_self->__pyx_base.scoped_process_state);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.scoped_start_state);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.scoped_start_state);
  PyTuple_SET_ITEM(__pyx_t_3, 11, __pyx_v_self->__pyx_base.scoped_start_state);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 12, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.spec);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.spec);
  PyTuple_SET_ITEM(__pyx_t_3, 13, __pyx_v_self->__pyx_base.spec);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.state_sampler);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.state_sampler);
  PyTuple_SET_ITEM(__pyx_t_3, 14, __pyx_v_self->__pyx_base.state_sampler);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.step_name);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.step_name);
  PyTuple_SET_ITEM(__pyx_t_3, 15, __pyx_v_self->__pyx_base.step_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.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v__dict = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":7
 *     state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         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(2, 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(2, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_FlattenOperation, (type(self), 0xb6b9d28, None), state
 */
  /*else*/ {
    __pyx_t_4 = (__pyx_v_self->__pyx_base.consumers != 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->__pyx_base.counter_factory != 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->__pyx_base.data_sampler != 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->__pyx_base.execution_context != 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->__pyx_base.metrics_container != 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->__pyx_base.name_context != 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->__pyx_base.operation_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->__pyx_base.receivers != ((PyObject*)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->__pyx_base.scoped_finish_state != 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->__pyx_base.scoped_process_state != 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->__pyx_base.scoped_start_state != 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->__pyx_base.spec != 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->__pyx_base.state_sampler != 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->__pyx_base.step_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.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_FlattenOperation, (type(self), 0xb6b9d28, None), state
 *     else:
 */
  __pyx_t_5 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":13
 *         use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None
 *     if use_setstate:
 *         return __pyx_unpickle_FlattenOperation, (type(self), 0xb6b9d28, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_FlattenOperation, (type(self), 0xb6b9d28, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_FlattenOperation); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_191601960);
    __Pyx_GIVEREF(__pyx_int_191601960);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_191601960);
    __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(2, 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.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_FlattenOperation, (type(self), 0xb6b9d28, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_FlattenOperation, (type(self), 0xb6b9d28, None), state
 *     else:
 *         return __pyx_unpickle_FlattenOperation, (type(self), 0xb6b9d28, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_FlattenOperation__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_FlattenOperation); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_191601960);
    __Pyx_GIVEREF(__pyx_int_191601960);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_191601960);
    __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(2, 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.worker.operations.FlattenOperation.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_FlattenOperation, (type(self), 0xb6b9d28, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_FlattenOperation__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16FlattenOperation_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_16FlattenOperation_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_16FlattenOperation_5__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16FlattenOperation_5__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_6worker_10operations_16FlattenOperation_4__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_FlattenOperation *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16FlattenOperation_4__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_FlattenOperation *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_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[2], 16, 0, __PYX_ERR(2, 16, __pyx_L1_error));

  /* "(tree fragment)":17
 *         return __pyx_unpickle_FlattenOperation, (type(self), 0xb6b9d28, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_FlattenOperation__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(2, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_FlattenOperation__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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_FlattenOperation, (type(self), 0xb6b9d28, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_FlattenOperation__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.FlattenOperation.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":1357
 * 
 * 
 * def create_operation(             # <<<<<<<<<<<<<<
 *     name_context,
 *     spec,
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_7create_operation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_11apache_beam_7runners_6worker_10operations_6create_operation[] = "Create Operation object for given operation specification.";
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_7create_operation = {"create_operation", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_7create_operation, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_6create_operation};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_7create_operation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name_context = 0;
  PyObject *__pyx_v_spec = 0;
  PyObject *__pyx_v_counter_factory = 0;
  CYTHON_UNUSED PyObject *__pyx_v_step_name = 0;
  PyObject *__pyx_v_state_sampler = 0;
  PyObject *__pyx_v_test_shuffle_source = 0;
  PyObject *__pyx_v_test_shuffle_sink = 0;
  PyObject *__pyx_v_is_streaming = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create_operation (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name_context,&__pyx_n_s_spec,&__pyx_n_s_counter_factory,&__pyx_n_s_step_name,&__pyx_n_s_state_sampler,&__pyx_n_s_test_shuffle_source,&__pyx_n_s_test_shuffle_sink,&__pyx_n_s_is_streaming,0};
    PyObject* values[8] = {0,0,0,0,0,0,0,0};

    /* "apache_beam/runners/worker/operations.py":1361
 *     spec,
 *     counter_factory,
 *     step_name=None,             # <<<<<<<<<<<<<<
 *     state_sampler=None,
 *     test_shuffle_source=None,
 */
    values[3] = ((PyObject *)((PyObject *)Py_None));

    /* "apache_beam/runners/worker/operations.py":1362
 *     counter_factory,
 *     step_name=None,
 *     state_sampler=None,             # <<<<<<<<<<<<<<
 *     test_shuffle_source=None,
 *     test_shuffle_sink=None,
 */
    values[4] = ((PyObject *)((PyObject *)Py_None));

    /* "apache_beam/runners/worker/operations.py":1363
 *     step_name=None,
 *     state_sampler=None,
 *     test_shuffle_source=None,             # <<<<<<<<<<<<<<
 *     test_shuffle_sink=None,
 *     is_streaming=False):
 */
    values[5] = ((PyObject *)((PyObject *)Py_None));

    /* "apache_beam/runners/worker/operations.py":1364
 *     state_sampler=None,
 *     test_shuffle_source=None,
 *     test_shuffle_sink=None,             # <<<<<<<<<<<<<<
 *     is_streaming=False):
 *   # type: (...) -> Operation
 */
    values[6] = ((PyObject *)((PyObject *)Py_None));

    /* "apache_beam/runners/worker/operations.py":1365
 *     test_shuffle_source=None,
 *     test_shuffle_sink=None,
 *     is_streaming=False):             # <<<<<<<<<<<<<<
 *   # type: (...) -> Operation
 * 
 */
    values[7] = ((PyObject *)((PyObject *)Py_False));
    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_name_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_spec)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("create_operation", 0, 3, 8, 1); __PYX_ERR(0, 1357, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_counter_factory)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("create_operation", 0, 3, 8, 2); __PYX_ERR(0, 1357, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_step_name);
          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_state_sampler);
          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_test_shuffle_source);
          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_test_shuffle_sink);
          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_is_streaming);
          if (value) { values[7] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create_operation") < 0)) __PYX_ERR(0, 1357, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_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);
        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_name_context = values[0];
    __pyx_v_spec = values[1];
    __pyx_v_counter_factory = values[2];
    __pyx_v_step_name = values[3];
    __pyx_v_state_sampler = values[4];
    __pyx_v_test_shuffle_source = values[5];
    __pyx_v_test_shuffle_sink = values[6];
    __pyx_v_is_streaming = values[7];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create_operation", 0, 3, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1357, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.create_operation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_6create_operation(__pyx_self, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_step_name, __pyx_v_state_sampler, __pyx_v_test_shuffle_source, __pyx_v_test_shuffle_sink, __pyx_v_is_streaming);

  /* "apache_beam/runners/worker/operations.py":1357
 * 
 * 
 * def create_operation(             # <<<<<<<<<<<<<<
 *     name_context,
 *     spec,
 */

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_6create_operation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name_context, PyObject *__pyx_v_spec, PyObject *__pyx_v_counter_factory, CYTHON_UNUSED PyObject *__pyx_v_step_name, PyObject *__pyx_v_state_sampler, PyObject *__pyx_v_test_shuffle_source, PyObject *__pyx_v_test_shuffle_sink, PyObject *__pyx_v_is_streaming) {
  PyObject *__pyx_v_op = NULL;
  PyObject *__pyx_v_NativeReadOperation = NULL;
  PyObject *__pyx_v_NativeWriteOperation = NULL;
  PyObject *__pyx_v_GroupedShuffleReadOperation = NULL;
  PyObject *__pyx_v_UngroupedShuffleReadOperation = NULL;
  PyObject *__pyx_v_ShuffleWriteOperation = NULL;
  PyObject *__pyx_v_BatchGroupAlsoByWindowsOperation = NULL;
  PyObject *__pyx_v_StreamingGroupAlsoByWindowsOperation = NULL;
  PyObject *__pyx_v_ReifyTimestampAndWindowsOperation = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_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;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__119)
  __Pyx_RefNannySetupContext("create_operation", 0);
  __Pyx_TraceCall("create_operation", __pyx_f[0], 1357, 0, __PYX_ERR(0, 1357, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_name_context);

  /* "apache_beam/runners/worker/operations.py":1371
 * 
 *   # TODO(pabloem): Document arguments to this function call.
 *   if not isinstance(name_context, common.NameContext):             # <<<<<<<<<<<<<<
 *     name_context = common.NameContext(step_name=name_context)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_common); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_NameContext); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = PyObject_IsInstance(__pyx_v_name_context, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1371, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = ((!(__pyx_t_3 != 0)) != 0);
  if (__pyx_t_4) {

    /* "apache_beam/runners/worker/operations.py":1372
 *   # TODO(pabloem): Document arguments to this function call.
 *   if not isinstance(name_context, common.NameContext):
 *     name_context = common.NameContext(step_name=name_context)             # <<<<<<<<<<<<<<
 * 
 *   if isinstance(spec, operation_specs.WorkerRead):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_common); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_NameContext); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_step_name, __pyx_v_name_context) < 0) __PYX_ERR(0, 1372, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_name_context, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "apache_beam/runners/worker/operations.py":1371
 * 
 *   # TODO(pabloem): Document arguments to this function call.
 *   if not isinstance(name_context, common.NameContext):             # <<<<<<<<<<<<<<
 *     name_context = common.NameContext(step_name=name_context)
 * 
 */
  }

  /* "apache_beam/runners/worker/operations.py":1374
 *     name_context = common.NameContext(step_name=name_context)
 * 
 *   if isinstance(spec, operation_specs.WorkerRead):             # <<<<<<<<<<<<<<
 *     if isinstance(spec.source, iobase.SourceBundle):
 *       op = ReadOperation(
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_operation_specs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_WorkerRead); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_4 = PyObject_IsInstance(__pyx_v_spec, __pyx_t_2); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1374, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = (__pyx_t_4 != 0);
  if (__pyx_t_3) {

    /* "apache_beam/runners/worker/operations.py":1375
 * 
 *   if isinstance(spec, operation_specs.WorkerRead):
 *     if isinstance(spec.source, iobase.SourceBundle):             # <<<<<<<<<<<<<<
 *       op = ReadOperation(
 *           name_context, spec, counter_factory, state_sampler)  # type: Operation
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_spec, __pyx_n_s_source); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1375, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_iobase); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1375, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_SourceBundle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1375, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_3 = PyObject_IsInstance(__pyx_t_2, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1375, __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_t_3 != 0);
    if (__pyx_t_4) {

      /* "apache_beam/runners/worker/operations.py":1376
 *   if isinstance(spec, operation_specs.WorkerRead):
 *     if isinstance(spec.source, iobase.SourceBundle):
 *       op = ReadOperation(             # <<<<<<<<<<<<<<
 *           name_context, spec, counter_factory, state_sampler)  # type: Operation
 *     else:
 */
      __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1376, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v_name_context);
      __Pyx_GIVEREF(__pyx_v_name_context);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_name_context);
      __Pyx_INCREF(__pyx_v_spec);
      __Pyx_GIVEREF(__pyx_v_spec);
      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_spec);
      __Pyx_INCREF(__pyx_v_counter_factory);
      __Pyx_GIVEREF(__pyx_v_counter_factory);
      PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_counter_factory);
      __Pyx_INCREF(__pyx_v_state_sampler);
      __Pyx_GIVEREF(__pyx_v_state_sampler);
      PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_state_sampler);
      __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1376, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_op = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "apache_beam/runners/worker/operations.py":1375
 * 
 *   if isinstance(spec, operation_specs.WorkerRead):
 *     if isinstance(spec.source, iobase.SourceBundle):             # <<<<<<<<<<<<<<
 *       op = ReadOperation(
 *           name_context, spec, counter_factory, state_sampler)  # type: Operation
 */
      goto __pyx_L5;
    }

    /* "apache_beam/runners/worker/operations.py":1379
 *           name_context, spec, counter_factory, state_sampler)  # type: Operation
 *     else:
 *       from dataflow_worker.native_operations import NativeReadOperation             # <<<<<<<<<<<<<<
 *       op = NativeReadOperation(
 *           name_context, spec, counter_factory, state_sampler)
 */
    /*else*/ {
      __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1379, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_n_s_NativeReadOperation);
      __Pyx_GIVEREF(__pyx_n_s_NativeReadOperation);
      PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_NativeReadOperation);
      __pyx_t_1 = __Pyx_Import(__pyx_n_s_dataflow_worker_native_operation, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1379, __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_NativeReadOperation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1379, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_v_NativeReadOperation = __pyx_t_2;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "apache_beam/runners/worker/operations.py":1381
 *       from dataflow_worker.native_operations import NativeReadOperation
 *       op = NativeReadOperation(
 *           name_context, spec, counter_factory, state_sampler)             # <<<<<<<<<<<<<<
 *   elif isinstance(spec, operation_specs.WorkerWrite):
 *     from dataflow_worker.native_operations import NativeWriteOperation
 */
      __Pyx_INCREF(__pyx_v_NativeReadOperation);
      __pyx_t_2 = __pyx_v_NativeReadOperation; __pyx_t_5 = NULL;
      __pyx_t_6 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_6 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1380, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1380, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      {
        __pyx_t_7 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1380, __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_name_context);
        __Pyx_GIVEREF(__pyx_v_name_context);
        PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_name_context);
        __Pyx_INCREF(__pyx_v_spec);
        __Pyx_GIVEREF(__pyx_v_spec);
        PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_spec);
        __Pyx_INCREF(__pyx_v_counter_factory);
        __Pyx_GIVEREF(__pyx_v_counter_factory);
        PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_v_counter_factory);
        __Pyx_INCREF(__pyx_v_state_sampler);
        __Pyx_GIVEREF(__pyx_v_state_sampler);
        PyTuple_SET_ITEM(__pyx_t_7, 3+__pyx_t_6, __pyx_v_state_sampler);
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1380, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_op = __pyx_t_1;
      __pyx_t_1 = 0;
    }
    __pyx_L5:;

    /* "apache_beam/runners/worker/operations.py":1374
 *     name_context = common.NameContext(step_name=name_context)
 * 
 *   if isinstance(spec, operation_specs.WorkerRead):             # <<<<<<<<<<<<<<
 *     if isinstance(spec.source, iobase.SourceBundle):
 *       op = ReadOperation(
 */
    goto __pyx_L4;
  }

  /* "apache_beam/runners/worker/operations.py":1382
 *       op = NativeReadOperation(
 *           name_context, spec, counter_factory, state_sampler)
 *   elif isinstance(spec, operation_specs.WorkerWrite):             # <<<<<<<<<<<<<<
 *     from dataflow_worker.native_operations import NativeWriteOperation
 *     op = NativeWriteOperation(
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_operation_specs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_WorkerWrite); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = PyObject_IsInstance(__pyx_v_spec, __pyx_t_2); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1382, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = (__pyx_t_4 != 0);
  if (__pyx_t_3) {

    /* "apache_beam/runners/worker/operations.py":1383
 *           name_context, spec, counter_factory, state_sampler)
 *   elif isinstance(spec, operation_specs.WorkerWrite):
 *     from dataflow_worker.native_operations import NativeWriteOperation             # <<<<<<<<<<<<<<
 *     op = NativeWriteOperation(
 *         name_context, spec, counter_factory, state_sampler)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1383, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_NativeWriteOperation);
    __Pyx_GIVEREF(__pyx_n_s_NativeWriteOperation);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_NativeWriteOperation);
    __pyx_t_1 = __Pyx_Import(__pyx_n_s_dataflow_worker_native_operation, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1383, __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_NativeWriteOperation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1383, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v_NativeWriteOperation = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/runners/worker/operations.py":1385
 *     from dataflow_worker.native_operations import NativeWriteOperation
 *     op = NativeWriteOperation(
 *         name_context, spec, counter_factory, state_sampler)             # <<<<<<<<<<<<<<
 *   elif isinstance(spec, operation_specs.WorkerCombineFn):
 *     op = CombineOperation(name_context, spec, counter_factory, state_sampler)
 */
    __Pyx_INCREF(__pyx_v_NativeWriteOperation);
    __pyx_t_2 = __pyx_v_NativeWriteOperation; __pyx_t_7 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1384, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1384, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1384, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_v_name_context);
      __Pyx_GIVEREF(__pyx_v_name_context);
      PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_6, __pyx_v_name_context);
      __Pyx_INCREF(__pyx_v_spec);
      __Pyx_GIVEREF(__pyx_v_spec);
      PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_6, __pyx_v_spec);
      __Pyx_INCREF(__pyx_v_counter_factory);
      __Pyx_GIVEREF(__pyx_v_counter_factory);
      PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_6, __pyx_v_counter_factory);
      __Pyx_INCREF(__pyx_v_state_sampler);
      __Pyx_GIVEREF(__pyx_v_state_sampler);
      PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_6, __pyx_v_state_sampler);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1384, __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_op = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "apache_beam/runners/worker/operations.py":1382
 *       op = NativeReadOperation(
 *           name_context, spec, counter_factory, state_sampler)
 *   elif isinstance(spec, operation_specs.WorkerWrite):             # <<<<<<<<<<<<<<
 *     from dataflow_worker.native_operations import NativeWriteOperation
 *     op = NativeWriteOperation(
 */
    goto __pyx_L4;
  }

  /* "apache_beam/runners/worker/operations.py":1386
 *     op = NativeWriteOperation(
 *         name_context, spec, counter_factory, state_sampler)
 *   elif isinstance(spec, operation_specs.WorkerCombineFn):             # <<<<<<<<<<<<<<
 *     op = CombineOperation(name_context, spec, counter_factory, state_sampler)
 *   elif isinstance(spec, operation_specs.WorkerPartialGroupByKey):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_operation_specs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_WorkerCombineFn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = PyObject_IsInstance(__pyx_v_spec, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1386, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "apache_beam/runners/worker/operations.py":1387
 *         name_context, spec, counter_factory, state_sampler)
 *   elif isinstance(spec, operation_specs.WorkerCombineFn):
 *     op = CombineOperation(name_context, spec, counter_factory, state_sampler)             # <<<<<<<<<<<<<<
 *   elif isinstance(spec, operation_specs.WorkerPartialGroupByKey):
 *     op = create_pgbk_op(name_context, spec, counter_factory, state_sampler)
 */
    __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1387, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_name_context);
    __Pyx_GIVEREF(__pyx_v_name_context);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_name_context);
    __Pyx_INCREF(__pyx_v_spec);
    __Pyx_GIVEREF(__pyx_v_spec);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_spec);
    __Pyx_INCREF(__pyx_v_counter_factory);
    __Pyx_GIVEREF(__pyx_v_counter_factory);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_counter_factory);
    __Pyx_INCREF(__pyx_v_state_sampler);
    __Pyx_GIVEREF(__pyx_v_state_sampler);
    PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_state_sampler);
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1387, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_op = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "apache_beam/runners/worker/operations.py":1386
 *     op = NativeWriteOperation(
 *         name_context, spec, counter_factory, state_sampler)
 *   elif isinstance(spec, operation_specs.WorkerCombineFn):             # <<<<<<<<<<<<<<
 *     op = CombineOperation(name_context, spec, counter_factory, state_sampler)
 *   elif isinstance(spec, operation_specs.WorkerPartialGroupByKey):
 */
    goto __pyx_L4;
  }

  /* "apache_beam/runners/worker/operations.py":1388
 *   elif isinstance(spec, operation_specs.WorkerCombineFn):
 *     op = CombineOperation(name_context, spec, counter_factory, state_sampler)
 *   elif isinstance(spec, operation_specs.WorkerPartialGroupByKey):             # <<<<<<<<<<<<<<
 *     op = create_pgbk_op(name_context, spec, counter_factory, state_sampler)
 *   elif isinstance(spec, operation_specs.WorkerDoFn):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_operation_specs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_WorkerPartialGroupByKey); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = PyObject_IsInstance(__pyx_v_spec, __pyx_t_2); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1388, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = (__pyx_t_4 != 0);
  if (__pyx_t_3) {

    /* "apache_beam/runners/worker/operations.py":1389
 *     op = CombineOperation(name_context, spec, counter_factory, state_sampler)
 *   elif isinstance(spec, operation_specs.WorkerPartialGroupByKey):
 *     op = create_pgbk_op(name_context, spec, counter_factory, state_sampler)             # <<<<<<<<<<<<<<
 *   elif isinstance(spec, operation_specs.WorkerDoFn):
 *     op = DoOperation(name_context, spec, counter_factory, state_sampler)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_create_pgbk_op); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1389, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 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_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1389, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1389, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1389, __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_name_context);
      __Pyx_GIVEREF(__pyx_v_name_context);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_name_context);
      __Pyx_INCREF(__pyx_v_spec);
      __Pyx_GIVEREF(__pyx_v_spec);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_spec);
      __Pyx_INCREF(__pyx_v_counter_factory);
      __Pyx_GIVEREF(__pyx_v_counter_factory);
      PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_v_counter_factory);
      __Pyx_INCREF(__pyx_v_state_sampler);
      __Pyx_GIVEREF(__pyx_v_state_sampler);
      PyTuple_SET_ITEM(__pyx_t_7, 3+__pyx_t_6, __pyx_v_state_sampler);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1389, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_op = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "apache_beam/runners/worker/operations.py":1388
 *   elif isinstance(spec, operation_specs.WorkerCombineFn):
 *     op = CombineOperation(name_context, spec, counter_factory, state_sampler)
 *   elif isinstance(spec, operation_specs.WorkerPartialGroupByKey):             # <<<<<<<<<<<<<<
 *     op = create_pgbk_op(name_context, spec, counter_factory, state_sampler)
 *   elif isinstance(spec, operation_specs.WorkerDoFn):
 */
    goto __pyx_L4;
  }

  /* "apache_beam/runners/worker/operations.py":1390
 *   elif isinstance(spec, operation_specs.WorkerPartialGroupByKey):
 *     op = create_pgbk_op(name_context, spec, counter_factory, state_sampler)
 *   elif isinstance(spec, operation_specs.WorkerDoFn):             # <<<<<<<<<<<<<<
 *     op = DoOperation(name_context, spec, counter_factory, state_sampler)
 *   elif isinstance(spec, operation_specs.WorkerGroupingShuffleRead):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_operation_specs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_WorkerDoFn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = PyObject_IsInstance(__pyx_v_spec, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1390, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "apache_beam/runners/worker/operations.py":1391
 *     op = create_pgbk_op(name_context, spec, counter_factory, state_sampler)
 *   elif isinstance(spec, operation_specs.WorkerDoFn):
 *     op = DoOperation(name_context, spec, counter_factory, state_sampler)             # <<<<<<<<<<<<<<
 *   elif isinstance(spec, operation_specs.WorkerGroupingShuffleRead):
 *     from dataflow_worker.shuffle_operations import GroupedShuffleReadOperation
 */
    __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1391, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_name_context);
    __Pyx_GIVEREF(__pyx_v_name_context);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_name_context);
    __Pyx_INCREF(__pyx_v_spec);
    __Pyx_GIVEREF(__pyx_v_spec);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_spec);
    __Pyx_INCREF(__pyx_v_counter_factory);
    __Pyx_GIVEREF(__pyx_v_counter_factory);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_counter_factory);
    __Pyx_INCREF(__pyx_v_state_sampler);
    __Pyx_GIVEREF(__pyx_v_state_sampler);
    PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_state_sampler);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1391, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_op = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "apache_beam/runners/worker/operations.py":1390
 *   elif isinstance(spec, operation_specs.WorkerPartialGroupByKey):
 *     op = create_pgbk_op(name_context, spec, counter_factory, state_sampler)
 *   elif isinstance(spec, operation_specs.WorkerDoFn):             # <<<<<<<<<<<<<<
 *     op = DoOperation(name_context, spec, counter_factory, state_sampler)
 *   elif isinstance(spec, operation_specs.WorkerGroupingShuffleRead):
 */
    goto __pyx_L4;
  }

  /* "apache_beam/runners/worker/operations.py":1392
 *   elif isinstance(spec, operation_specs.WorkerDoFn):
 *     op = DoOperation(name_context, spec, counter_factory, state_sampler)
 *   elif isinstance(spec, operation_specs.WorkerGroupingShuffleRead):             # <<<<<<<<<<<<<<
 *     from dataflow_worker.shuffle_operations import GroupedShuffleReadOperation
 *     op = GroupedShuffleReadOperation(
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_operation_specs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_WorkerGroupingShuffleRead); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = PyObject_IsInstance(__pyx_v_spec, __pyx_t_1); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1392, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_4 != 0);
  if (__pyx_t_3) {

    /* "apache_beam/runners/worker/operations.py":1393
 *     op = DoOperation(name_context, spec, counter_factory, state_sampler)
 *   elif isinstance(spec, operation_specs.WorkerGroupingShuffleRead):
 *     from dataflow_worker.shuffle_operations import GroupedShuffleReadOperation             # <<<<<<<<<<<<<<
 *     op = GroupedShuffleReadOperation(
 *         name_context,
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1393, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_GroupedShuffleReadOperation);
    __Pyx_GIVEREF(__pyx_n_s_GroupedShuffleReadOperation);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_GroupedShuffleReadOperation);
    __pyx_t_2 = __Pyx_Import(__pyx_n_s_dataflow_worker_shuffle_operatio, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1393, __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_GroupedShuffleReadOperation); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1393, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v_GroupedShuffleReadOperation = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/runners/worker/operations.py":1394
 *   elif isinstance(spec, operation_specs.WorkerGroupingShuffleRead):
 *     from dataflow_worker.shuffle_operations import GroupedShuffleReadOperation
 *     op = GroupedShuffleReadOperation(             # <<<<<<<<<<<<<<
 *         name_context,
 *         spec,
 */
    __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_name_context);
    __Pyx_GIVEREF(__pyx_v_name_context);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_name_context);
    __Pyx_INCREF(__pyx_v_spec);
    __Pyx_GIVEREF(__pyx_v_spec);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_spec);
    __Pyx_INCREF(__pyx_v_counter_factory);
    __Pyx_GIVEREF(__pyx_v_counter_factory);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_counter_factory);
    __Pyx_INCREF(__pyx_v_state_sampler);
    __Pyx_GIVEREF(__pyx_v_state_sampler);
    PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_state_sampler);

    /* "apache_beam/runners/worker/operations.py":1399
 *         counter_factory,
 *         state_sampler,
 *         shuffle_source=test_shuffle_source)             # <<<<<<<<<<<<<<
 *   elif isinstance(spec, operation_specs.WorkerUngroupedShuffleRead):
 *     from dataflow_worker.shuffle_operations import UngroupedShuffleReadOperation
 */
    __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1399, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_shuffle_source, __pyx_v_test_shuffle_source) < 0) __PYX_ERR(0, 1399, __pyx_L1_error)

    /* "apache_beam/runners/worker/operations.py":1394
 *   elif isinstance(spec, operation_specs.WorkerGroupingShuffleRead):
 *     from dataflow_worker.shuffle_operations import GroupedShuffleReadOperation
 *     op = GroupedShuffleReadOperation(             # <<<<<<<<<<<<<<
 *         name_context,
 *         spec,
 */
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_v_GroupedShuffleReadOperation, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_op = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "apache_beam/runners/worker/operations.py":1392
 *   elif isinstance(spec, operation_specs.WorkerDoFn):
 *     op = DoOperation(name_context, spec, counter_factory, state_sampler)
 *   elif isinstance(spec, operation_specs.WorkerGroupingShuffleRead):             # <<<<<<<<<<<<<<
 *     from dataflow_worker.shuffle_operations import GroupedShuffleReadOperation
 *     op = GroupedShuffleReadOperation(
 */
    goto __pyx_L4;
  }

  /* "apache_beam/runners/worker/operations.py":1400
 *         state_sampler,
 *         shuffle_source=test_shuffle_source)
 *   elif isinstance(spec, operation_specs.WorkerUngroupedShuffleRead):             # <<<<<<<<<<<<<<
 *     from dataflow_worker.shuffle_operations import UngroupedShuffleReadOperation
 *     op = UngroupedShuffleReadOperation(
 */
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_operation_specs); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_WorkerUngroupedShuffleRead); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_3 = PyObject_IsInstance(__pyx_v_spec, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1400, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "apache_beam/runners/worker/operations.py":1401
 *         shuffle_source=test_shuffle_source)
 *   elif isinstance(spec, operation_specs.WorkerUngroupedShuffleRead):
 *     from dataflow_worker.shuffle_operations import UngroupedShuffleReadOperation             # <<<<<<<<<<<<<<
 *     op = UngroupedShuffleReadOperation(
 *         name_context,
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1401, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_UngroupedShuffleReadOperation);
    __Pyx_GIVEREF(__pyx_n_s_UngroupedShuffleReadOperation);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_UngroupedShuffleReadOperation);
    __pyx_t_7 = __Pyx_Import(__pyx_n_s_dataflow_worker_shuffle_operatio, __pyx_t_1, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1401, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_7, __pyx_n_s_UngroupedShuffleReadOperation); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1401, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v_UngroupedShuffleReadOperation = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "apache_beam/runners/worker/operations.py":1402
 *   elif isinstance(spec, operation_specs.WorkerUngroupedShuffleRead):
 *     from dataflow_worker.shuffle_operations import UngroupedShuffleReadOperation
 *     op = UngroupedShuffleReadOperation(             # <<<<<<<<<<<<<<
 *         name_context,
 *         spec,
 */
    __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1402, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_v_name_context);
    __Pyx_GIVEREF(__pyx_v_name_context);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_name_context);
    __Pyx_INCREF(__pyx_v_spec);
    __Pyx_GIVEREF(__pyx_v_spec);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_spec);
    __Pyx_INCREF(__pyx_v_counter_factory);
    __Pyx_GIVEREF(__pyx_v_counter_factory);
    PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_counter_factory);
    __Pyx_INCREF(__pyx_v_state_sampler);
    __Pyx_GIVEREF(__pyx_v_state_sampler);
    PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_v_state_sampler);

    /* "apache_beam/runners/worker/operations.py":1407
 *         counter_factory,
 *         state_sampler,
 *         shuffle_source=test_shuffle_source)             # <<<<<<<<<<<<<<
 *   elif isinstance(spec, operation_specs.WorkerInMemoryWrite):
 *     op = InMemoryWriteOperation(
 */
    __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1407, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_shuffle_source, __pyx_v_test_shuffle_source) < 0) __PYX_ERR(0, 1407, __pyx_L1_error)

    /* "apache_beam/runners/worker/operations.py":1402
 *   elif isinstance(spec, operation_specs.WorkerUngroupedShuffleRead):
 *     from dataflow_worker.shuffle_operations import UngroupedShuffleReadOperation
 *     op = UngroupedShuffleReadOperation(             # <<<<<<<<<<<<<<
 *         name_context,
 *         spec,
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_UngroupedShuffleReadOperation, __pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1402, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_op = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "apache_beam/runners/worker/operations.py":1400
 *         state_sampler,
 *         shuffle_source=test_shuffle_source)
 *   elif isinstance(spec, operation_specs.WorkerUngroupedShuffleRead):             # <<<<<<<<<<<<<<
 *     from dataflow_worker.shuffle_operations import UngroupedShuffleReadOperation
 *     op = UngroupedShuffleReadOperation(
 */
    goto __pyx_L4;
  }

  /* "apache_beam/runners/worker/operations.py":1408
 *         state_sampler,
 *         shuffle_source=test_shuffle_source)
 *   elif isinstance(spec, operation_specs.WorkerInMemoryWrite):             # <<<<<<<<<<<<<<
 *     op = InMemoryWriteOperation(
 *         name_context, spec, counter_factory, state_sampler)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_operation_specs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_WorkerInMemoryWrite); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = PyObject_IsInstance(__pyx_v_spec, __pyx_t_1); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1408, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_4 != 0);
  if (__pyx_t_3) {

    /* "apache_beam/runners/worker/operations.py":1409
 *         shuffle_source=test_shuffle_source)
 *   elif isinstance(spec, operation_specs.WorkerInMemoryWrite):
 *     op = InMemoryWriteOperation(             # <<<<<<<<<<<<<<
 *         name_context, spec, counter_factory, state_sampler)
 *   elif isinstance(spec, operation_specs.WorkerShuffleWrite):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_InMemoryWriteOperation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1409, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "apache_beam/runners/worker/operations.py":1410
 *   elif isinstance(spec, operation_specs.WorkerInMemoryWrite):
 *     op = InMemoryWriteOperation(
 *         name_context, spec, counter_factory, state_sampler)             # <<<<<<<<<<<<<<
 *   elif isinstance(spec, operation_specs.WorkerShuffleWrite):
 *     from dataflow_worker.shuffle_operations import ShuffleWriteOperation
 */
    __pyx_t_7 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1409, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1409, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1409, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_v_name_context);
      __Pyx_GIVEREF(__pyx_v_name_context);
      PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_6, __pyx_v_name_context);
      __Pyx_INCREF(__pyx_v_spec);
      __Pyx_GIVEREF(__pyx_v_spec);
      PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_6, __pyx_v_spec);
      __Pyx_INCREF(__pyx_v_counter_factory);
      __Pyx_GIVEREF(__pyx_v_counter_factory);
      PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_6, __pyx_v_counter_factory);
      __Pyx_INCREF(__pyx_v_state_sampler);
      __Pyx_GIVEREF(__pyx_v_state_sampler);
      PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_6, __pyx_v_state_sampler);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1409, __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_op = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "apache_beam/runners/worker/operations.py":1408
 *         state_sampler,
 *         shuffle_source=test_shuffle_source)
 *   elif isinstance(spec, operation_specs.WorkerInMemoryWrite):             # <<<<<<<<<<<<<<
 *     op = InMemoryWriteOperation(
 *         name_context, spec, counter_factory, state_sampler)
 */
    goto __pyx_L4;
  }

  /* "apache_beam/runners/worker/operations.py":1411
 *     op = InMemoryWriteOperation(
 *         name_context, spec, counter_factory, state_sampler)
 *   elif isinstance(spec, operation_specs.WorkerShuffleWrite):             # <<<<<<<<<<<<<<
 *     from dataflow_worker.shuffle_operations import ShuffleWriteOperation
 *     op = ShuffleWriteOperation(
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_operation_specs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_WorkerShuffleWrite); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = PyObject_IsInstance(__pyx_v_spec, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1411, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "apache_beam/runners/worker/operations.py":1412
 *         name_context, spec, counter_factory, state_sampler)
 *   elif isinstance(spec, operation_specs.WorkerShuffleWrite):
 *     from dataflow_worker.shuffle_operations import ShuffleWriteOperation             # <<<<<<<<<<<<<<
 *     op = ShuffleWriteOperation(
 *         name_context,
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1412, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_ShuffleWriteOperation);
    __Pyx_GIVEREF(__pyx_n_s_ShuffleWriteOperation);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_ShuffleWriteOperation);
    __pyx_t_1 = __Pyx_Import(__pyx_n_s_dataflow_worker_shuffle_operatio, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1412, __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_ShuffleWriteOperation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1412, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v_ShuffleWriteOperation = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/runners/worker/operations.py":1413
 *   elif isinstance(spec, operation_specs.WorkerShuffleWrite):
 *     from dataflow_worker.shuffle_operations import ShuffleWriteOperation
 *     op = ShuffleWriteOperation(             # <<<<<<<<<<<<<<
 *         name_context,
 *         spec,
 */
    __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_name_context);
    __Pyx_GIVEREF(__pyx_v_name_context);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_name_context);
    __Pyx_INCREF(__pyx_v_spec);
    __Pyx_GIVEREF(__pyx_v_spec);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_spec);
    __Pyx_INCREF(__pyx_v_counter_factory);
    __Pyx_GIVEREF(__pyx_v_counter_factory);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_counter_factory);
    __Pyx_INCREF(__pyx_v_state_sampler);
    __Pyx_GIVEREF(__pyx_v_state_sampler);
    PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_state_sampler);

    /* "apache_beam/runners/worker/operations.py":1418
 *         counter_factory,
 *         state_sampler,
 *         shuffle_sink=test_shuffle_sink)             # <<<<<<<<<<<<<<
 *   elif isinstance(spec, operation_specs.WorkerFlatten):
 *     op = FlattenOperation(name_context, spec, counter_factory, state_sampler)
 */
    __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1418, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shuffle_sink, __pyx_v_test_shuffle_sink) < 0) __PYX_ERR(0, 1418, __pyx_L1_error)

    /* "apache_beam/runners/worker/operations.py":1413
 *   elif isinstance(spec, operation_specs.WorkerShuffleWrite):
 *     from dataflow_worker.shuffle_operations import ShuffleWriteOperation
 *     op = ShuffleWriteOperation(             # <<<<<<<<<<<<<<
 *         name_context,
 *         spec,
 */
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_ShuffleWriteOperation, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_op = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "apache_beam/runners/worker/operations.py":1411
 *     op = InMemoryWriteOperation(
 *         name_context, spec, counter_factory, state_sampler)
 *   elif isinstance(spec, operation_specs.WorkerShuffleWrite):             # <<<<<<<<<<<<<<
 *     from dataflow_worker.shuffle_operations import ShuffleWriteOperation
 *     op = ShuffleWriteOperation(
 */
    goto __pyx_L4;
  }

  /* "apache_beam/runners/worker/operations.py":1419
 *         state_sampler,
 *         shuffle_sink=test_shuffle_sink)
 *   elif isinstance(spec, operation_specs.WorkerFlatten):             # <<<<<<<<<<<<<<
 *     op = FlattenOperation(name_context, spec, counter_factory, state_sampler)
 *   elif isinstance(spec, operation_specs.WorkerMergeWindows):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_operation_specs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_WorkerFlatten); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_4 = PyObject_IsInstance(__pyx_v_spec, __pyx_t_2); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1419, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = (__pyx_t_4 != 0);
  if (__pyx_t_3) {

    /* "apache_beam/runners/worker/operations.py":1420
 *         shuffle_sink=test_shuffle_sink)
 *   elif isinstance(spec, operation_specs.WorkerFlatten):
 *     op = FlattenOperation(name_context, spec, counter_factory, state_sampler)             # <<<<<<<<<<<<<<
 *   elif isinstance(spec, operation_specs.WorkerMergeWindows):
 *     from dataflow_worker.shuffle_operations import BatchGroupAlsoByWindowsOperation
 */
    __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1420, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_name_context);
    __Pyx_GIVEREF(__pyx_v_name_context);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_name_context);
    __Pyx_INCREF(__pyx_v_spec);
    __Pyx_GIVEREF(__pyx_v_spec);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_spec);
    __Pyx_INCREF(__pyx_v_counter_factory);
    __Pyx_GIVEREF(__pyx_v_counter_factory);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_counter_factory);
    __Pyx_INCREF(__pyx_v_state_sampler);
    __Pyx_GIVEREF(__pyx_v_state_sampler);
    PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_state_sampler);
    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_FlattenOperation), __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1420, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_op = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "apache_beam/runners/worker/operations.py":1419
 *         state_sampler,
 *         shuffle_sink=test_shuffle_sink)
 *   elif isinstance(spec, operation_specs.WorkerFlatten):             # <<<<<<<<<<<<<<
 *     op = FlattenOperation(name_context, spec, counter_factory, state_sampler)
 *   elif isinstance(spec, operation_specs.WorkerMergeWindows):
 */
    goto __pyx_L4;
  }

  /* "apache_beam/runners/worker/operations.py":1421
 *   elif isinstance(spec, operation_specs.WorkerFlatten):
 *     op = FlattenOperation(name_context, spec, counter_factory, state_sampler)
 *   elif isinstance(spec, operation_specs.WorkerMergeWindows):             # <<<<<<<<<<<<<<
 *     from dataflow_worker.shuffle_operations import BatchGroupAlsoByWindowsOperation
 *     from dataflow_worker.shuffle_operations import StreamingGroupAlsoByWindowsOperation
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_operation_specs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_WorkerMergeWindows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = PyObject_IsInstance(__pyx_v_spec, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1421, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "apache_beam/runners/worker/operations.py":1422
 *     op = FlattenOperation(name_context, spec, counter_factory, state_sampler)
 *   elif isinstance(spec, operation_specs.WorkerMergeWindows):
 *     from dataflow_worker.shuffle_operations import BatchGroupAlsoByWindowsOperation             # <<<<<<<<<<<<<<
 *     from dataflow_worker.shuffle_operations import StreamingGroupAlsoByWindowsOperation
 *     if is_streaming:
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1422, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_BatchGroupAlsoByWindowsOperation);
    __Pyx_GIVEREF(__pyx_n_s_BatchGroupAlsoByWindowsOperation);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_BatchGroupAlsoByWindowsOperation);
    __pyx_t_5 = __Pyx_Import(__pyx_n_s_dataflow_worker_shuffle_operatio, __pyx_t_2, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1422, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_BatchGroupAlsoByWindowsOperation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1422, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v_BatchGroupAlsoByWindowsOperation = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "apache_beam/runners/worker/operations.py":1423
 *   elif isinstance(spec, operation_specs.WorkerMergeWindows):
 *     from dataflow_worker.shuffle_operations import BatchGroupAlsoByWindowsOperation
 *     from dataflow_worker.shuffle_operations import StreamingGroupAlsoByWindowsOperation             # <<<<<<<<<<<<<<
 *     if is_streaming:
 *       op = StreamingGroupAlsoByWindowsOperation(
 */
    __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1423, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_n_s_StreamingGroupAlsoByWindowsOpera);
    __Pyx_GIVEREF(__pyx_n_s_StreamingGroupAlsoByWindowsOpera);
    PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_StreamingGroupAlsoByWindowsOpera);
    __pyx_t_2 = __Pyx_Import(__pyx_n_s_dataflow_worker_shuffle_operatio, __pyx_t_5, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1423, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_StreamingGroupAlsoByWindowsOpera); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1423, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_v_StreamingGroupAlsoByWindowsOperation = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/runners/worker/operations.py":1424
 *     from dataflow_worker.shuffle_operations import BatchGroupAlsoByWindowsOperation
 *     from dataflow_worker.shuffle_operations import StreamingGroupAlsoByWindowsOperation
 *     if is_streaming:             # <<<<<<<<<<<<<<
 *       op = StreamingGroupAlsoByWindowsOperation(
 *           name_context, spec, counter_factory, state_sampler)
 */
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_is_streaming); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1424, __pyx_L1_error)
    if (__pyx_t_4) {

      /* "apache_beam/runners/worker/operations.py":1426
 *     if is_streaming:
 *       op = StreamingGroupAlsoByWindowsOperation(
 *           name_context, spec, counter_factory, state_sampler)             # <<<<<<<<<<<<<<
 *     else:
 *       op = BatchGroupAlsoByWindowsOperation(
 */
      __Pyx_INCREF(__pyx_v_StreamingGroupAlsoByWindowsOperation);
      __pyx_t_5 = __pyx_v_StreamingGroupAlsoByWindowsOperation; __pyx_t_1 = NULL;
      __pyx_t_6 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_1);
          __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[5] = {__pyx_t_1, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1425, __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_5)) {
        PyObject *__pyx_temp[5] = {__pyx_t_1, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1425, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      {
        __pyx_t_7 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1425, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        if (__pyx_t_1) {
          __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL;
        }
        __Pyx_INCREF(__pyx_v_name_context);
        __Pyx_GIVEREF(__pyx_v_name_context);
        PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_name_context);
        __Pyx_INCREF(__pyx_v_spec);
        __Pyx_GIVEREF(__pyx_v_spec);
        PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_spec);
        __Pyx_INCREF(__pyx_v_counter_factory);
        __Pyx_GIVEREF(__pyx_v_counter_factory);
        PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_v_counter_factory);
        __Pyx_INCREF(__pyx_v_state_sampler);
        __Pyx_GIVEREF(__pyx_v_state_sampler);
        PyTuple_SET_ITEM(__pyx_t_7, 3+__pyx_t_6, __pyx_v_state_sampler);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1425, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_op = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "apache_beam/runners/worker/operations.py":1424
 *     from dataflow_worker.shuffle_operations import BatchGroupAlsoByWindowsOperation
 *     from dataflow_worker.shuffle_operations import StreamingGroupAlsoByWindowsOperation
 *     if is_streaming:             # <<<<<<<<<<<<<<
 *       op = StreamingGroupAlsoByWindowsOperation(
 *           name_context, spec, counter_factory, state_sampler)
 */
      goto __pyx_L6;
    }

    /* "apache_beam/runners/worker/operations.py":1428
 *           name_context, spec, counter_factory, state_sampler)
 *     else:
 *       op = BatchGroupAlsoByWindowsOperation(             # <<<<<<<<<<<<<<
 *           name_context, spec, counter_factory, state_sampler)
 *   elif isinstance(spec, operation_specs.WorkerReifyTimestampAndWindows):
 */
    /*else*/ {

      /* "apache_beam/runners/worker/operations.py":1429
 *     else:
 *       op = BatchGroupAlsoByWindowsOperation(
 *           name_context, spec, counter_factory, state_sampler)             # <<<<<<<<<<<<<<
 *   elif isinstance(spec, operation_specs.WorkerReifyTimestampAndWindows):
 *     from dataflow_worker.shuffle_operations import ReifyTimestampAndWindowsOperation
 */
      __Pyx_INCREF(__pyx_v_BatchGroupAlsoByWindowsOperation);
      __pyx_t_5 = __pyx_v_BatchGroupAlsoByWindowsOperation; __pyx_t_7 = NULL;
      __pyx_t_6 = 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_6 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1428, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1428, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      {
        __pyx_t_1 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1428, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        if (__pyx_t_7) {
          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7); __pyx_t_7 = NULL;
        }
        __Pyx_INCREF(__pyx_v_name_context);
        __Pyx_GIVEREF(__pyx_v_name_context);
        PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_6, __pyx_v_name_context);
        __Pyx_INCREF(__pyx_v_spec);
        __Pyx_GIVEREF(__pyx_v_spec);
        PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_6, __pyx_v_spec);
        __Pyx_INCREF(__pyx_v_counter_factory);
        __Pyx_GIVEREF(__pyx_v_counter_factory);
        PyTuple_SET_ITEM(__pyx_t_1, 2+__pyx_t_6, __pyx_v_counter_factory);
        __Pyx_INCREF(__pyx_v_state_sampler);
        __Pyx_GIVEREF(__pyx_v_state_sampler);
        PyTuple_SET_ITEM(__pyx_t_1, 3+__pyx_t_6, __pyx_v_state_sampler);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1428, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_op = __pyx_t_2;
      __pyx_t_2 = 0;
    }
    __pyx_L6:;

    /* "apache_beam/runners/worker/operations.py":1421
 *   elif isinstance(spec, operation_specs.WorkerFlatten):
 *     op = FlattenOperation(name_context, spec, counter_factory, state_sampler)
 *   elif isinstance(spec, operation_specs.WorkerMergeWindows):             # <<<<<<<<<<<<<<
 *     from dataflow_worker.shuffle_operations import BatchGroupAlsoByWindowsOperation
 *     from dataflow_worker.shuffle_operations import StreamingGroupAlsoByWindowsOperation
 */
    goto __pyx_L4;
  }

  /* "apache_beam/runners/worker/operations.py":1430
 *       op = BatchGroupAlsoByWindowsOperation(
 *           name_context, spec, counter_factory, state_sampler)
 *   elif isinstance(spec, operation_specs.WorkerReifyTimestampAndWindows):             # <<<<<<<<<<<<<<
 *     from dataflow_worker.shuffle_operations import ReifyTimestampAndWindowsOperation
 *     op = ReifyTimestampAndWindowsOperation(
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_operation_specs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_WorkerReifyTimestampAndWindows); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = PyObject_IsInstance(__pyx_v_spec, __pyx_t_5); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1430, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__pyx_t_4 != 0);
  if (likely(__pyx_t_3)) {

    /* "apache_beam/runners/worker/operations.py":1431
 *           name_context, spec, counter_factory, state_sampler)
 *   elif isinstance(spec, operation_specs.WorkerReifyTimestampAndWindows):
 *     from dataflow_worker.shuffle_operations import ReifyTimestampAndWindowsOperation             # <<<<<<<<<<<<<<
 *     op = ReifyTimestampAndWindowsOperation(
 *         name_context, spec, counter_factory, state_sampler)
 */
    __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1431, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_n_s_ReifyTimestampAndWindowsOperatio);
    __Pyx_GIVEREF(__pyx_n_s_ReifyTimestampAndWindowsOperatio);
    PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_ReifyTimestampAndWindowsOperatio);
    __pyx_t_2 = __Pyx_Import(__pyx_n_s_dataflow_worker_shuffle_operatio, __pyx_t_5, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1431, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_ReifyTimestampAndWindowsOperatio); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1431, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_v_ReifyTimestampAndWindowsOperation = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/runners/worker/operations.py":1433
 *     from dataflow_worker.shuffle_operations import ReifyTimestampAndWindowsOperation
 *     op = ReifyTimestampAndWindowsOperation(
 *         name_context, spec, counter_factory, state_sampler)             # <<<<<<<<<<<<<<
 *   else:
 *     raise TypeError(
 */
    __Pyx_INCREF(__pyx_v_ReifyTimestampAndWindowsOperation);
    __pyx_t_5 = __pyx_v_ReifyTimestampAndWindowsOperation; __pyx_t_1 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_1);
        __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[5] = {__pyx_t_1, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1432, __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_5)) {
      PyObject *__pyx_temp[5] = {__pyx_t_1, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1432, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1432, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_1) {
        __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL;
      }
      __Pyx_INCREF(__pyx_v_name_context);
      __Pyx_GIVEREF(__pyx_v_name_context);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_name_context);
      __Pyx_INCREF(__pyx_v_spec);
      __Pyx_GIVEREF(__pyx_v_spec);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_spec);
      __Pyx_INCREF(__pyx_v_counter_factory);
      __Pyx_GIVEREF(__pyx_v_counter_factory);
      PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_v_counter_factory);
      __Pyx_INCREF(__pyx_v_state_sampler);
      __Pyx_GIVEREF(__pyx_v_state_sampler);
      PyTuple_SET_ITEM(__pyx_t_7, 3+__pyx_t_6, __pyx_v_state_sampler);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1432, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_op = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "apache_beam/runners/worker/operations.py":1430
 *       op = BatchGroupAlsoByWindowsOperation(
 *           name_context, spec, counter_factory, state_sampler)
 *   elif isinstance(spec, operation_specs.WorkerReifyTimestampAndWindows):             # <<<<<<<<<<<<<<
 *     from dataflow_worker.shuffle_operations import ReifyTimestampAndWindowsOperation
 *     op = ReifyTimestampAndWindowsOperation(
 */
    goto __pyx_L4;
  }

  /* "apache_beam/runners/worker/operations.py":1435
 *         name_context, spec, counter_factory, state_sampler)
 *   else:
 *     raise TypeError(             # <<<<<<<<<<<<<<
 *         'Expected an instance of operation_specs.Worker* class '
 *         'instead of %s' % (spec, ))
 */
  /*else*/ {

    /* "apache_beam/runners/worker/operations.py":1437
 *     raise TypeError(
 *         'Expected an instance of operation_specs.Worker* class '
 *         'instead of %s' % (spec, ))             # <<<<<<<<<<<<<<
 *   return op
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_spec), __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1437, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "apache_beam/runners/worker/operations.py":1436
 *   else:
 *     raise TypeError(
 *         'Expected an instance of operation_specs.Worker* class '             # <<<<<<<<<<<<<<
 *         'instead of %s' % (spec, ))
 *   return op
 */
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Expected_an_instance_of_operatio, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1436, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/runners/worker/operations.py":1435
 *         name_context, spec, counter_factory, state_sampler)
 *   else:
 *     raise TypeError(             # <<<<<<<<<<<<<<
 *         'Expected an instance of operation_specs.Worker* class '
 *         'instead of %s' % (spec, ))
 */
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1435, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1435, __pyx_L1_error)
  }
  __pyx_L4:;

  /* "apache_beam/runners/worker/operations.py":1438
 *         'Expected an instance of operation_specs.Worker* class '
 *         'instead of %s' % (spec, ))
 *   return op             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_op);
  __pyx_r = __pyx_v_op;
  goto __pyx_L0;

  /* "apache_beam/runners/worker/operations.py":1357
 * 
 * 
 * def create_operation(             # <<<<<<<<<<<<<<
 *     name_context,
 *     spec,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.create_operation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_op);
  __Pyx_XDECREF(__pyx_v_NativeReadOperation);
  __Pyx_XDECREF(__pyx_v_NativeWriteOperation);
  __Pyx_XDECREF(__pyx_v_GroupedShuffleReadOperation);
  __Pyx_XDECREF(__pyx_v_UngroupedShuffleReadOperation);
  __Pyx_XDECREF(__pyx_v_ShuffleWriteOperation);
  __Pyx_XDECREF(__pyx_v_BatchGroupAlsoByWindowsOperation);
  __Pyx_XDECREF(__pyx_v_StreamingGroupAlsoByWindowsOperation);
  __Pyx_XDECREF(__pyx_v_ReifyTimestampAndWindowsOperation);
  __Pyx_XDECREF(__pyx_v_name_context);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":1447
 *    task.
 *   """
 *   def __init__(             # <<<<<<<<<<<<<<
 *       self,
 *       map_task,
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor___init__[] = "Initializes SimpleMapTaskExecutor.\n\n    Args:\n      map_task: The map task we are to run. The maptask contains a list of\n        operations, and aligned lists for step_names, original_names,\n        system_names of pipeline steps.\n      counter_factory: The CounterFactory instance for the work item.\n      state_sampler: The StateSampler tracking the execution step.\n      test_shuffle_source: Used during tests for dependency injection into\n        shuffle read operation objects.\n      test_shuffle_sink: Used during tests for dependency injection into\n        shuffle write operation objects.\n    ";
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor___init__};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_map_task = 0;
  PyObject *__pyx_v_counter_factory = 0;
  PyObject *__pyx_v_state_sampler = 0;
  PyObject *__pyx_v_test_shuffle_source = 0;
  PyObject *__pyx_v_test_shuffle_sink = 0;
  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_map_task,&__pyx_n_s_counter_factory,&__pyx_n_s_state_sampler,&__pyx_n_s_test_shuffle_source,&__pyx_n_s_test_shuffle_sink,0};
    PyObject* values[6] = {0,0,0,0,0,0};

    /* "apache_beam/runners/worker/operations.py":1452
 *       counter_factory,
 *       state_sampler,
 *       test_shuffle_source=None,             # <<<<<<<<<<<<<<
 *       test_shuffle_sink=None):
 *     """Initializes SimpleMapTaskExecutor.
 */
    values[4] = ((PyObject *)((PyObject *)Py_None));

    /* "apache_beam/runners/worker/operations.py":1453
 *       state_sampler,
 *       test_shuffle_source=None,
 *       test_shuffle_sink=None):             # <<<<<<<<<<<<<<
 *     """Initializes SimpleMapTaskExecutor.
 * 
 */
    values[5] = ((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  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_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_map_task)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 6, 1); __PYX_ERR(0, 1447, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_counter_factory)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 6, 2); __PYX_ERR(0, 1447, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_state_sampler)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 6, 3); __PYX_ERR(0, 1447, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_test_shuffle_source);
          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_test_shuffle_sink);
          if (value) { values[5] = 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, 1447, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_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);
        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_self = values[0];
    __pyx_v_map_task = values[1];
    __pyx_v_counter_factory = values[2];
    __pyx_v_state_sampler = values[3];
    __pyx_v_test_shuffle_source = values[4];
    __pyx_v_test_shuffle_sink = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1447, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.SimpleMapTaskExecutor.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor___init__(__pyx_self, __pyx_v_self, __pyx_v_map_task, __pyx_v_counter_factory, __pyx_v_state_sampler, __pyx_v_test_shuffle_source, __pyx_v_test_shuffle_sink);

  /* "apache_beam/runners/worker/operations.py":1447
 *    task.
 *   """
 *   def __init__(             # <<<<<<<<<<<<<<
 *       self,
 *       map_task,
 */

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_map_task, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_state_sampler, PyObject *__pyx_v_test_shuffle_source, PyObject *__pyx_v_test_shuffle_sink) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__120)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 1447, 0, __PYX_ERR(0, 1447, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":1468
 *     """
 * 
 *     self._map_task = map_task             # <<<<<<<<<<<<<<
 *     self._counter_factory = counter_factory
 *     self._ops = []  # type: List[Operation]
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_map_task_2, __pyx_v_map_task) < 0) __PYX_ERR(0, 1468, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":1469
 * 
 *     self._map_task = map_task
 *     self._counter_factory = counter_factory             # <<<<<<<<<<<<<<
 *     self._ops = []  # type: List[Operation]
 *     self._state_sampler = state_sampler
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter_factory_2, __pyx_v_counter_factory) < 0) __PYX_ERR(0, 1469, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":1470
 *     self._map_task = map_task
 *     self._counter_factory = counter_factory
 *     self._ops = []  # type: List[Operation]             # <<<<<<<<<<<<<<
 *     self._state_sampler = state_sampler
 *     self._test_shuffle_source = test_shuffle_source
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_ops, __pyx_t_1) < 0) __PYX_ERR(0, 1470, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":1471
 *     self._counter_factory = counter_factory
 *     self._ops = []  # type: List[Operation]
 *     self._state_sampler = state_sampler             # <<<<<<<<<<<<<<
 *     self._test_shuffle_source = test_shuffle_source
 *     self._test_shuffle_sink = test_shuffle_sink
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_state_sampler_2, __pyx_v_state_sampler) < 0) __PYX_ERR(0, 1471, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":1472
 *     self._ops = []  # type: List[Operation]
 *     self._state_sampler = state_sampler
 *     self._test_shuffle_source = test_shuffle_source             # <<<<<<<<<<<<<<
 *     self._test_shuffle_sink = test_shuffle_sink
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_test_shuffle_source_2, __pyx_v_test_shuffle_source) < 0) __PYX_ERR(0, 1472, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":1473
 *     self._state_sampler = state_sampler
 *     self._test_shuffle_source = test_shuffle_source
 *     self._test_shuffle_sink = test_shuffle_sink             # <<<<<<<<<<<<<<
 * 
 *   def operations(self):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_test_shuffle_sink_2, __pyx_v_test_shuffle_sink) < 0) __PYX_ERR(0, 1473, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":1447
 *    task.
 *   """
 *   def __init__(             # <<<<<<<<<<<<<<
 *       self,
 *       map_task,
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.SimpleMapTaskExecutor.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":1475
 *     self._test_shuffle_sink = test_shuffle_sink
 * 
 *   def operations(self):             # <<<<<<<<<<<<<<
 *     # type: () -> List[Operation]
 *     return self._ops[:]
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_3operations(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_3operations = {"operations", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_3operations, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_3operations(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("operations (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_2operations(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_2operations(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_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__121)
  __Pyx_RefNannySetupContext("operations", 0);
  __Pyx_TraceCall("operations", __pyx_f[0], 1475, 0, __PYX_ERR(0, 1475, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":1477
 *   def operations(self):
 *     # type: () -> List[Operation]
 *     return self._ops[:]             # <<<<<<<<<<<<<<
 * 
 *   def execute(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ops); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 0, NULL, NULL, &__pyx_slice__122, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "apache_beam/runners/worker/operations.py":1475
 *     self._test_shuffle_sink = test_shuffle_sink
 * 
 *   def operations(self):             # <<<<<<<<<<<<<<
 *     # type: () -> List[Operation]
 *     return self._ops[:]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.SimpleMapTaskExecutor.operations", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":1479
 *     return self._ops[:]
 * 
 *   def execute(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_5execute(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_4execute[] = "Executes all the operation_specs.Worker* instructions in a map task.\n\n    We update the map_task with the execution status, expressed as counters.\n\n    Raises:\n      RuntimeError: if we find more than on read instruction in task spec.\n      TypeError: if the spec parameter is not an instance of the recognized\n        operation_specs.Worker* classes.\n    ";
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_5execute = {"execute", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_5execute, METH_O, __pyx_doc_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_4execute};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_5execute(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("execute (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_4execute(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_4execute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_name_context = NULL;
  PyObject *__pyx_v_spec = NULL;
  PyObject *__pyx_v_op = NULL;
  PyObject *__pyx_v_producer = NULL;
  PyObject *__pyx_v_output_index = NULL;
  PyObject *__pyx_v_ix = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_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 *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  PyObject *(*__pyx_t_14)(PyObject *);
  PyObject *__pyx_t_15 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__123)
  __Pyx_RefNannySetupContext("execute", 0);
  __Pyx_TraceCall("execute", __pyx_f[0], 1479, 0, __PYX_ERR(0, 1479, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":1495
 *     # The order of the elements is important because the inputs use
 *     # list indexes as references.
 *     for name_context, spec in zip(self._map_task.name_contexts,             # <<<<<<<<<<<<<<
 *                                   self._map_task.operations):
 *       # This is used for logging and assigning names to counters.
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_map_task_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name_contexts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":1496
 *     # list indexes as references.
 *     for name_context, spec in zip(self._map_task.name_contexts,
 *                                   self._map_task.operations):             # <<<<<<<<<<<<<<
 *       # This is used for logging and assigning names to counters.
 *       op = create_operation(
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_map_task_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_operations); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":1495
 *     # The order of the elements is important because the inputs use
 *     # list indexes as references.
 *     for name_context, spec in zip(self._map_task.name_contexts,             # <<<<<<<<<<<<<<
 *                                   self._map_task.operations):
 *       # This is used for logging and assigning names to counters.
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1495, __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_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
    __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1495, __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, 1495, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  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_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1495, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1495, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1495, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1495, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      }
    } else {
      __pyx_t_3 = __pyx_t_5(__pyx_t_1);
      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, 1495, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
      PyObject* sequence = __pyx_t_3;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 1495, __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_6 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_6);
      #else
      __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1495, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1495, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1495, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
      index = 0; __pyx_t_2 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 1495, __pyx_L1_error)
      __pyx_t_8 = 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_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 1495, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_name_context, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_spec, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "apache_beam/runners/worker/operations.py":1498
 *                                   self._map_task.operations):
 *       # This is used for logging and assigning names to counters.
 *       op = create_operation(             # <<<<<<<<<<<<<<
 *           name_context,
 *           spec,
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_create_operation); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1498, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);

    /* "apache_beam/runners/worker/operations.py":1501
 *           name_context,
 *           spec,
 *           self._counter_factory,             # <<<<<<<<<<<<<<
 *           None,
 *           self._state_sampler,
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_counter_factory_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1501, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);

    /* "apache_beam/runners/worker/operations.py":1503
 *           self._counter_factory,
 *           None,
 *           self._state_sampler,             # <<<<<<<<<<<<<<
 *           test_shuffle_source=self._test_shuffle_source,
 *           test_shuffle_sink=self._test_shuffle_sink)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_state_sampler_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "apache_beam/runners/worker/operations.py":1498
 *                                   self._map_task.operations):
 *       # This is used for logging and assigning names to counters.
 *       op = create_operation(             # <<<<<<<<<<<<<<
 *           name_context,
 *           spec,
 */
    __pyx_t_7 = PyTuple_New(5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1498, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_v_name_context);
    __Pyx_GIVEREF(__pyx_v_name_context);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_name_context);
    __Pyx_INCREF(__pyx_v_spec);
    __Pyx_GIVEREF(__pyx_v_spec);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_spec);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_6);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_7, 3, Py_None);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_t_2);
    __pyx_t_6 = 0;
    __pyx_t_2 = 0;

    /* "apache_beam/runners/worker/operations.py":1504
 *           None,
 *           self._state_sampler,
 *           test_shuffle_source=self._test_shuffle_source,             # <<<<<<<<<<<<<<
 *           test_shuffle_sink=self._test_shuffle_sink)
 *       self._ops.append(op)
 */
    __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_test_shuffle_source_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_test_shuffle_source, __pyx_t_6) < 0) __PYX_ERR(0, 1504, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "apache_beam/runners/worker/operations.py":1505
 *           self._state_sampler,
 *           test_shuffle_source=self._test_shuffle_source,
 *           test_shuffle_sink=self._test_shuffle_sink)             # <<<<<<<<<<<<<<
 *       self._ops.append(op)
 * 
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_test_shuffle_sink_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_test_shuffle_sink, __pyx_t_6) < 0) __PYX_ERR(0, 1504, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "apache_beam/runners/worker/operations.py":1498
 *                                   self._map_task.operations):
 *       # This is used for logging and assigning names to counters.
 *       op = create_operation(             # <<<<<<<<<<<<<<
 *           name_context,
 *           spec,
 */
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1498, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_op, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "apache_beam/runners/worker/operations.py":1506
 *           test_shuffle_source=self._test_shuffle_source,
 *           test_shuffle_sink=self._test_shuffle_sink)
 *       self._ops.append(op)             # <<<<<<<<<<<<<<
 * 
 *       # Add receiver operations to the appropriate producers.
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ops); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1506, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_9 = __Pyx_PyObject_Append(__pyx_t_6, __pyx_v_op); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 1506, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "apache_beam/runners/worker/operations.py":1509
 * 
 *       # Add receiver operations to the appropriate producers.
 *       if hasattr(op.spec, 'input'):             # <<<<<<<<<<<<<<
 *         producer, output_index = op.spec.input
 *         self._ops[producer].add_receiver(op, output_index)
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_op, __pyx_n_s_spec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1509, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_10 = __Pyx_HasAttr(__pyx_t_6, __pyx_n_u_input); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1509, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_11 = (__pyx_t_10 != 0);
    if (__pyx_t_11) {

      /* "apache_beam/runners/worker/operations.py":1510
 *       # Add receiver operations to the appropriate producers.
 *       if hasattr(op.spec, 'input'):
 *         producer, output_index = op.spec.input             # <<<<<<<<<<<<<<
 *         self._ops[producer].add_receiver(op, output_index)
 *       # Flatten has 'inputs', not 'input'
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_op, __pyx_n_s_spec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1510, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_input); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1510, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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, 1510, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        #else
        __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1510, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1510, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1510, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext;
        index = 0; __pyx_t_6 = __pyx_t_8(__pyx_t_3); if (unlikely(!__pyx_t_6)) goto __pyx_L8_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_6);
        index = 1; __pyx_t_7 = __pyx_t_8(__pyx_t_3); if (unlikely(!__pyx_t_7)) goto __pyx_L8_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_7);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_3), 2) < 0) __PYX_ERR(0, 1510, __pyx_L1_error)
        __pyx_t_8 = 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_8 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 1510, __pyx_L1_error)
        __pyx_L9_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_producer, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_output_index, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "apache_beam/runners/worker/operations.py":1511
 *       if hasattr(op.spec, 'input'):
 *         producer, output_index = op.spec.input
 *         self._ops[producer].add_receiver(op, output_index)             # <<<<<<<<<<<<<<
 *       # Flatten has 'inputs', not 'input'
 *       if hasattr(op.spec, 'inputs'):
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ops); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1511, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_v_producer); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1511, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_add_receiver); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1511, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_12 = 0;
      if (CYTHON_UNPACK_METHODS && likely(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_12 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_op, __pyx_v_output_index};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1511, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_op, __pyx_v_output_index};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1511, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      {
        __pyx_t_3 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1511, __pyx_L1_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(__pyx_v_op);
        __Pyx_GIVEREF(__pyx_v_op);
        PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_12, __pyx_v_op);
        __Pyx_INCREF(__pyx_v_output_index);
        __Pyx_GIVEREF(__pyx_v_output_index);
        PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_12, __pyx_v_output_index);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1511, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "apache_beam/runners/worker/operations.py":1509
 * 
 *       # Add receiver operations to the appropriate producers.
 *       if hasattr(op.spec, 'input'):             # <<<<<<<<<<<<<<
 *         producer, output_index = op.spec.input
 *         self._ops[producer].add_receiver(op, output_index)
 */
    }

    /* "apache_beam/runners/worker/operations.py":1513
 *         self._ops[producer].add_receiver(op, output_index)
 *       # Flatten has 'inputs', not 'input'
 *       if hasattr(op.spec, 'inputs'):             # <<<<<<<<<<<<<<
 *         for producer, output_index in op.spec.inputs:
 *           self._ops[producer].add_receiver(op, output_index)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_op, __pyx_n_s_spec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1513, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_11 = __Pyx_HasAttr(__pyx_t_2, __pyx_n_u_inputs); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 1513, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_10 = (__pyx_t_11 != 0);
    if (__pyx_t_10) {

      /* "apache_beam/runners/worker/operations.py":1514
 *       # Flatten has 'inputs', not 'input'
 *       if hasattr(op.spec, 'inputs'):
 *         for producer, output_index in op.spec.inputs:             # <<<<<<<<<<<<<<
 *           self._ops[producer].add_receiver(op, output_index)
 * 
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_op, __pyx_n_s_spec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1514, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_inputs); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1514, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
        __pyx_t_2 = __pyx_t_7; __Pyx_INCREF(__pyx_t_2); __pyx_t_13 = 0;
        __pyx_t_14 = NULL;
      } else {
        __pyx_t_13 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1514, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_14 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1514, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      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_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_13); __Pyx_INCREF(__pyx_t_7); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 1514, __pyx_L1_error)
            #else
            __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1514, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            #endif
          } else {
            if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_13); __Pyx_INCREF(__pyx_t_7); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 1514, __pyx_L1_error)
            #else
            __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1514, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            #endif
          }
        } else {
          __pyx_t_7 = __pyx_t_14(__pyx_t_2);
          if (unlikely(!__pyx_t_7)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 1514, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_7);
        }
        if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) {
          PyObject* sequence = __pyx_t_7;
          Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
          if (unlikely(size != 2)) {
            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            __PYX_ERR(0, 1514, __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_6 = PyTuple_GET_ITEM(sequence, 1); 
          } else {
            __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_6 = PyList_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, 1514, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1514, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_15 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1514, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_8 = Py_TYPE(__pyx_t_15)->tp_iternext;
          index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_15); if (unlikely(!__pyx_t_3)) goto __pyx_L13_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_3);
          index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_15); if (unlikely(!__pyx_t_6)) goto __pyx_L13_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_6);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_15), 2) < 0) __PYX_ERR(0, 1514, __pyx_L1_error)
          __pyx_t_8 = NULL;
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          goto __pyx_L14_unpacking_done;
          __pyx_L13_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __pyx_t_8 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(0, 1514, __pyx_L1_error)
          __pyx_L14_unpacking_done:;
        }
        __Pyx_XDECREF_SET(__pyx_v_producer, __pyx_t_3);
        __pyx_t_3 = 0;
        __Pyx_XDECREF_SET(__pyx_v_output_index, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "apache_beam/runners/worker/operations.py":1515
 *       if hasattr(op.spec, 'inputs'):
 *         for producer, output_index in op.spec.inputs:
 *           self._ops[producer].add_receiver(op, output_index)             # <<<<<<<<<<<<<<
 * 
 *     for ix, op in reversed(list(enumerate(self._ops))):
 */
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ops); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1515, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_v_producer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1515, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_add_receiver); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1515, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = NULL;
        __pyx_t_12 = 0;
        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_12 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_6)) {
          PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_op, __pyx_v_output_index};
          __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1515, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_GOTREF(__pyx_t_7);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
          PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_op, __pyx_v_output_index};
          __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1515, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_GOTREF(__pyx_t_7);
        } else
        #endif
        {
          __pyx_t_15 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1515, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          if (__pyx_t_3) {
            __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_3); __pyx_t_3 = NULL;
          }
          __Pyx_INCREF(__pyx_v_op);
          __Pyx_GIVEREF(__pyx_v_op);
          PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_12, __pyx_v_op);
          __Pyx_INCREF(__pyx_v_output_index);
          __Pyx_GIVEREF(__pyx_v_output_index);
          PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_12, __pyx_v_output_index);
          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_15, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1515, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        }
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "apache_beam/runners/worker/operations.py":1514
 *       # Flatten has 'inputs', not 'input'
 *       if hasattr(op.spec, 'inputs'):
 *         for producer, output_index in op.spec.inputs:             # <<<<<<<<<<<<<<
 *           self._ops[producer].add_receiver(op, output_index)
 * 
 */
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "apache_beam/runners/worker/operations.py":1513
 *         self._ops[producer].add_receiver(op, output_index)
 *       # Flatten has 'inputs', not 'input'
 *       if hasattr(op.spec, 'inputs'):             # <<<<<<<<<<<<<<
 *         for producer, output_index in op.spec.inputs:
 *           self._ops[producer].add_receiver(op, output_index)
 */
    }

    /* "apache_beam/runners/worker/operations.py":1495
 *     # The order of the elements is important because the inputs use
 *     # list indexes as references.
 *     for name_context, spec in zip(self._map_task.name_contexts,             # <<<<<<<<<<<<<<
 *                                   self._map_task.operations):
 *       # This is used for logging and assigning names to counters.
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":1517
 *           self._ops[producer].add_receiver(op, output_index)
 * 
 *     for ix, op in reversed(list(enumerate(self._ops))):             # <<<<<<<<<<<<<<
 *       _LOGGER.debug('Starting op %d %s', ix, op)
 *       op.start()
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ops); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_enumerate, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PySequence_List(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = PyList_GET_SIZE(__pyx_t_2) - 1;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (__pyx_t_4 < 0) break;
    if (__pyx_t_4 >= 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_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4--; if (unlikely(0 < 0)) __PYX_ERR(0, 1517, __pyx_L1_error)
    #else
    __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4--; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1517, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    #endif
    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, 1517, __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_6 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_7 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_6);
      #else
      __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1517, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1517, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_15 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1517, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_8 = Py_TYPE(__pyx_t_15)->tp_iternext;
      index = 0; __pyx_t_7 = __pyx_t_8(__pyx_t_15); if (unlikely(!__pyx_t_7)) goto __pyx_L17_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_15); if (unlikely(!__pyx_t_6)) goto __pyx_L17_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_15), 2) < 0) __PYX_ERR(0, 1517, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      goto __pyx_L18_unpacking_done;
      __pyx_L17_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 1517, __pyx_L1_error)
      __pyx_L18_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_ix, __pyx_t_7);
    __pyx_t_7 = 0;
    __Pyx_XDECREF_SET(__pyx_v_op, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "apache_beam/runners/worker/operations.py":1518
 * 
 *     for ix, op in reversed(list(enumerate(self._ops))):
 *       _LOGGER.debug('Starting op %d %s', ix, op)             # <<<<<<<<<<<<<<
 *       op.start()
 *     for op in self._ops:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_LOGGER); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1518, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_debug); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1518, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    __pyx_t_12 = 0;
    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_12 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_kp_u_Starting_op_d_s, __pyx_v_ix, __pyx_v_op};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1518, __pyx_L1_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_7)) {
      PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_kp_u_Starting_op_d_s, __pyx_v_ix, __pyx_v_op};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1518, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_15 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1518, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      if (__pyx_t_6) {
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_u_Starting_op_d_s);
      __Pyx_GIVEREF(__pyx_kp_u_Starting_op_d_s);
      PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_12, __pyx_kp_u_Starting_op_d_s);
      __Pyx_INCREF(__pyx_v_ix);
      __Pyx_GIVEREF(__pyx_v_ix);
      PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_12, __pyx_v_ix);
      __Pyx_INCREF(__pyx_v_op);
      __Pyx_GIVEREF(__pyx_v_op);
      PyTuple_SET_ITEM(__pyx_t_15, 2+__pyx_t_12, __pyx_v_op);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1518, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/runners/worker/operations.py":1519
 *     for ix, op in reversed(list(enumerate(self._ops))):
 *       _LOGGER.debug('Starting op %d %s', ix, op)
 *       op.start()             # <<<<<<<<<<<<<<
 *     for op in self._ops:
 *       op.finish()
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_op, __pyx_n_s_start); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1519, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_15 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_15)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_15);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_15) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_15) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1519, __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;

    /* "apache_beam/runners/worker/operations.py":1517
 *           self._ops[producer].add_receiver(op, output_index)
 * 
 *     for ix, op in reversed(list(enumerate(self._ops))):             # <<<<<<<<<<<<<<
 *       _LOGGER.debug('Starting op %d %s', ix, op)
 *       op.start()
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":1520
 *       _LOGGER.debug('Starting op %d %s', ix, op)
 *       op.start()
 *     for op in self._ops:             # <<<<<<<<<<<<<<
 *       op.finish()
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ops); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1520, __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_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1520, __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, 1520, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  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, 1520, __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, 1520, __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, 1520, __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, 1520, __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, 1520, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_op, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "apache_beam/runners/worker/operations.py":1521
 *       op.start()
 *     for op in self._ops:
 *       op.finish()             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_op, __pyx_n_s_finish); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1521, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_15 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_15)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_15);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_2 = (__pyx_t_15) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_15) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1521, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/runners/worker/operations.py":1520
 *       _LOGGER.debug('Starting op %d %s', ix, op)
 *       op.start()
 *     for op in self._ops:             # <<<<<<<<<<<<<<
 *       op.finish()
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":1479
 *     return self._ops[:]
 * 
 *   def execute(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.SimpleMapTaskExecutor.execute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name_context);
  __Pyx_XDECREF(__pyx_v_spec);
  __Pyx_XDECREF(__pyx_v_op);
  __Pyx_XDECREF(__pyx_v_producer);
  __Pyx_XDECREF(__pyx_v_output_index);
  __Pyx_XDECREF(__pyx_v_ix);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_ConsumerSet(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9__pyx_unpickle_ConsumerSet(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9__pyx_unpickle_ConsumerSet = {"__pyx_unpickle_ConsumerSet", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9__pyx_unpickle_ConsumerSet, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9__pyx_unpickle_ConsumerSet(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_ConsumerSet (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_ConsumerSet", 1, 3, 3, 1); __PYX_ERR(2, 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_ConsumerSet", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_ConsumerSet") < 0)) __PYX_ERR(2, 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(2, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ConsumerSet", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_ConsumerSet", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_8__pyx_unpickle_ConsumerSet(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_8__pyx_unpickle_ConsumerSet(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_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__124)
  __Pyx_RefNannySetupContext("__pyx_unpickle_ConsumerSet", 0);
  __Pyx_TraceCall("__pyx_unpickle_ConsumerSet", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error));

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x94398cf, 0xdda7ffa, 0xb6f3513):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x94398cf, 0xdda7ffa, 0xb6f3513) = (coder, consumers, element_sampler, execution_context, opcounter, output_index, output_sampler, step_name))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__125, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 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 (0x94398cf, 0xdda7ffa, 0xb6f3513):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x94398cf, 0xdda7ffa, 0xb6f3513) = (coder, consumers, element_sampler, execution_context, opcounter, output_index, output_sampler, step_name))" % __pyx_checksum)
 *     __pyx_result = ConsumerSet.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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(2, 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(2, 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 (0x94398cf, 0xdda7ffa, 0xb6f3513):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x94398cf, 0xdda7ffa, 0xb6f3513) = (coder, consumers, element_sampler, execution_context, opcounter, output_index, output_sampler, step_name))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = ConsumerSet.__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(2, 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(2, 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(2, 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(2, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x94398cf, 0xdda7ffa, 0xb6f3513):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x94398cf, 0xdda7ffa, 0xb6f3513) = (coder, consumers, element_sampler, execution_context, opcounter, output_index, output_sampler, step_name))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x94398cf, 0xdda7ffa, 0xb6f3513) = (coder, consumers, element_sampler, execution_context, opcounter, output_index, output_sampler, step_name))" % __pyx_checksum)
 *     __pyx_result = ConsumerSet.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ConsumerSet__set_state(<ConsumerSet> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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(2, 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 (0x94398cf, 0xdda7ffa, 0xb6f3513) = (coder, consumers, element_sampler, execution_context, opcounter, output_index, output_sampler, step_name))" % __pyx_checksum)
 *     __pyx_result = ConsumerSet.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_ConsumerSet__set_state(<ConsumerSet> __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 = ConsumerSet.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ConsumerSet__set_state(<ConsumerSet> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_ConsumerSet__set_state(ConsumerSet __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(2, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_ConsumerSet__set_state(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 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 (0x94398cf, 0xdda7ffa, 0xb6f3513) = (coder, consumers, element_sampler, execution_context, opcounter, output_index, output_sampler, step_name))" % __pyx_checksum)
 *     __pyx_result = ConsumerSet.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_ConsumerSet__set_state(<ConsumerSet> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ConsumerSet__set_state(<ConsumerSet> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_ConsumerSet__set_state(ConsumerSet __pyx_result, tuple __pyx_state):
 *     __pyx_result.coder = __pyx_state[0]; __pyx_result.consumers = __pyx_state[1]; __pyx_result.element_sampler = __pyx_state[2]; __pyx_result.execution_context = __pyx_state[3]; __pyx_result.opcounter = __pyx_state[4]; __pyx_result.output_index = __pyx_state[5]; __pyx_result.output_sampler = __pyx_state[6]; __pyx_result.step_name = __pyx_state[7]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_ConsumerSet(__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.worker.operations.__pyx_unpickle_ConsumerSet", __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_ConsumerSet__set_state(<ConsumerSet> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_ConsumerSet__set_state(ConsumerSet __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.coder = __pyx_state[0]; __pyx_result.consumers = __pyx_state[1]; __pyx_result.element_sampler = __pyx_state[2]; __pyx_result.execution_context = __pyx_state[3]; __pyx_result.opcounter = __pyx_state[4]; __pyx_result.output_index = __pyx_state[5]; __pyx_result.output_sampler = __pyx_state[6]; __pyx_result.step_name = __pyx_state[7]
 *     if len(__pyx_state) > 8 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_ConsumerSet__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_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_ConsumerSet__set_state", 0);
  __Pyx_TraceCall("__pyx_unpickle_ConsumerSet__set_state", __pyx_f[2], 11, 0, __PYX_ERR(2, 11, __pyx_L1_error));

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_ConsumerSet__set_state(ConsumerSet __pyx_result, tuple __pyx_state):
 *     __pyx_result.coder = __pyx_state[0]; __pyx_result.consumers = __pyx_state[1]; __pyx_result.element_sampler = __pyx_state[2]; __pyx_result.execution_context = __pyx_state[3]; __pyx_result.opcounter = __pyx_state[4]; __pyx_result.output_index = __pyx_state[5]; __pyx_result.output_sampler = __pyx_state[6]; __pyx_result.step_name = __pyx_state[7]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 8 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[8])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->coder);
  __Pyx_DECREF(__pyx_v___pyx_result->coder);
  __pyx_v___pyx_result->coder = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->consumers);
  __Pyx_DECREF(__pyx_v___pyx_result->consumers);
  __pyx_v___pyx_result->consumers = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->element_sampler);
  __Pyx_DECREF(__pyx_v___pyx_result->element_sampler);
  __pyx_v___pyx_result->element_sampler = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 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(2, 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(2, 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_6worker_10opcounters_OperationCounters))))) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->opcounter);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->opcounter));
  __pyx_v___pyx_result->opcounter = ((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->output_index);
  __Pyx_DECREF(__pyx_v___pyx_result->output_index);
  __pyx_v___pyx_result->output_index = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->output_sampler);
  __Pyx_DECREF(__pyx_v___pyx_result->output_sampler);
  __pyx_v___pyx_result->output_sampler = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->step_name);
  __Pyx_DECREF(__pyx_v___pyx_result->step_name);
  __pyx_v___pyx_result->step_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_ConsumerSet__set_state(ConsumerSet __pyx_result, tuple __pyx_state):
 *     __pyx_result.coder = __pyx_state[0]; __pyx_result.consumers = __pyx_state[1]; __pyx_result.element_sampler = __pyx_state[2]; __pyx_result.execution_context = __pyx_state[3]; __pyx_result.opcounter = __pyx_state[4]; __pyx_result.output_index = __pyx_state[5]; __pyx_result.output_sampler = __pyx_state[6]; __pyx_result.step_name = __pyx_state[7]
 *     if len(__pyx_state) > 8 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[8])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(2, 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(2, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 8) != 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(2, 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.coder = __pyx_state[0]; __pyx_result.consumers = __pyx_state[1]; __pyx_result.element_sampler = __pyx_state[2]; __pyx_result.execution_context = __pyx_state[3]; __pyx_result.opcounter = __pyx_state[4]; __pyx_result.output_index = __pyx_state[5]; __pyx_result.output_sampler = __pyx_state[6]; __pyx_result.step_name = __pyx_state[7]
 *     if len(__pyx_state) > 8 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[8])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 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(2, 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(2, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 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(2, 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_ConsumerSet__set_state(ConsumerSet __pyx_result, tuple __pyx_state):
 *     __pyx_result.coder = __pyx_state[0]; __pyx_result.consumers = __pyx_state[1]; __pyx_result.element_sampler = __pyx_state[2]; __pyx_result.execution_context = __pyx_state[3]; __pyx_result.opcounter = __pyx_state[4]; __pyx_result.output_index = __pyx_state[5]; __pyx_result.output_sampler = __pyx_state[6]; __pyx_result.step_name = __pyx_state[7]
 *     if len(__pyx_state) > 8 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[8])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_ConsumerSet__set_state(<ConsumerSet> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_ConsumerSet__set_state(ConsumerSet __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.coder = __pyx_state[0]; __pyx_result.consumers = __pyx_state[1]; __pyx_result.element_sampler = __pyx_state[2]; __pyx_result.execution_context = __pyx_state[3]; __pyx_result.opcounter = __pyx_state[4]; __pyx_result.output_index = __pyx_state[5]; __pyx_result.output_sampler = __pyx_state[6]; __pyx_result.step_name = __pyx_state[7]
 *     if len(__pyx_state) > 8 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.worker.operations.__pyx_unpickle_ConsumerSet__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_SingletonElementConsumerSet(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11__pyx_unpickle_SingletonElementConsumerSet(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11__pyx_unpickle_SingletonElementConsumerSet = {"__pyx_unpickle_SingletonElementConsumerSet", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11__pyx_unpickle_SingletonElementConsumerSet, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11__pyx_unpickle_SingletonElementConsumerSet(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_SingletonElementConsumerSet (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_SingletonElementConsumerSet", 1, 3, 3, 1); __PYX_ERR(2, 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_SingletonElementConsumerSet", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_SingletonElementConsumerSet") < 0)) __PYX_ERR(2, 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(2, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SingletonElementConsumerSet", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_SingletonElementConsumerSet", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_10__pyx_unpickle_SingletonElementConsumerSet(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_10__pyx_unpickle_SingletonElementConsumerSet(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_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__126)
  __Pyx_RefNannySetupContext("__pyx_unpickle_SingletonElementConsumerSet", 0);
  __Pyx_TraceCall("__pyx_unpickle_SingletonElementConsumerSet", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error));

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x98fe48c, 0x0c72a15, 0x844e6c1):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x98fe48c, 0x0c72a15, 0x844e6c1) = (coder, consumer, consumers, element_sampler, execution_context, opcounter, output_index, output_sampler, step_name))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__127, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 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 (0x98fe48c, 0x0c72a15, 0x844e6c1):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x98fe48c, 0x0c72a15, 0x844e6c1) = (coder, consumer, consumers, element_sampler, execution_context, opcounter, output_index, output_sampler, step_name))" % __pyx_checksum)
 *     __pyx_result = SingletonElementConsumerSet.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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(2, 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(2, 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 (0x98fe48c, 0x0c72a15, 0x844e6c1):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x98fe48c, 0x0c72a15, 0x844e6c1) = (coder, consumer, consumers, element_sampler, execution_context, opcounter, output_index, output_sampler, step_name))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = SingletonElementConsumerSet.__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(2, 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(2, 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(2, 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(2, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x98fe48c, 0x0c72a15, 0x844e6c1):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x98fe48c, 0x0c72a15, 0x844e6c1) = (coder, consumer, consumers, element_sampler, execution_context, opcounter, output_index, output_sampler, step_name))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x98fe48c, 0x0c72a15, 0x844e6c1) = (coder, consumer, consumers, element_sampler, execution_context, opcounter, output_index, output_sampler, step_name))" % __pyx_checksum)
 *     __pyx_result = SingletonElementConsumerSet.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_SingletonElementConsumerSet__set_state(<SingletonElementConsumerSet> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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(2, 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 (0x98fe48c, 0x0c72a15, 0x844e6c1) = (coder, consumer, consumers, element_sampler, execution_context, opcounter, output_index, output_sampler, step_name))" % __pyx_checksum)
 *     __pyx_result = SingletonElementConsumerSet.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_SingletonElementConsumerSet__set_state(<SingletonElementConsumerSet> __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 = SingletonElementConsumerSet.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_SingletonElementConsumerSet__set_state(<SingletonElementConsumerSet> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_SingletonElementConsumerSet__set_state(SingletonElementConsumerSet __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(2, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_SingletonElementConsumerSet__set_state(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 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 (0x98fe48c, 0x0c72a15, 0x844e6c1) = (coder, consumer, consumers, element_sampler, execution_context, opcounter, output_index, output_sampler, step_name))" % __pyx_checksum)
 *     __pyx_result = SingletonElementConsumerSet.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_SingletonElementConsumerSet__set_state(<SingletonElementConsumerSet> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_SingletonElementConsumerSet__set_state(<SingletonElementConsumerSet> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_SingletonElementConsumerSet__set_state(SingletonElementConsumerSet __pyx_result, tuple __pyx_state):
 *     __pyx_result.coder = __pyx_state[0]; __pyx_result.consumer = __pyx_state[1]; __pyx_result.consumers = __pyx_state[2]; __pyx_result.element_sampler = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.opcounter = __pyx_state[5]; __pyx_result.output_index = __pyx_state[6]; __pyx_result.output_sampler = __pyx_state[7]; __pyx_result.step_name = __pyx_state[8]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_SingletonElementConsumerSet(__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.worker.operations.__pyx_unpickle_SingletonElementConsumerSet", __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_SingletonElementConsumerSet__set_state(<SingletonElementConsumerSet> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_SingletonElementConsumerSet__set_state(SingletonElementConsumerSet __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.coder = __pyx_state[0]; __pyx_result.consumer = __pyx_state[1]; __pyx_result.consumers = __pyx_state[2]; __pyx_result.element_sampler = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.opcounter = __pyx_state[5]; __pyx_result.output_index = __pyx_state[6]; __pyx_result.output_sampler = __pyx_state[7]; __pyx_result.step_name = __pyx_state[8]
 *     if len(__pyx_state) > 9 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_SingletonElementConsumerSet__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_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_SingletonElementConsumerSet__set_state", 0);
  __Pyx_TraceCall("__pyx_unpickle_SingletonElementConsumerSet__set_state", __pyx_f[2], 11, 0, __PYX_ERR(2, 11, __pyx_L1_error));

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_SingletonElementConsumerSet__set_state(SingletonElementConsumerSet __pyx_result, tuple __pyx_state):
 *     __pyx_result.coder = __pyx_state[0]; __pyx_result.consumer = __pyx_state[1]; __pyx_result.consumers = __pyx_state[2]; __pyx_result.element_sampler = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.opcounter = __pyx_state[5]; __pyx_result.output_index = __pyx_state[6]; __pyx_result.output_sampler = __pyx_state[7]; __pyx_result.step_name = __pyx_state[8]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 9 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[9])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.coder);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.coder);
  __pyx_v___pyx_result->__pyx_base.coder = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 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_6worker_10operations_Operation))))) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->consumer);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->consumer));
  __pyx_v___pyx_result->consumer = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.consumers);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.consumers);
  __pyx_v___pyx_result->__pyx_base.consumers = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.element_sampler);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.element_sampler);
  __pyx_v___pyx_result->__pyx_base.element_sampler = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.execution_context);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.execution_context);
  __pyx_v___pyx_result->__pyx_base.execution_context = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 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_6worker_10opcounters_OperationCounters))))) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.opcounter);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.opcounter));
  __pyx_v___pyx_result->__pyx_base.opcounter = ((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.output_index);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.output_index);
  __pyx_v___pyx_result->__pyx_base.output_index = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.output_sampler);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.output_sampler);
  __pyx_v___pyx_result->__pyx_base.output_sampler = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.step_name);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.step_name);
  __pyx_v___pyx_result->__pyx_base.step_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_SingletonElementConsumerSet__set_state(SingletonElementConsumerSet __pyx_result, tuple __pyx_state):
 *     __pyx_result.coder = __pyx_state[0]; __pyx_result.consumer = __pyx_state[1]; __pyx_result.consumers = __pyx_state[2]; __pyx_result.element_sampler = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.opcounter = __pyx_state[5]; __pyx_result.output_index = __pyx_state[6]; __pyx_result.output_sampler = __pyx_state[7]; __pyx_result.step_name = __pyx_state[8]
 *     if len(__pyx_state) > 9 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[9])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(2, 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(2, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 9) != 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(2, 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.coder = __pyx_state[0]; __pyx_result.consumer = __pyx_state[1]; __pyx_result.consumers = __pyx_state[2]; __pyx_result.element_sampler = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.opcounter = __pyx_state[5]; __pyx_result.output_index = __pyx_state[6]; __pyx_result.output_sampler = __pyx_state[7]; __pyx_result.step_name = __pyx_state[8]
 *     if len(__pyx_state) > 9 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[9])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 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(2, 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(2, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 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(2, 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_SingletonElementConsumerSet__set_state(SingletonElementConsumerSet __pyx_result, tuple __pyx_state):
 *     __pyx_result.coder = __pyx_state[0]; __pyx_result.consumer = __pyx_state[1]; __pyx_result.consumers = __pyx_state[2]; __pyx_result.element_sampler = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.opcounter = __pyx_state[5]; __pyx_result.output_index = __pyx_state[6]; __pyx_result.output_sampler = __pyx_state[7]; __pyx_result.step_name = __pyx_state[8]
 *     if len(__pyx_state) > 9 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[9])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_SingletonElementConsumerSet__set_state(<SingletonElementConsumerSet> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_SingletonElementConsumerSet__set_state(SingletonElementConsumerSet __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.coder = __pyx_state[0]; __pyx_result.consumer = __pyx_state[1]; __pyx_result.consumers = __pyx_state[2]; __pyx_result.element_sampler = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.opcounter = __pyx_state[5]; __pyx_result.output_index = __pyx_state[6]; __pyx_result.output_sampler = __pyx_state[7]; __pyx_result.step_name = __pyx_state[8]
 *     if len(__pyx_state) > 9 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.worker.operations.__pyx_unpickle_SingletonElementConsumerSet__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_GeneralPurposeConsumerSet(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_13__pyx_unpickle_GeneralPurposeConsumerSet(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_13__pyx_unpickle_GeneralPurposeConsumerSet = {"__pyx_unpickle_GeneralPurposeConsumerSet", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_13__pyx_unpickle_GeneralPurposeConsumerSet, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_13__pyx_unpickle_GeneralPurposeConsumerSet(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_GeneralPurposeConsumerSet (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_GeneralPurposeConsumerSet", 1, 3, 3, 1); __PYX_ERR(2, 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_GeneralPurposeConsumerSet", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_GeneralPurposeConsumerSet") < 0)) __PYX_ERR(2, 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(2, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_GeneralPurposeConsumerSet", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_GeneralPurposeConsumerSet", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_12__pyx_unpickle_GeneralPurposeConsumerSet(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_12__pyx_unpickle_GeneralPurposeConsumerSet(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_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__128)
  __Pyx_RefNannySetupContext("__pyx_unpickle_GeneralPurposeConsumerSet", 0);
  __Pyx_TraceCall("__pyx_unpickle_GeneralPurposeConsumerSet", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error));

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x331df85, 0xff1ef4c, 0x2a2c1fd):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x331df85, 0xff1ef4c, 0x2a2c1fd) = (_batched_elements, coder, consumers, element_consumers, element_sampler, execution_context, has_batch_consumers, opcounter, other_batch_consumers, output_index, output_sampler, passthrough_batch_consumers, producer_batch_converter, step_name))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__129, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 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 (0x331df85, 0xff1ef4c, 0x2a2c1fd):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x331df85, 0xff1ef4c, 0x2a2c1fd) = (_batched_elements, coder, consumers, element_consumers, element_sampler, execution_context, has_batch_consumers, opcounter, other_batch_consumers, output_index, output_sampler, passthrough_batch_consumers, producer_batch_converter, step_name))" % __pyx_checksum)
 *     __pyx_result = GeneralPurposeConsumerSet.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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(2, 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(2, 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 (0x331df85, 0xff1ef4c, 0x2a2c1fd):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x331df85, 0xff1ef4c, 0x2a2c1fd) = (_batched_elements, coder, consumers, element_consumers, element_sampler, execution_context, has_batch_consumers, opcounter, other_batch_consumers, output_index, output_sampler, passthrough_batch_consumers, producer_batch_converter, step_name))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = GeneralPurposeConsumerSet.__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(2, 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(2, 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(2, 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(2, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x331df85, 0xff1ef4c, 0x2a2c1fd):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x331df85, 0xff1ef4c, 0x2a2c1fd) = (_batched_elements, coder, consumers, element_consumers, element_sampler, execution_context, has_batch_consumers, opcounter, other_batch_consumers, output_index, output_sampler, passthrough_batch_consumers, producer_batch_converter, step_name))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x331df85, 0xff1ef4c, 0x2a2c1fd) = (_batched_elements, coder, consumers, element_consumers, element_sampler, execution_context, has_batch_consumers, opcounter, other_batch_consumers, output_index, output_sampler, passthrough_batch_consumers, producer_batch_converter, step_name))" % __pyx_checksum)
 *     __pyx_result = GeneralPurposeConsumerSet.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_GeneralPurposeConsumerSet__set_state(<GeneralPurposeConsumerSet> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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(2, 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 (0x331df85, 0xff1ef4c, 0x2a2c1fd) = (_batched_elements, coder, consumers, element_consumers, element_sampler, execution_context, has_batch_consumers, opcounter, other_batch_consumers, output_index, output_sampler, passthrough_batch_consumers, producer_batch_converter, step_name))" % __pyx_checksum)
 *     __pyx_result = GeneralPurposeConsumerSet.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_GeneralPurposeConsumerSet__set_state(<GeneralPurposeConsumerSet> __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 = GeneralPurposeConsumerSet.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_GeneralPurposeConsumerSet__set_state(<GeneralPurposeConsumerSet> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_GeneralPurposeConsumerSet__set_state(GeneralPurposeConsumerSet __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(2, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_GeneralPurposeConsumerSet__set_state(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 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 (0x331df85, 0xff1ef4c, 0x2a2c1fd) = (_batched_elements, coder, consumers, element_consumers, element_sampler, execution_context, has_batch_consumers, opcounter, other_batch_consumers, output_index, output_sampler, passthrough_batch_consumers, producer_batch_converter, step_name))" % __pyx_checksum)
 *     __pyx_result = GeneralPurposeConsumerSet.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_GeneralPurposeConsumerSet__set_state(<GeneralPurposeConsumerSet> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_GeneralPurposeConsumerSet__set_state(<GeneralPurposeConsumerSet> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_GeneralPurposeConsumerSet__set_state(GeneralPurposeConsumerSet __pyx_result, tuple __pyx_state):
 *     __pyx_result._batched_elements = __pyx_state[0]; __pyx_result.coder = __pyx_state[1]; __pyx_result.consumers = __pyx_state[2]; __pyx_result.element_consumers = __pyx_state[3]; __pyx_result.element_sampler = __pyx_state[4]; __pyx_result.execution_context = __pyx_state[5]; __pyx_result.has_batch_consumers = __pyx_state[6]; __pyx_result.opcounter = __pyx_state[7]; __pyx_result.other_batch_consumers = __pyx_state[8]; __pyx_result.output_index = __pyx_state[9]; __pyx_result.output_sampler = __pyx_state[10]; __pyx_result.passthrough_batch_consumers = __pyx_state[11]; __pyx_result.producer_batch_converter = __pyx_state[12]; __pyx_result.step_name = __pyx_state[13]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_GeneralPurposeConsumerSet(__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.worker.operations.__pyx_unpickle_GeneralPurposeConsumerSet", __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_GeneralPurposeConsumerSet__set_state(<GeneralPurposeConsumerSet> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_GeneralPurposeConsumerSet__set_state(GeneralPurposeConsumerSet __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._batched_elements = __pyx_state[0]; __pyx_result.coder = __pyx_state[1]; __pyx_result.consumers = __pyx_state[2]; __pyx_result.element_consumers = __pyx_state[3]; __pyx_result.element_sampler = __pyx_state[4]; __pyx_result.execution_context = __pyx_state[5]; __pyx_result.has_batch_consumers = __pyx_state[6]; __pyx_result.opcounter = __pyx_state[7]; __pyx_result.other_batch_consumers = __pyx_state[8]; __pyx_result.output_index = __pyx_state[9]; __pyx_result.output_sampler = __pyx_state[10]; __pyx_result.passthrough_batch_consumers = __pyx_state[11]; __pyx_result.producer_batch_converter = __pyx_state[12]; __pyx_result.step_name = __pyx_state[13]
 *     if len(__pyx_state) > 14 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_GeneralPurposeConsumerSet__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_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_GeneralPurposeConsumerSet__set_state", 0);
  __Pyx_TraceCall("__pyx_unpickle_GeneralPurposeConsumerSet__set_state", __pyx_f[2], 11, 0, __PYX_ERR(2, 11, __pyx_L1_error));

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_GeneralPurposeConsumerSet__set_state(GeneralPurposeConsumerSet __pyx_result, tuple __pyx_state):
 *     __pyx_result._batched_elements = __pyx_state[0]; __pyx_result.coder = __pyx_state[1]; __pyx_result.consumers = __pyx_state[2]; __pyx_result.element_consumers = __pyx_state[3]; __pyx_result.element_sampler = __pyx_state[4]; __pyx_result.execution_context = __pyx_state[5]; __pyx_result.has_batch_consumers = __pyx_state[6]; __pyx_result.opcounter = __pyx_state[7]; __pyx_result.other_batch_consumers = __pyx_state[8]; __pyx_result.output_index = __pyx_state[9]; __pyx_result.output_sampler = __pyx_state[10]; __pyx_result.passthrough_batch_consumers = __pyx_state[11]; __pyx_result.producer_batch_converter = __pyx_state[12]; __pyx_result.step_name = __pyx_state[13]             # <<<<<<<<<<<<<<
 *     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(2, 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(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->_batched_elements);
  __Pyx_DECREF(__pyx_v___pyx_result->_batched_elements);
  __pyx_v___pyx_result->_batched_elements = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.coder);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.coder);
  __pyx_v___pyx_result->__pyx_base.coder = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.consumers);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.consumers);
  __pyx_v___pyx_result->__pyx_base.consumers = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->element_consumers);
  __Pyx_DECREF(__pyx_v___pyx_result->element_consumers);
  __pyx_v___pyx_result->element_consumers = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.element_sampler);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.element_sampler);
  __pyx_v___pyx_result->__pyx_base.element_sampler = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.execution_context);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.execution_context);
  __pyx_v___pyx_result->__pyx_base.execution_context = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->has_batch_consumers = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 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_6worker_10opcounters_OperationCounters))))) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.opcounter);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.opcounter));
  __pyx_v___pyx_result->__pyx_base.opcounter = ((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->other_batch_consumers);
  __Pyx_DECREF(__pyx_v___pyx_result->other_batch_consumers);
  __pyx_v___pyx_result->other_batch_consumers = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.output_index);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.output_index);
  __pyx_v___pyx_result->__pyx_base.output_index = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.output_sampler);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.output_sampler);
  __pyx_v___pyx_result->__pyx_base.output_sampler = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->passthrough_batch_consumers);
  __Pyx_DECREF(__pyx_v___pyx_result->passthrough_batch_consumers);
  __pyx_v___pyx_result->passthrough_batch_consumers = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->producer_batch_converter);
  __Pyx_DECREF(__pyx_v___pyx_result->producer_batch_converter);
  __pyx_v___pyx_result->producer_batch_converter = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.step_name);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.step_name);
  __pyx_v___pyx_result->__pyx_base.step_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_GeneralPurposeConsumerSet__set_state(GeneralPurposeConsumerSet __pyx_result, tuple __pyx_state):
 *     __pyx_result._batched_elements = __pyx_state[0]; __pyx_result.coder = __pyx_state[1]; __pyx_result.consumers = __pyx_state[2]; __pyx_result.element_consumers = __pyx_state[3]; __pyx_result.element_sampler = __pyx_state[4]; __pyx_result.execution_context = __pyx_state[5]; __pyx_result.has_batch_consumers = __pyx_state[6]; __pyx_result.opcounter = __pyx_state[7]; __pyx_result.other_batch_consumers = __pyx_state[8]; __pyx_result.output_index = __pyx_state[9]; __pyx_result.output_sampler = __pyx_state[10]; __pyx_result.passthrough_batch_consumers = __pyx_state[11]; __pyx_result.producer_batch_converter = __pyx_state[12]; __pyx_result.step_name = __pyx_state[13]
 *     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(2, 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(2, 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(2, 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._batched_elements = __pyx_state[0]; __pyx_result.coder = __pyx_state[1]; __pyx_result.consumers = __pyx_state[2]; __pyx_result.element_consumers = __pyx_state[3]; __pyx_result.element_sampler = __pyx_state[4]; __pyx_result.execution_context = __pyx_state[5]; __pyx_result.has_batch_consumers = __pyx_state[6]; __pyx_result.opcounter = __pyx_state[7]; __pyx_result.other_batch_consumers = __pyx_state[8]; __pyx_result.output_index = __pyx_state[9]; __pyx_result.output_sampler = __pyx_state[10]; __pyx_result.passthrough_batch_consumers = __pyx_state[11]; __pyx_result.producer_batch_converter = __pyx_state[12]; __pyx_result.step_name = __pyx_state[13]
 *     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(2, 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(2, 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(2, 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(2, 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(2, 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_GeneralPurposeConsumerSet__set_state(GeneralPurposeConsumerSet __pyx_result, tuple __pyx_state):
 *     __pyx_result._batched_elements = __pyx_state[0]; __pyx_result.coder = __pyx_state[1]; __pyx_result.consumers = __pyx_state[2]; __pyx_result.element_consumers = __pyx_state[3]; __pyx_result.element_sampler = __pyx_state[4]; __pyx_result.execution_context = __pyx_state[5]; __pyx_result.has_batch_consumers = __pyx_state[6]; __pyx_result.opcounter = __pyx_state[7]; __pyx_result.other_batch_consumers = __pyx_state[8]; __pyx_result.output_index = __pyx_state[9]; __pyx_result.output_sampler = __pyx_state[10]; __pyx_result.passthrough_batch_consumers = __pyx_state[11]; __pyx_result.producer_batch_converter = __pyx_state[12]; __pyx_result.step_name = __pyx_state[13]
 *     if len(__pyx_state) > 14 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[14])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_GeneralPurposeConsumerSet__set_state(<GeneralPurposeConsumerSet> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_GeneralPurposeConsumerSet__set_state(GeneralPurposeConsumerSet __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._batched_elements = __pyx_state[0]; __pyx_result.coder = __pyx_state[1]; __pyx_result.consumers = __pyx_state[2]; __pyx_result.element_consumers = __pyx_state[3]; __pyx_result.element_sampler = __pyx_state[4]; __pyx_result.execution_context = __pyx_state[5]; __pyx_result.has_batch_consumers = __pyx_state[6]; __pyx_result.opcounter = __pyx_state[7]; __pyx_result.other_batch_consumers = __pyx_state[8]; __pyx_result.output_index = __pyx_state[9]; __pyx_result.output_sampler = __pyx_state[10]; __pyx_result.passthrough_batch_consumers = __pyx_state[11]; __pyx_result.producer_batch_converter = __pyx_state[12]; __pyx_result.step_name = __pyx_state[13]
 *     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.worker.operations.__pyx_unpickle_GeneralPurposeConsumerSet__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_Operation(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15__pyx_unpickle_Operation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_15__pyx_unpickle_Operation = {"__pyx_unpickle_Operation", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_15__pyx_unpickle_Operation, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15__pyx_unpickle_Operation(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_Operation (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_Operation", 1, 3, 3, 1); __PYX_ERR(2, 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_Operation", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Operation") < 0)) __PYX_ERR(2, 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(2, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Operation", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_Operation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_14__pyx_unpickle_Operation(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_14__pyx_unpickle_Operation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_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__130)
  __Pyx_RefNannySetupContext("__pyx_unpickle_Operation", 0);
  __Pyx_TraceCall("__pyx_unpickle_Operation", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error));

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xb6b9d28, 0x33b1103, 0x0ef7c70):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb6b9d28, 0x33b1103, 0x0ef7c70) = (consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__131, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 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 (0xb6b9d28, 0x33b1103, 0x0ef7c70):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb6b9d28, 0x33b1103, 0x0ef7c70) = (consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name))" % __pyx_checksum)
 *     __pyx_result = Operation.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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(2, 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(2, 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 (0xb6b9d28, 0x33b1103, 0x0ef7c70):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb6b9d28, 0x33b1103, 0x0ef7c70) = (consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = Operation.__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(2, 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(2, 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(2, 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(2, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xb6b9d28, 0x33b1103, 0x0ef7c70):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb6b9d28, 0x33b1103, 0x0ef7c70) = (consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb6b9d28, 0x33b1103, 0x0ef7c70) = (consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name))" % __pyx_checksum)
 *     __pyx_result = Operation.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Operation__set_state(<Operation> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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(2, 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 (0xb6b9d28, 0x33b1103, 0x0ef7c70) = (consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name))" % __pyx_checksum)
 *     __pyx_result = Operation.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Operation__set_state(<Operation> __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 = Operation.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Operation__set_state(<Operation> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_Operation__set_state(Operation __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(2, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_Operation__set_state(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 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 (0xb6b9d28, 0x33b1103, 0x0ef7c70) = (consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name))" % __pyx_checksum)
 *     __pyx_result = Operation.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Operation__set_state(<Operation> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Operation__set_state(<Operation> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_Operation__set_state(Operation __pyx_result, tuple __pyx_state):
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.spec = __pyx_state[13]; __pyx_result.state_sampler = __pyx_state[14]; __pyx_result.step_name = __pyx_state[15]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_Operation(__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.worker.operations.__pyx_unpickle_Operation", __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_Operation__set_state(<Operation> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Operation__set_state(Operation __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.spec = __pyx_state[13]; __pyx_result.state_sampler = __pyx_state[14]; __pyx_result.step_name = __pyx_state[15]
 *     if len(__pyx_state) > 16 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_Operation__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_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_Operation__set_state", 0);
  __Pyx_TraceCall("__pyx_unpickle_Operation__set_state", __pyx_f[2], 11, 0, __PYX_ERR(2, 11, __pyx_L1_error));

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_Operation__set_state(Operation __pyx_result, tuple __pyx_state):
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.spec = __pyx_state[13]; __pyx_result.state_sampler = __pyx_state[14]; __pyx_result.step_name = __pyx_state[15]             # <<<<<<<<<<<<<<
 *     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(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->consumers);
  __Pyx_DECREF(__pyx_v___pyx_result->consumers);
  __pyx_v___pyx_result->consumers = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->counter_factory);
  __Pyx_DECREF(__pyx_v___pyx_result->counter_factory);
  __pyx_v___pyx_result->counter_factory = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->data_sampler);
  __Pyx_DECREF(__pyx_v___pyx_result->data_sampler);
  __pyx_v___pyx_result->data_sampler = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->debug_logging_enabled = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 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(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->metrics_container);
  __Pyx_DECREF(__pyx_v___pyx_result->metrics_container);
  __pyx_v___pyx_result->metrics_container = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->name_context);
  __Pyx_DECREF(__pyx_v___pyx_result->name_context);
  __pyx_v___pyx_result->name_context = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->operation_name);
  __Pyx_DECREF(__pyx_v___pyx_result->operation_name);
  __pyx_v___pyx_result->operation_name = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->receivers);
  __Pyx_DECREF(__pyx_v___pyx_result->receivers);
  __pyx_v___pyx_result->receivers = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->scoped_finish_state);
  __Pyx_DECREF(__pyx_v___pyx_result->scoped_finish_state);
  __pyx_v___pyx_result->scoped_finish_state = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->scoped_process_state);
  __Pyx_DECREF(__pyx_v___pyx_result->scoped_process_state);
  __pyx_v___pyx_result->scoped_process_state = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->scoped_start_state);
  __Pyx_DECREF(__pyx_v___pyx_result->scoped_start_state);
  __pyx_v___pyx_result->scoped_start_state = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->setup_done = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->spec);
  __Pyx_DECREF(__pyx_v___pyx_result->spec);
  __pyx_v___pyx_result->spec = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->state_sampler);
  __Pyx_DECREF(__pyx_v___pyx_result->state_sampler);
  __pyx_v___pyx_result->state_sampler = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->step_name);
  __Pyx_DECREF(__pyx_v___pyx_result->step_name);
  __pyx_v___pyx_result->step_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_Operation__set_state(Operation __pyx_result, tuple __pyx_state):
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.spec = __pyx_state[13]; __pyx_result.state_sampler = __pyx_state[14]; __pyx_result.step_name = __pyx_state[15]
 *     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(2, 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(2, 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(2, 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.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.spec = __pyx_state[13]; __pyx_result.state_sampler = __pyx_state[14]; __pyx_result.step_name = __pyx_state[15]
 *     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(2, 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(2, 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(2, 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(2, 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(2, 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_Operation__set_state(Operation __pyx_result, tuple __pyx_state):
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.spec = __pyx_state[13]; __pyx_result.state_sampler = __pyx_state[14]; __pyx_result.step_name = __pyx_state[15]
 *     if len(__pyx_state) > 16 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[16])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_Operation__set_state(<Operation> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Operation__set_state(Operation __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.spec = __pyx_state[13]; __pyx_result.state_sampler = __pyx_state[14]; __pyx_result.step_name = __pyx_state[15]
 *     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.worker.operations.__pyx_unpickle_Operation__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_ReadOperation(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_17__pyx_unpickle_ReadOperation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_17__pyx_unpickle_ReadOperation = {"__pyx_unpickle_ReadOperation", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_17__pyx_unpickle_ReadOperation, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_17__pyx_unpickle_ReadOperation(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_ReadOperation (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_ReadOperation", 1, 3, 3, 1); __PYX_ERR(2, 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_ReadOperation", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_ReadOperation") < 0)) __PYX_ERR(2, 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(2, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ReadOperation", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_ReadOperation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_16__pyx_unpickle_ReadOperation(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16__pyx_unpickle_ReadOperation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_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__132)
  __Pyx_RefNannySetupContext("__pyx_unpickle_ReadOperation", 0);
  __Pyx_TraceCall("__pyx_unpickle_ReadOperation", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error));

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xb6b9d28, 0x33b1103, 0x0ef7c70):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb6b9d28, 0x33b1103, 0x0ef7c70) = (consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__131, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 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 (0xb6b9d28, 0x33b1103, 0x0ef7c70):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb6b9d28, 0x33b1103, 0x0ef7c70) = (consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name))" % __pyx_checksum)
 *     __pyx_result = ReadOperation.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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(2, 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(2, 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 (0xb6b9d28, 0x33b1103, 0x0ef7c70):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb6b9d28, 0x33b1103, 0x0ef7c70) = (consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = ReadOperation.__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(2, 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(2, 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(2, 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(2, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xb6b9d28, 0x33b1103, 0x0ef7c70):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb6b9d28, 0x33b1103, 0x0ef7c70) = (consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb6b9d28, 0x33b1103, 0x0ef7c70) = (consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name))" % __pyx_checksum)
 *     __pyx_result = ReadOperation.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ReadOperation__set_state(<ReadOperation> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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(2, 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 (0xb6b9d28, 0x33b1103, 0x0ef7c70) = (consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name))" % __pyx_checksum)
 *     __pyx_result = ReadOperation.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_ReadOperation__set_state(<ReadOperation> __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 = ReadOperation.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ReadOperation__set_state(<ReadOperation> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_ReadOperation__set_state(ReadOperation __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(2, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_ReadOperation__set_state(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 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 (0xb6b9d28, 0x33b1103, 0x0ef7c70) = (consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name))" % __pyx_checksum)
 *     __pyx_result = ReadOperation.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_ReadOperation__set_state(<ReadOperation> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ReadOperation__set_state(<ReadOperation> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_ReadOperation__set_state(ReadOperation __pyx_result, tuple __pyx_state):
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.spec = __pyx_state[13]; __pyx_result.state_sampler = __pyx_state[14]; __pyx_result.step_name = __pyx_state[15]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_ReadOperation(__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.worker.operations.__pyx_unpickle_ReadOperation", __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_ReadOperation__set_state(<ReadOperation> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_ReadOperation__set_state(ReadOperation __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.spec = __pyx_state[13]; __pyx_result.state_sampler = __pyx_state[14]; __pyx_result.step_name = __pyx_state[15]
 *     if len(__pyx_state) > 16 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_ReadOperation__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_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_ReadOperation__set_state", 0);
  __Pyx_TraceCall("__pyx_unpickle_ReadOperation__set_state", __pyx_f[2], 11, 0, __PYX_ERR(2, 11, __pyx_L1_error));

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_ReadOperation__set_state(ReadOperation __pyx_result, tuple __pyx_state):
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.spec = __pyx_state[13]; __pyx_result.state_sampler = __pyx_state[14]; __pyx_result.step_name = __pyx_state[15]             # <<<<<<<<<<<<<<
 *     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(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.consumers);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.consumers);
  __pyx_v___pyx_result->__pyx_base.consumers = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.counter_factory);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.counter_factory);
  __pyx_v___pyx_result->__pyx_base.counter_factory = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.data_sampler);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.data_sampler);
  __pyx_v___pyx_result->__pyx_base.data_sampler = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.debug_logging_enabled = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.execution_context);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.execution_context);
  __pyx_v___pyx_result->__pyx_base.execution_context = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.metrics_container);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.metrics_container);
  __pyx_v___pyx_result->__pyx_base.metrics_container = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.name_context);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.name_context);
  __pyx_v___pyx_result->__pyx_base.name_context = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.operation_name);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.operation_name);
  __pyx_v___pyx_result->__pyx_base.operation_name = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.receivers);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.receivers);
  __pyx_v___pyx_result->__pyx_base.receivers = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_finish_state);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.scoped_finish_state);
  __pyx_v___pyx_result->__pyx_base.scoped_finish_state = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_process_state);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.scoped_process_state);
  __pyx_v___pyx_result->__pyx_base.scoped_process_state = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_start_state);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.scoped_start_state);
  __pyx_v___pyx_result->__pyx_base.scoped_start_state = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.setup_done = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.spec);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.spec);
  __pyx_v___pyx_result->__pyx_base.spec = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.state_sampler);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.state_sampler);
  __pyx_v___pyx_result->__pyx_base.state_sampler = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.step_name);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.step_name);
  __pyx_v___pyx_result->__pyx_base.step_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_ReadOperation__set_state(ReadOperation __pyx_result, tuple __pyx_state):
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.spec = __pyx_state[13]; __pyx_result.state_sampler = __pyx_state[14]; __pyx_result.step_name = __pyx_state[15]
 *     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(2, 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(2, 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(2, 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.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.spec = __pyx_state[13]; __pyx_result.state_sampler = __pyx_state[14]; __pyx_result.step_name = __pyx_state[15]
 *     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(2, 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(2, 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(2, 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(2, 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(2, 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_ReadOperation__set_state(ReadOperation __pyx_result, tuple __pyx_state):
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.spec = __pyx_state[13]; __pyx_result.state_sampler = __pyx_state[14]; __pyx_result.step_name = __pyx_state[15]
 *     if len(__pyx_state) > 16 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[16])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_ReadOperation__set_state(<ReadOperation> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_ReadOperation__set_state(ReadOperation __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.spec = __pyx_state[13]; __pyx_result.state_sampler = __pyx_state[14]; __pyx_result.step_name = __pyx_state[15]
 *     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.worker.operations.__pyx_unpickle_ReadOperation__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_ImpulseReadOperation(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_19__pyx_unpickle_ImpulseReadOperation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_19__pyx_unpickle_ImpulseReadOperation = {"__pyx_unpickle_ImpulseReadOperation", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_19__pyx_unpickle_ImpulseReadOperation, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_19__pyx_unpickle_ImpulseReadOperation(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_ImpulseReadOperation (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_ImpulseReadOperation", 1, 3, 3, 1); __PYX_ERR(2, 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_ImpulseReadOperation", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_ImpulseReadOperation") < 0)) __PYX_ERR(2, 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(2, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ImpulseReadOperation", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_ImpulseReadOperation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_18__pyx_unpickle_ImpulseReadOperation(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_18__pyx_unpickle_ImpulseReadOperation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_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_ImpulseReadOperation", 0);
  __Pyx_TraceCall("__pyx_unpickle_ImpulseReadOperation", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error));

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x216a25a, 0x969cf7e, 0x52d7a2f):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x216a25a, 0x969cf7e, 0x52d7a2f) = (consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, source, spec, state_sampler, step_name))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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(2, 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 (0x216a25a, 0x969cf7e, 0x52d7a2f):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x216a25a, 0x969cf7e, 0x52d7a2f) = (consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, source, spec, state_sampler, step_name))" % __pyx_checksum)
 *     __pyx_result = ImpulseReadOperation.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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(2, 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(2, 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 (0x216a25a, 0x969cf7e, 0x52d7a2f):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x216a25a, 0x969cf7e, 0x52d7a2f) = (consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, source, spec, state_sampler, step_name))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = ImpulseReadOperation.__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(2, 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(2, 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(2, 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(2, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x216a25a, 0x969cf7e, 0x52d7a2f):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x216a25a, 0x969cf7e, 0x52d7a2f) = (consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, source, spec, state_sampler, step_name))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x216a25a, 0x969cf7e, 0x52d7a2f) = (consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, source, spec, state_sampler, step_name))" % __pyx_checksum)
 *     __pyx_result = ImpulseReadOperation.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ImpulseReadOperation__set_state(<ImpulseReadOperation> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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(2, 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 (0x216a25a, 0x969cf7e, 0x52d7a2f) = (consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, source, spec, state_sampler, step_name))" % __pyx_checksum)
 *     __pyx_result = ImpulseReadOperation.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_ImpulseReadOperation__set_state(<ImpulseReadOperation> __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 = ImpulseReadOperation.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ImpulseReadOperation__set_state(<ImpulseReadOperation> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_ImpulseReadOperation__set_state(ImpulseReadOperation __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(2, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_ImpulseReadOperation__set_state(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 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 (0x216a25a, 0x969cf7e, 0x52d7a2f) = (consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, source, spec, state_sampler, step_name))" % __pyx_checksum)
 *     __pyx_result = ImpulseReadOperation.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_ImpulseReadOperation__set_state(<ImpulseReadOperation> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ImpulseReadOperation__set_state(<ImpulseReadOperation> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_ImpulseReadOperation__set_state(ImpulseReadOperation __pyx_result, tuple __pyx_state):
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.source = __pyx_state[13]; __pyx_result.spec = __pyx_state[14]; __pyx_result.state_sampler = __pyx_state[15]; __pyx_result.step_name = __pyx_state[16]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_ImpulseReadOperation(__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.worker.operations.__pyx_unpickle_ImpulseReadOperation", __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_ImpulseReadOperation__set_state(<ImpulseReadOperation> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_ImpulseReadOperation__set_state(ImpulseReadOperation __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.source = __pyx_state[13]; __pyx_result.spec = __pyx_state[14]; __pyx_result.state_sampler = __pyx_state[15]; __pyx_result.step_name = __pyx_state[16]
 *     if len(__pyx_state) > 17 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_ImpulseReadOperation__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_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_ImpulseReadOperation__set_state", 0);
  __Pyx_TraceCall("__pyx_unpickle_ImpulseReadOperation__set_state", __pyx_f[2], 11, 0, __PYX_ERR(2, 11, __pyx_L1_error));

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_ImpulseReadOperation__set_state(ImpulseReadOperation __pyx_result, tuple __pyx_state):
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.source = __pyx_state[13]; __pyx_result.spec = __pyx_state[14]; __pyx_result.state_sampler = __pyx_state[15]; __pyx_result.step_name = __pyx_state[16]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 17 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[17])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.consumers);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.consumers);
  __pyx_v___pyx_result->__pyx_base.consumers = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.counter_factory);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.counter_factory);
  __pyx_v___pyx_result->__pyx_base.counter_factory = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.data_sampler);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.data_sampler);
  __pyx_v___pyx_result->__pyx_base.data_sampler = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.debug_logging_enabled = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.execution_context);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.execution_context);
  __pyx_v___pyx_result->__pyx_base.execution_context = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.metrics_container);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.metrics_container);
  __pyx_v___pyx_result->__pyx_base.metrics_container = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.name_context);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.name_context);
  __pyx_v___pyx_result->__pyx_base.name_context = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.operation_name);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.operation_name);
  __pyx_v___pyx_result->__pyx_base.operation_name = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.receivers);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.receivers);
  __pyx_v___pyx_result->__pyx_base.receivers = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_finish_state);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.scoped_finish_state);
  __pyx_v___pyx_result->__pyx_base.scoped_finish_state = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_process_state);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.scoped_process_state);
  __pyx_v___pyx_result->__pyx_base.scoped_process_state = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_start_state);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.scoped_start_state);
  __pyx_v___pyx_result->__pyx_base.scoped_start_state = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.setup_done = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->source);
  __Pyx_DECREF(__pyx_v___pyx_result->source);
  __pyx_v___pyx_result->source = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.spec);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.spec);
  __pyx_v___pyx_result->__pyx_base.spec = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.state_sampler);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.state_sampler);
  __pyx_v___pyx_result->__pyx_base.state_sampler = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.step_name);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.step_name);
  __pyx_v___pyx_result->__pyx_base.step_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_ImpulseReadOperation__set_state(ImpulseReadOperation __pyx_result, tuple __pyx_state):
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.source = __pyx_state[13]; __pyx_result.spec = __pyx_state[14]; __pyx_result.state_sampler = __pyx_state[15]; __pyx_result.step_name = __pyx_state[16]
 *     if len(__pyx_state) > 17 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[17])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(2, 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(2, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 17) != 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(2, 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.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.source = __pyx_state[13]; __pyx_result.spec = __pyx_state[14]; __pyx_result.state_sampler = __pyx_state[15]; __pyx_result.step_name = __pyx_state[16]
 *     if len(__pyx_state) > 17 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[17])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 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(2, 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(2, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 17, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 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(2, 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_ImpulseReadOperation__set_state(ImpulseReadOperation __pyx_result, tuple __pyx_state):
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.source = __pyx_state[13]; __pyx_result.spec = __pyx_state[14]; __pyx_result.state_sampler = __pyx_state[15]; __pyx_result.step_name = __pyx_state[16]
 *     if len(__pyx_state) > 17 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[17])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_ImpulseReadOperation__set_state(<ImpulseReadOperation> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_ImpulseReadOperation__set_state(ImpulseReadOperation __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.source = __pyx_state[13]; __pyx_result.spec = __pyx_state[14]; __pyx_result.state_sampler = __pyx_state[15]; __pyx_result.step_name = __pyx_state[16]
 *     if len(__pyx_state) > 17 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.worker.operations.__pyx_unpickle_ImpulseReadOperation__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_DoOperation(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_21__pyx_unpickle_DoOperation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_21__pyx_unpickle_DoOperation = {"__pyx_unpickle_DoOperation", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_21__pyx_unpickle_DoOperation, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_21__pyx_unpickle_DoOperation(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_DoOperation (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_DoOperation", 1, 3, 3, 1); __PYX_ERR(2, 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_DoOperation", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_DoOperation") < 0)) __PYX_ERR(2, 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(2, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DoOperation", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_DoOperation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_20__pyx_unpickle_DoOperation(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_20__pyx_unpickle_DoOperation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_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_DoOperation", 0);
  __Pyx_TraceCall("__pyx_unpickle_DoOperation", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error));

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x521836b, 0xc916b15, 0xe64c129):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x521836b, 0xc916b15, 0xe64c129) = (consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, execution_context, fn, input_info, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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(2, 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 (0x521836b, 0xc916b15, 0xe64c129):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x521836b, 0xc916b15, 0xe64c129) = (consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, execution_context, fn, input_info, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context))" % __pyx_checksum)
 *     __pyx_result = DoOperation.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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(2, 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(2, 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 (0x521836b, 0xc916b15, 0xe64c129):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x521836b, 0xc916b15, 0xe64c129) = (consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, execution_context, fn, input_info, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = DoOperation.__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(2, 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(2, 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(2, 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(2, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x521836b, 0xc916b15, 0xe64c129):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x521836b, 0xc916b15, 0xe64c129) = (consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, execution_context, fn, input_info, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x521836b, 0xc916b15, 0xe64c129) = (consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, execution_context, fn, input_info, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context))" % __pyx_checksum)
 *     __pyx_result = DoOperation.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DoOperation__set_state(<DoOperation> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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(2, 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 (0x521836b, 0xc916b15, 0xe64c129) = (consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, execution_context, fn, input_info, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context))" % __pyx_checksum)
 *     __pyx_result = DoOperation.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DoOperation__set_state(<DoOperation> __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 = DoOperation.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DoOperation__set_state(<DoOperation> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_DoOperation__set_state(DoOperation __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(2, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_DoOperation__set_state(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 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 (0x521836b, 0xc916b15, 0xe64c129) = (consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, execution_context, fn, input_info, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context))" % __pyx_checksum)
 *     __pyx_result = DoOperation.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DoOperation__set_state(<DoOperation> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DoOperation__set_state(<DoOperation> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_DoOperation__set_state(DoOperation __pyx_result, tuple __pyx_state):
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.dofn_runner = __pyx_state[4]; __pyx_result.execution_context = __pyx_state[5]; __pyx_result.fn = __pyx_state[6]; __pyx_result.input_info = __pyx_state[7]; __pyx_result.metrics_container = __pyx_state[8]; __pyx_result.name_context = __pyx_state[9]; __pyx_result.operation_name = __pyx_state[10]; __pyx_result.receivers = __pyx_state[11]; __pyx_result.scoped_finish_state = __pyx_state[12]; __pyx_result.scoped_process_state = __pyx_state[13]; __pyx_result.scoped_start_state = __pyx_state[14]; __pyx_result.setup_done = __pyx_state[15]; __pyx_result.side_input_maps = __pyx_state[16]; __pyx_result.spec = __pyx_state[17]; __pyx_result.state_sampler = __pyx_state[18]; __pyx_result.step_name = __pyx_state[19]; __pyx_result.tagged_receivers = __pyx_state[20]; __pyx_result.timer_inputs = __pyx_state[21]; __pyx_result.timer_specs = __pyx_state[22]; __pyx_result.user_state_context = __pyx_state[23]
 */
  __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_DoOperation(__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.worker.operations.__pyx_unpickle_DoOperation", __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_DoOperation__set_state(<DoOperation> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DoOperation__set_state(DoOperation __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.dofn_runner = __pyx_state[4]; __pyx_result.execution_context = __pyx_state[5]; __pyx_result.fn = __pyx_state[6]; __pyx_result.input_info = __pyx_state[7]; __pyx_result.metrics_container = __pyx_state[8]; __pyx_result.name_context = __pyx_state[9]; __pyx_result.operation_name = __pyx_state[10]; __pyx_result.receivers = __pyx_state[11]; __pyx_result.scoped_finish_state = __pyx_state[12]; __pyx_result.scoped_process_state = __pyx_state[13]; __pyx_result.scoped_start_state = __pyx_state[14]; __pyx_result.setup_done = __pyx_state[15]; __pyx_result.side_input_maps = __pyx_state[16]; __pyx_result.spec = __pyx_state[17]; __pyx_result.state_sampler = __pyx_state[18]; __pyx_result.step_name = __pyx_state[19]; __pyx_result.tagged_receivers = __pyx_state[20]; __pyx_result.timer_inputs = __pyx_state[21]; __pyx_result.timer_specs = __pyx_state[22]; __pyx_result.user_state_context = __pyx_state[23]
 *     if len(__pyx_state) > 24 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_DoOperation__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_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_DoOperation__set_state", 0);
  __Pyx_TraceCall("__pyx_unpickle_DoOperation__set_state", __pyx_f[2], 11, 0, __PYX_ERR(2, 11, __pyx_L1_error));

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_DoOperation__set_state(DoOperation __pyx_result, tuple __pyx_state):
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.dofn_runner = __pyx_state[4]; __pyx_result.execution_context = __pyx_state[5]; __pyx_result.fn = __pyx_state[6]; __pyx_result.input_info = __pyx_state[7]; __pyx_result.metrics_container = __pyx_state[8]; __pyx_result.name_context = __pyx_state[9]; __pyx_result.operation_name = __pyx_state[10]; __pyx_result.receivers = __pyx_state[11]; __pyx_result.scoped_finish_state = __pyx_state[12]; __pyx_result.scoped_process_state = __pyx_state[13]; __pyx_result.scoped_start_state = __pyx_state[14]; __pyx_result.setup_done = __pyx_state[15]; __pyx_result.side_input_maps = __pyx_state[16]; __pyx_result.spec = __pyx_state[17]; __pyx_result.state_sampler = __pyx_state[18]; __pyx_result.step_name = __pyx_state[19]; __pyx_result.tagged_receivers = __pyx_state[20]; __pyx_result.timer_inputs = __pyx_state[21]; __pyx_result.timer_specs = __pyx_state[22]; __pyx_result.user_state_context = __pyx_state[23]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 24 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[24])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.consumers);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.consumers);
  __pyx_v___pyx_result->__pyx_base.consumers = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.counter_factory);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.counter_factory);
  __pyx_v___pyx_result->__pyx_base.counter_factory = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.data_sampler);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.data_sampler);
  __pyx_v___pyx_result->__pyx_base.data_sampler = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.debug_logging_enabled = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 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_DoFnRunner))))) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->dofn_runner);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->dofn_runner));
  __pyx_v___pyx_result->dofn_runner = ((struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.execution_context);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.execution_context);
  __pyx_v___pyx_result->__pyx_base.execution_context = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->fn);
  __Pyx_DECREF(__pyx_v___pyx_result->fn);
  __pyx_v___pyx_result->fn = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->input_info);
  __Pyx_DECREF(__pyx_v___pyx_result->input_info);
  __pyx_v___pyx_result->input_info = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.metrics_container);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.metrics_container);
  __pyx_v___pyx_result->__pyx_base.metrics_container = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.name_context);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.name_context);
  __pyx_v___pyx_result->__pyx_base.name_context = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.operation_name);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.operation_name);
  __pyx_v___pyx_result->__pyx_base.operation_name = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.receivers);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.receivers);
  __pyx_v___pyx_result->__pyx_base.receivers = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_finish_state);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.scoped_finish_state);
  __pyx_v___pyx_result->__pyx_base.scoped_finish_state = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_process_state);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.scoped_process_state);
  __pyx_v___pyx_result->__pyx_base.scoped_process_state = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_start_state);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.scoped_start_state);
  __pyx_v___pyx_result->__pyx_base.scoped_start_state = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.setup_done = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->side_input_maps);
  __Pyx_DECREF(__pyx_v___pyx_result->side_input_maps);
  __pyx_v___pyx_result->side_input_maps = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.spec);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.spec);
  __pyx_v___pyx_result->__pyx_base.spec = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.state_sampler);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.state_sampler);
  __pyx_v___pyx_result->__pyx_base.state_sampler = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.step_name);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.step_name);
  __pyx_v___pyx_result->__pyx_base.step_name = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 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(2, 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(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->timer_inputs);
  __Pyx_DECREF(__pyx_v___pyx_result->timer_inputs);
  __pyx_v___pyx_result->timer_inputs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->timer_specs);
  __Pyx_DECREF(__pyx_v___pyx_result->timer_specs);
  __pyx_v___pyx_result->timer_specs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->user_state_context);
  __Pyx_DECREF(__pyx_v___pyx_result->user_state_context);
  __pyx_v___pyx_result->user_state_context = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_DoOperation__set_state(DoOperation __pyx_result, tuple __pyx_state):
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.dofn_runner = __pyx_state[4]; __pyx_result.execution_context = __pyx_state[5]; __pyx_result.fn = __pyx_state[6]; __pyx_result.input_info = __pyx_state[7]; __pyx_result.metrics_container = __pyx_state[8]; __pyx_result.name_context = __pyx_state[9]; __pyx_result.operation_name = __pyx_state[10]; __pyx_result.receivers = __pyx_state[11]; __pyx_result.scoped_finish_state = __pyx_state[12]; __pyx_result.scoped_process_state = __pyx_state[13]; __pyx_result.scoped_start_state = __pyx_state[14]; __pyx_result.setup_done = __pyx_state[15]; __pyx_result.side_input_maps = __pyx_state[16]; __pyx_result.spec = __pyx_state[17]; __pyx_result.state_sampler = __pyx_state[18]; __pyx_result.step_name = __pyx_state[19]; __pyx_result.tagged_receivers = __pyx_state[20]; __pyx_result.timer_inputs = __pyx_state[21]; __pyx_result.timer_specs = __pyx_state[22]; __pyx_result.user_state_context = __pyx_state[23]
 *     if len(__pyx_state) > 24 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[24])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(2, 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(2, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 24) != 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(2, 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.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.dofn_runner = __pyx_state[4]; __pyx_result.execution_context = __pyx_state[5]; __pyx_result.fn = __pyx_state[6]; __pyx_result.input_info = __pyx_state[7]; __pyx_result.metrics_container = __pyx_state[8]; __pyx_result.name_context = __pyx_state[9]; __pyx_result.operation_name = __pyx_state[10]; __pyx_result.receivers = __pyx_state[11]; __pyx_result.scoped_finish_state = __pyx_state[12]; __pyx_result.scoped_process_state = __pyx_state[13]; __pyx_result.scoped_start_state = __pyx_state[14]; __pyx_result.setup_done = __pyx_state[15]; __pyx_result.side_input_maps = __pyx_state[16]; __pyx_result.spec = __pyx_state[17]; __pyx_result.state_sampler = __pyx_state[18]; __pyx_result.step_name = __pyx_state[19]; __pyx_result.tagged_receivers = __pyx_state[20]; __pyx_result.timer_inputs = __pyx_state[21]; __pyx_result.timer_specs = __pyx_state[22]; __pyx_result.user_state_context = __pyx_state[23]
 *     if len(__pyx_state) > 24 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[24])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 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(2, 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(2, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 24, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 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(2, 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_DoOperation__set_state(DoOperation __pyx_result, tuple __pyx_state):
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.dofn_runner = __pyx_state[4]; __pyx_result.execution_context = __pyx_state[5]; __pyx_result.fn = __pyx_state[6]; __pyx_result.input_info = __pyx_state[7]; __pyx_result.metrics_container = __pyx_state[8]; __pyx_result.name_context = __pyx_state[9]; __pyx_result.operation_name = __pyx_state[10]; __pyx_result.receivers = __pyx_state[11]; __pyx_result.scoped_finish_state = __pyx_state[12]; __pyx_result.scoped_process_state = __pyx_state[13]; __pyx_result.scoped_start_state = __pyx_state[14]; __pyx_result.setup_done = __pyx_state[15]; __pyx_result.side_input_maps = __pyx_state[16]; __pyx_result.spec = __pyx_state[17]; __pyx_result.state_sampler = __pyx_state[18]; __pyx_result.step_name = __pyx_state[19]; __pyx_result.tagged_receivers = __pyx_state[20]; __pyx_result.timer_inputs = __pyx_state[21]; __pyx_result.timer_specs = __pyx_state[22]; __pyx_result.user_state_context = __pyx_state[23]
 *     if len(__pyx_state) > 24 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[24])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_DoOperation__set_state(<DoOperation> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DoOperation__set_state(DoOperation __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.dofn_runner = __pyx_state[4]; __pyx_result.execution_context = __pyx_state[5]; __pyx_result.fn = __pyx_state[6]; __pyx_result.input_info = __pyx_state[7]; __pyx_result.metrics_container = __pyx_state[8]; __pyx_result.name_context = __pyx_state[9]; __pyx_result.operation_name = __pyx_state[10]; __pyx_result.receivers = __pyx_state[11]; __pyx_result.scoped_finish_state = __pyx_state[12]; __pyx_result.scoped_process_state = __pyx_state[13]; __pyx_result.scoped_start_state = __pyx_state[14]; __pyx_result.setup_done = __pyx_state[15]; __pyx_result.side_input_maps = __pyx_state[16]; __pyx_result.spec = __pyx_state[17]; __pyx_result.state_sampler = __pyx_state[18]; __pyx_result.step_name = __pyx_state[19]; __pyx_result.tagged_receivers = __pyx_state[20]; __pyx_result.timer_inputs = __pyx_state[21]; __pyx_result.timer_specs = __pyx_state[22]; __pyx_result.user_state_context = __pyx_state[23]
 *     if len(__pyx_state) > 24 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.worker.operations.__pyx_unpickle_DoOperation__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_SdfTruncateSizedRestrictions(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_23__pyx_unpickle_SdfTruncateSizedRestrictions(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_23__pyx_unpickle_SdfTruncateSizedRestrictions = {"__pyx_unpickle_SdfTruncateSizedRestrictions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_23__pyx_unpickle_SdfTruncateSizedRestrictions, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_23__pyx_unpickle_SdfTruncateSizedRestrictions(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_SdfTruncateSizedRestrictions (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_SdfTruncateSizedRestrictions", 1, 3, 3, 1); __PYX_ERR(2, 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_SdfTruncateSizedRestrictions", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_SdfTruncateSizedRestrictions") < 0)) __PYX_ERR(2, 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(2, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SdfTruncateSizedRestrictions", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_SdfTruncateSizedRestrictions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_22__pyx_unpickle_SdfTruncateSizedRestrictions(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_22__pyx_unpickle_SdfTruncateSizedRestrictions(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_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_SdfTruncateSizedRestrictions", 0);
  __Pyx_TraceCall("__pyx_unpickle_SdfTruncateSizedRestrictions", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error));

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x521836b, 0xc916b15, 0xe64c129):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x521836b, 0xc916b15, 0xe64c129) = (consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, execution_context, fn, input_info, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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(2, 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 (0x521836b, 0xc916b15, 0xe64c129):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x521836b, 0xc916b15, 0xe64c129) = (consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, execution_context, fn, input_info, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context))" % __pyx_checksum)
 *     __pyx_result = SdfTruncateSizedRestrictions.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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(2, 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(2, 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 (0x521836b, 0xc916b15, 0xe64c129):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x521836b, 0xc916b15, 0xe64c129) = (consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, execution_context, fn, input_info, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = SdfTruncateSizedRestrictions.__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(2, 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(2, 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(2, 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(2, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x521836b, 0xc916b15, 0xe64c129):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x521836b, 0xc916b15, 0xe64c129) = (consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, execution_context, fn, input_info, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x521836b, 0xc916b15, 0xe64c129) = (consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, execution_context, fn, input_info, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context))" % __pyx_checksum)
 *     __pyx_result = SdfTruncateSizedRestrictions.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_SdfTruncateSizedRestrictions__set_state(<SdfTruncateSizedRestrictions> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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(2, 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 (0x521836b, 0xc916b15, 0xe64c129) = (consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, execution_context, fn, input_info, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context))" % __pyx_checksum)
 *     __pyx_result = SdfTruncateSizedRestrictions.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_SdfTruncateSizedRestrictions__set_state(<SdfTruncateSizedRestrictions> __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 = SdfTruncateSizedRestrictions.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_SdfTruncateSizedRestrictions__set_state(<SdfTruncateSizedRestrictions> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_SdfTruncateSizedRestrictions__set_state(SdfTruncateSizedRestrictions __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(2, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_SdfTruncateSizedRestrictions__set_state(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 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 (0x521836b, 0xc916b15, 0xe64c129) = (consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, execution_context, fn, input_info, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context))" % __pyx_checksum)
 *     __pyx_result = SdfTruncateSizedRestrictions.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_SdfTruncateSizedRestrictions__set_state(<SdfTruncateSizedRestrictions> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_SdfTruncateSizedRestrictions__set_state(<SdfTruncateSizedRestrictions> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_SdfTruncateSizedRestrictions__set_state(SdfTruncateSizedRestrictions __pyx_result, tuple __pyx_state):
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.dofn_runner = __pyx_state[4]; __pyx_result.execution_context = __pyx_state[5]; __pyx_result.fn = __pyx_state[6]; __pyx_result.input_info = __pyx_state[7]; __pyx_result.metrics_container = __pyx_state[8]; __pyx_result.name_context = __pyx_state[9]; __pyx_result.operation_name = __pyx_state[10]; __pyx_result.receivers = __pyx_state[11]; __pyx_result.scoped_finish_state = __pyx_state[12]; __pyx_result.scoped_process_state = __pyx_state[13]; __pyx_result.scoped_start_state = __pyx_state[14]; __pyx_result.setup_done = __pyx_state[15]; __pyx_result.side_input_maps = __pyx_state[16]; __pyx_result.spec = __pyx_state[17]; __pyx_result.state_sampler = __pyx_state[18]; __pyx_result.step_name = __pyx_state[19]; __pyx_result.tagged_receivers = __pyx_state[20]; __pyx_result.timer_inputs = __pyx_state[21]; __pyx_result.timer_specs = __pyx_state[22]; __pyx_result.user_state_context = __pyx_state[23]
 */
  __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_SdfTruncateSizedRestrictions(__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.worker.operations.__pyx_unpickle_SdfTruncateSizedRestrictions", __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_SdfTruncateSizedRestrictions__set_state(<SdfTruncateSizedRestrictions> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_SdfTruncateSizedRestrictions__set_state(SdfTruncateSizedRestrictions __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.dofn_runner = __pyx_state[4]; __pyx_result.execution_context = __pyx_state[5]; __pyx_result.fn = __pyx_state[6]; __pyx_result.input_info = __pyx_state[7]; __pyx_result.metrics_container = __pyx_state[8]; __pyx_result.name_context = __pyx_state[9]; __pyx_result.operation_name = __pyx_state[10]; __pyx_result.receivers = __pyx_state[11]; __pyx_result.scoped_finish_state = __pyx_state[12]; __pyx_result.scoped_process_state = __pyx_state[13]; __pyx_result.scoped_start_state = __pyx_state[14]; __pyx_result.setup_done = __pyx_state[15]; __pyx_result.side_input_maps = __pyx_state[16]; __pyx_result.spec = __pyx_state[17]; __pyx_result.state_sampler = __pyx_state[18]; __pyx_result.step_name = __pyx_state[19]; __pyx_result.tagged_receivers = __pyx_state[20]; __pyx_result.timer_inputs = __pyx_state[21]; __pyx_result.timer_specs = __pyx_state[22]; __pyx_result.user_state_context = __pyx_state[23]
 *     if len(__pyx_state) > 24 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_SdfTruncateSizedRestrictions__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_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_SdfTruncateSizedRestrictions__set_state", 0);
  __Pyx_TraceCall("__pyx_unpickle_SdfTruncateSizedRestrictions__set_state", __pyx_f[2], 11, 0, __PYX_ERR(2, 11, __pyx_L1_error));

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_SdfTruncateSizedRestrictions__set_state(SdfTruncateSizedRestrictions __pyx_result, tuple __pyx_state):
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.dofn_runner = __pyx_state[4]; __pyx_result.execution_context = __pyx_state[5]; __pyx_result.fn = __pyx_state[6]; __pyx_result.input_info = __pyx_state[7]; __pyx_result.metrics_container = __pyx_state[8]; __pyx_result.name_context = __pyx_state[9]; __pyx_result.operation_name = __pyx_state[10]; __pyx_result.receivers = __pyx_state[11]; __pyx_result.scoped_finish_state = __pyx_state[12]; __pyx_result.scoped_process_state = __pyx_state[13]; __pyx_result.scoped_start_state = __pyx_state[14]; __pyx_result.setup_done = __pyx_state[15]; __pyx_result.side_input_maps = __pyx_state[16]; __pyx_result.spec = __pyx_state[17]; __pyx_result.state_sampler = __pyx_state[18]; __pyx_result.step_name = __pyx_state[19]; __pyx_result.tagged_receivers = __pyx_state[20]; __pyx_result.timer_inputs = __pyx_state[21]; __pyx_result.timer_specs = __pyx_state[22]; __pyx_result.user_state_context = __pyx_state[23]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 24 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[24])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.consumers);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.consumers);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.consumers = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.counter_factory);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.counter_factory);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.counter_factory = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.data_sampler);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.data_sampler);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.data_sampler = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.__pyx_base.debug_logging_enabled = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 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_DoFnRunner))))) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.dofn_runner);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.dofn_runner));
  __pyx_v___pyx_result->__pyx_base.dofn_runner = ((struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.execution_context);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.execution_context);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.execution_context = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.fn);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.fn);
  __pyx_v___pyx_result->__pyx_base.fn = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.input_info);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.input_info);
  __pyx_v___pyx_result->__pyx_base.input_info = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.metrics_container);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.metrics_container);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.metrics_container = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.name_context);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.name_context);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.name_context = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.operation_name);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.operation_name);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.operation_name = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.receivers);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.receivers);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.receivers = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.scoped_finish_state);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.scoped_finish_state);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.scoped_finish_state = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.scoped_process_state);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.scoped_process_state);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.scoped_process_state = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.scoped_start_state);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.scoped_start_state);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.scoped_start_state = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.__pyx_base.setup_done = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.side_input_maps);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.side_input_maps);
  __pyx_v___pyx_result->__pyx_base.side_input_maps = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.spec);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.spec);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.spec = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.state_sampler);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.state_sampler);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.state_sampler = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.step_name);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.step_name);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.step_name = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.tagged_receivers);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.tagged_receivers);
  __pyx_v___pyx_result->__pyx_base.tagged_receivers = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.timer_inputs);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.timer_inputs);
  __pyx_v___pyx_result->__pyx_base.timer_inputs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.timer_specs);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.timer_specs);
  __pyx_v___pyx_result->__pyx_base.timer_specs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.user_state_context);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.user_state_context);
  __pyx_v___pyx_result->__pyx_base.user_state_context = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_SdfTruncateSizedRestrictions__set_state(SdfTruncateSizedRestrictions __pyx_result, tuple __pyx_state):
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.dofn_runner = __pyx_state[4]; __pyx_result.execution_context = __pyx_state[5]; __pyx_result.fn = __pyx_state[6]; __pyx_result.input_info = __pyx_state[7]; __pyx_result.metrics_container = __pyx_state[8]; __pyx_result.name_context = __pyx_state[9]; __pyx_result.operation_name = __pyx_state[10]; __pyx_result.receivers = __pyx_state[11]; __pyx_result.scoped_finish_state = __pyx_state[12]; __pyx_result.scoped_process_state = __pyx_state[13]; __pyx_result.scoped_start_state = __pyx_state[14]; __pyx_result.setup_done = __pyx_state[15]; __pyx_result.side_input_maps = __pyx_state[16]; __pyx_result.spec = __pyx_state[17]; __pyx_result.state_sampler = __pyx_state[18]; __pyx_result.step_name = __pyx_state[19]; __pyx_result.tagged_receivers = __pyx_state[20]; __pyx_result.timer_inputs = __pyx_state[21]; __pyx_result.timer_specs = __pyx_state[22]; __pyx_result.user_state_context = __pyx_state[23]
 *     if len(__pyx_state) > 24 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[24])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(2, 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(2, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 24) != 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(2, 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.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.dofn_runner = __pyx_state[4]; __pyx_result.execution_context = __pyx_state[5]; __pyx_result.fn = __pyx_state[6]; __pyx_result.input_info = __pyx_state[7]; __pyx_result.metrics_container = __pyx_state[8]; __pyx_result.name_context = __pyx_state[9]; __pyx_result.operation_name = __pyx_state[10]; __pyx_result.receivers = __pyx_state[11]; __pyx_result.scoped_finish_state = __pyx_state[12]; __pyx_result.scoped_process_state = __pyx_state[13]; __pyx_result.scoped_start_state = __pyx_state[14]; __pyx_result.setup_done = __pyx_state[15]; __pyx_result.side_input_maps = __pyx_state[16]; __pyx_result.spec = __pyx_state[17]; __pyx_result.state_sampler = __pyx_state[18]; __pyx_result.step_name = __pyx_state[19]; __pyx_result.tagged_receivers = __pyx_state[20]; __pyx_result.timer_inputs = __pyx_state[21]; __pyx_result.timer_specs = __pyx_state[22]; __pyx_result.user_state_context = __pyx_state[23]
 *     if len(__pyx_state) > 24 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[24])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 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(2, 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(2, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 24, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 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(2, 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_SdfTruncateSizedRestrictions__set_state(SdfTruncateSizedRestrictions __pyx_result, tuple __pyx_state):
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.dofn_runner = __pyx_state[4]; __pyx_result.execution_context = __pyx_state[5]; __pyx_result.fn = __pyx_state[6]; __pyx_result.input_info = __pyx_state[7]; __pyx_result.metrics_container = __pyx_state[8]; __pyx_result.name_context = __pyx_state[9]; __pyx_result.operation_name = __pyx_state[10]; __pyx_result.receivers = __pyx_state[11]; __pyx_result.scoped_finish_state = __pyx_state[12]; __pyx_result.scoped_process_state = __pyx_state[13]; __pyx_result.scoped_start_state = __pyx_state[14]; __pyx_result.setup_done = __pyx_state[15]; __pyx_result.side_input_maps = __pyx_state[16]; __pyx_result.spec = __pyx_state[17]; __pyx_result.state_sampler = __pyx_state[18]; __pyx_result.step_name = __pyx_state[19]; __pyx_result.tagged_receivers = __pyx_state[20]; __pyx_result.timer_inputs = __pyx_state[21]; __pyx_result.timer_specs = __pyx_state[22]; __pyx_result.user_state_context = __pyx_state[23]
 *     if len(__pyx_state) > 24 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[24])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_SdfTruncateSizedRestrictions__set_state(<SdfTruncateSizedRestrictions> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_SdfTruncateSizedRestrictions__set_state(SdfTruncateSizedRestrictions __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.dofn_runner = __pyx_state[4]; __pyx_result.execution_context = __pyx_state[5]; __pyx_result.fn = __pyx_state[6]; __pyx_result.input_info = __pyx_state[7]; __pyx_result.metrics_container = __pyx_state[8]; __pyx_result.name_context = __pyx_state[9]; __pyx_result.operation_name = __pyx_state[10]; __pyx_result.receivers = __pyx_state[11]; __pyx_result.scoped_finish_state = __pyx_state[12]; __pyx_result.scoped_process_state = __pyx_state[13]; __pyx_result.scoped_start_state = __pyx_state[14]; __pyx_result.setup_done = __pyx_state[15]; __pyx_result.side_input_maps = __pyx_state[16]; __pyx_result.spec = __pyx_state[17]; __pyx_result.state_sampler = __pyx_state[18]; __pyx_result.step_name = __pyx_state[19]; __pyx_result.tagged_receivers = __pyx_state[20]; __pyx_result.timer_inputs = __pyx_state[21]; __pyx_result.timer_specs = __pyx_state[22]; __pyx_result.user_state_context = __pyx_state[23]
 *     if len(__pyx_state) > 24 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.worker.operations.__pyx_unpickle_SdfTruncateSizedRestrictions__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_SdfProcessSizedElements(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_25__pyx_unpickle_SdfProcessSizedElements(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_25__pyx_unpickle_SdfProcessSizedElements = {"__pyx_unpickle_SdfProcessSizedElements", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_25__pyx_unpickle_SdfProcessSizedElements, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_25__pyx_unpickle_SdfProcessSizedElements(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_SdfProcessSizedElements (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_SdfProcessSizedElements", 1, 3, 3, 1); __PYX_ERR(2, 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_SdfProcessSizedElements", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_SdfProcessSizedElements") < 0)) __PYX_ERR(2, 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(2, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SdfProcessSizedElements", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_SdfProcessSizedElements", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_24__pyx_unpickle_SdfProcessSizedElements(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_24__pyx_unpickle_SdfProcessSizedElements(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_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__138)
  __Pyx_RefNannySetupContext("__pyx_unpickle_SdfProcessSizedElements", 0);
  __Pyx_TraceCall("__pyx_unpickle_SdfProcessSizedElements", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error));

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x8c483fa, 0x7b38efe, 0xbbdd7bd):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x8c483fa, 0x7b38efe, 0xbbdd7bd) = (consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, element_start_output_bytes, execution_context, fn, input_info, lock, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__139, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 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 (0x8c483fa, 0x7b38efe, 0xbbdd7bd):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x8c483fa, 0x7b38efe, 0xbbdd7bd) = (consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, element_start_output_bytes, execution_context, fn, input_info, lock, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context))" % __pyx_checksum)
 *     __pyx_result = SdfProcessSizedElements.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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(2, 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(2, 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 (0x8c483fa, 0x7b38efe, 0xbbdd7bd):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x8c483fa, 0x7b38efe, 0xbbdd7bd) = (consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, element_start_output_bytes, execution_context, fn, input_info, lock, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = SdfProcessSizedElements.__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(2, 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(2, 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(2, 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(2, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x8c483fa, 0x7b38efe, 0xbbdd7bd):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x8c483fa, 0x7b38efe, 0xbbdd7bd) = (consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, element_start_output_bytes, execution_context, fn, input_info, lock, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x8c483fa, 0x7b38efe, 0xbbdd7bd) = (consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, element_start_output_bytes, execution_context, fn, input_info, lock, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context))" % __pyx_checksum)
 *     __pyx_result = SdfProcessSizedElements.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_SdfProcessSizedElements__set_state(<SdfProcessSizedElements> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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(2, 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 (0x8c483fa, 0x7b38efe, 0xbbdd7bd) = (consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, element_start_output_bytes, execution_context, fn, input_info, lock, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context))" % __pyx_checksum)
 *     __pyx_result = SdfProcessSizedElements.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_SdfProcessSizedElements__set_state(<SdfProcessSizedElements> __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 = SdfProcessSizedElements.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_SdfProcessSizedElements__set_state(<SdfProcessSizedElements> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_SdfProcessSizedElements__set_state(SdfProcessSizedElements __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(2, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_SdfProcessSizedElements__set_state(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 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 (0x8c483fa, 0x7b38efe, 0xbbdd7bd) = (consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, element_start_output_bytes, execution_context, fn, input_info, lock, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context))" % __pyx_checksum)
 *     __pyx_result = SdfProcessSizedElements.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_SdfProcessSizedElements__set_state(<SdfProcessSizedElements> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_SdfProcessSizedElements__set_state(<SdfProcessSizedElements> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_SdfProcessSizedElements__set_state(SdfProcessSizedElements __pyx_result, tuple __pyx_state):
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.dofn_runner = __pyx_state[4]; __pyx_result.element_start_output_bytes = __pyx_state[5]; __pyx_result.execution_context = __pyx_state[6]; __pyx_result.fn = __pyx_state[7]; __pyx_result.input_info = __pyx_state[8]; __pyx_result.lock = __pyx_state[9]; __pyx_result.metrics_container = __pyx_state[10]; __pyx_result.name_context = __pyx_state[11]; __pyx_result.operation_name = __pyx_state[12]; __pyx_result.receivers = __pyx_state[13]; __pyx_result.scoped_finish_state = __pyx_state[14]; __pyx_result.scoped_process_state = __pyx_state[15]; __pyx_result.scoped_start_state = __pyx_state[16]; __pyx_result.setup_done = __pyx_state[17]; __pyx_result.side_input_maps = __pyx_state[18]; __pyx_result.spec = __pyx_state[19]; __pyx_result.state_sampler = __pyx_state[20]; __pyx_result.step_name = __pyx_state[21]; __pyx_result.tagged_receivers = __pyx_state[22]; __pyx_result.timer_inputs = __pyx_state[23]; __pyx_result.timer_specs = __pyx_state[24]; __pyx_result.user_state_context = __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_SdfProcessSizedElements(__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.worker.operations.__pyx_unpickle_SdfProcessSizedElements", __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_SdfProcessSizedElements__set_state(<SdfProcessSizedElements> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_SdfProcessSizedElements__set_state(SdfProcessSizedElements __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.dofn_runner = __pyx_state[4]; __pyx_result.element_start_output_bytes = __pyx_state[5]; __pyx_result.execution_context = __pyx_state[6]; __pyx_result.fn = __pyx_state[7]; __pyx_result.input_info = __pyx_state[8]; __pyx_result.lock = __pyx_state[9]; __pyx_result.metrics_container = __pyx_state[10]; __pyx_result.name_context = __pyx_state[11]; __pyx_result.operation_name = __pyx_state[12]; __pyx_result.receivers = __pyx_state[13]; __pyx_result.scoped_finish_state = __pyx_state[14]; __pyx_result.scoped_process_state = __pyx_state[15]; __pyx_result.scoped_start_state = __pyx_state[16]; __pyx_result.setup_done = __pyx_state[17]; __pyx_result.side_input_maps = __pyx_state[18]; __pyx_result.spec = __pyx_state[19]; __pyx_result.state_sampler = __pyx_state[20]; __pyx_result.step_name = __pyx_state[21]; __pyx_result.tagged_receivers = __pyx_state[22]; __pyx_result.timer_inputs = __pyx_state[23]; __pyx_result.timer_specs = __pyx_state[24]; __pyx_result.user_state_context = __pyx_state[25]
 *     if len(__pyx_state) > 26 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_SdfProcessSizedElements__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_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_SdfProcessSizedElements__set_state", 0);
  __Pyx_TraceCall("__pyx_unpickle_SdfProcessSizedElements__set_state", __pyx_f[2], 11, 0, __PYX_ERR(2, 11, __pyx_L1_error));

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_SdfProcessSizedElements__set_state(SdfProcessSizedElements __pyx_result, tuple __pyx_state):
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.dofn_runner = __pyx_state[4]; __pyx_result.element_start_output_bytes = __pyx_state[5]; __pyx_result.execution_context = __pyx_state[6]; __pyx_result.fn = __pyx_state[7]; __pyx_result.input_info = __pyx_state[8]; __pyx_result.lock = __pyx_state[9]; __pyx_result.metrics_container = __pyx_state[10]; __pyx_result.name_context = __pyx_state[11]; __pyx_result.operation_name = __pyx_state[12]; __pyx_result.receivers = __pyx_state[13]; __pyx_result.scoped_finish_state = __pyx_state[14]; __pyx_result.scoped_process_state = __pyx_state[15]; __pyx_result.scoped_start_state = __pyx_state[16]; __pyx_result.setup_done = __pyx_state[17]; __pyx_result.side_input_maps = __pyx_state[18]; __pyx_result.spec = __pyx_state[19]; __pyx_result.state_sampler = __pyx_state[20]; __pyx_result.step_name = __pyx_state[21]; __pyx_result.tagged_receivers = __pyx_state[22]; __pyx_result.timer_inputs = __pyx_state[23]; __pyx_result.timer_specs = __pyx_state[24]; __pyx_result.user_state_context = __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(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.consumers);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.consumers);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.consumers = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.counter_factory);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.counter_factory);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.counter_factory = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.data_sampler);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.data_sampler);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.data_sampler = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.__pyx_base.debug_logging_enabled = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 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_DoFnRunner))))) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.dofn_runner);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.dofn_runner));
  __pyx_v___pyx_result->__pyx_base.dofn_runner = ((struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->element_start_output_bytes);
  __Pyx_DECREF(__pyx_v___pyx_result->element_start_output_bytes);
  __pyx_v___pyx_result->element_start_output_bytes = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.execution_context);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.execution_context);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.execution_context = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.fn);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.fn);
  __pyx_v___pyx_result->__pyx_base.fn = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.input_info);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.input_info);
  __pyx_v___pyx_result->__pyx_base.input_info = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->lock);
  __Pyx_DECREF(__pyx_v___pyx_result->lock);
  __pyx_v___pyx_result->lock = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.metrics_container);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.metrics_container);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.metrics_container = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.name_context);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.name_context);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.name_context = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.operation_name);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.operation_name);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.operation_name = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.receivers);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.receivers);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.receivers = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.scoped_finish_state);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.scoped_finish_state);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.scoped_finish_state = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.scoped_process_state);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.scoped_process_state);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.scoped_process_state = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.scoped_start_state);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.scoped_start_state);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.scoped_start_state = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.__pyx_base.setup_done = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.side_input_maps);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.side_input_maps);
  __pyx_v___pyx_result->__pyx_base.side_input_maps = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.spec);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.spec);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.spec = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.state_sampler);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.state_sampler);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.state_sampler = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.step_name);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.step_name);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.step_name = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.tagged_receivers);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.tagged_receivers);
  __pyx_v___pyx_result->__pyx_base.tagged_receivers = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.timer_inputs);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.timer_inputs);
  __pyx_v___pyx_result->__pyx_base.timer_inputs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.timer_specs);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.timer_specs);
  __pyx_v___pyx_result->__pyx_base.timer_specs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.user_state_context);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.user_state_context);
  __pyx_v___pyx_result->__pyx_base.user_state_context = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_SdfProcessSizedElements__set_state(SdfProcessSizedElements __pyx_result, tuple __pyx_state):
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.dofn_runner = __pyx_state[4]; __pyx_result.element_start_output_bytes = __pyx_state[5]; __pyx_result.execution_context = __pyx_state[6]; __pyx_result.fn = __pyx_state[7]; __pyx_result.input_info = __pyx_state[8]; __pyx_result.lock = __pyx_state[9]; __pyx_result.metrics_container = __pyx_state[10]; __pyx_result.name_context = __pyx_state[11]; __pyx_result.operation_name = __pyx_state[12]; __pyx_result.receivers = __pyx_state[13]; __pyx_result.scoped_finish_state = __pyx_state[14]; __pyx_result.scoped_process_state = __pyx_state[15]; __pyx_result.scoped_start_state = __pyx_state[16]; __pyx_result.setup_done = __pyx_state[17]; __pyx_result.side_input_maps = __pyx_state[18]; __pyx_result.spec = __pyx_state[19]; __pyx_result.state_sampler = __pyx_state[20]; __pyx_result.step_name = __pyx_state[21]; __pyx_result.tagged_receivers = __pyx_state[22]; __pyx_result.timer_inputs = __pyx_state[23]; __pyx_result.timer_specs = __pyx_state[24]; __pyx_result.user_state_context = __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(2, 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(2, 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(2, 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.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.dofn_runner = __pyx_state[4]; __pyx_result.element_start_output_bytes = __pyx_state[5]; __pyx_result.execution_context = __pyx_state[6]; __pyx_result.fn = __pyx_state[7]; __pyx_result.input_info = __pyx_state[8]; __pyx_result.lock = __pyx_state[9]; __pyx_result.metrics_container = __pyx_state[10]; __pyx_result.name_context = __pyx_state[11]; __pyx_result.operation_name = __pyx_state[12]; __pyx_result.receivers = __pyx_state[13]; __pyx_result.scoped_finish_state = __pyx_state[14]; __pyx_result.scoped_process_state = __pyx_state[15]; __pyx_result.scoped_start_state = __pyx_state[16]; __pyx_result.setup_done = __pyx_state[17]; __pyx_result.side_input_maps = __pyx_state[18]; __pyx_result.spec = __pyx_state[19]; __pyx_result.state_sampler = __pyx_state[20]; __pyx_result.step_name = __pyx_state[21]; __pyx_result.tagged_receivers = __pyx_state[22]; __pyx_result.timer_inputs = __pyx_state[23]; __pyx_result.timer_specs = __pyx_state[24]; __pyx_result.user_state_context = __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(2, 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(2, 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(2, 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(2, 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(2, 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_SdfProcessSizedElements__set_state(SdfProcessSizedElements __pyx_result, tuple __pyx_state):
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.dofn_runner = __pyx_state[4]; __pyx_result.element_start_output_bytes = __pyx_state[5]; __pyx_result.execution_context = __pyx_state[6]; __pyx_result.fn = __pyx_state[7]; __pyx_result.input_info = __pyx_state[8]; __pyx_result.lock = __pyx_state[9]; __pyx_result.metrics_container = __pyx_state[10]; __pyx_result.name_context = __pyx_state[11]; __pyx_result.operation_name = __pyx_state[12]; __pyx_result.receivers = __pyx_state[13]; __pyx_result.scoped_finish_state = __pyx_state[14]; __pyx_result.scoped_process_state = __pyx_state[15]; __pyx_result.scoped_start_state = __pyx_state[16]; __pyx_result.setup_done = __pyx_state[17]; __pyx_result.side_input_maps = __pyx_state[18]; __pyx_result.spec = __pyx_state[19]; __pyx_result.state_sampler = __pyx_state[20]; __pyx_result.step_name = __pyx_state[21]; __pyx_result.tagged_receivers = __pyx_state[22]; __pyx_result.timer_inputs = __pyx_state[23]; __pyx_result.timer_specs = __pyx_state[24]; __pyx_result.user_state_context = __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_SdfProcessSizedElements__set_state(<SdfProcessSizedElements> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_SdfProcessSizedElements__set_state(SdfProcessSizedElements __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.dofn_runner = __pyx_state[4]; __pyx_result.element_start_output_bytes = __pyx_state[5]; __pyx_result.execution_context = __pyx_state[6]; __pyx_result.fn = __pyx_state[7]; __pyx_result.input_info = __pyx_state[8]; __pyx_result.lock = __pyx_state[9]; __pyx_result.metrics_container = __pyx_state[10]; __pyx_result.name_context = __pyx_state[11]; __pyx_result.operation_name = __pyx_state[12]; __pyx_result.receivers = __pyx_state[13]; __pyx_result.scoped_finish_state = __pyx_state[14]; __pyx_result.scoped_process_state = __pyx_state[15]; __pyx_result.scoped_start_state = __pyx_state[16]; __pyx_result.setup_done = __pyx_state[17]; __pyx_result.side_input_maps = __pyx_state[18]; __pyx_result.spec = __pyx_state[19]; __pyx_result.state_sampler = __pyx_state[20]; __pyx_result.step_name = __pyx_state[21]; __pyx_result.tagged_receivers = __pyx_state[22]; __pyx_result.timer_inputs = __pyx_state[23]; __pyx_result.timer_specs = __pyx_state[24]; __pyx_result.user_state_context = __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.worker.operations.__pyx_unpickle_SdfProcessSizedElements__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_CombineOperation(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_27__pyx_unpickle_CombineOperation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_27__pyx_unpickle_CombineOperation = {"__pyx_unpickle_CombineOperation", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_27__pyx_unpickle_CombineOperation, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_27__pyx_unpickle_CombineOperation(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_CombineOperation (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_CombineOperation", 1, 3, 3, 1); __PYX_ERR(2, 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_CombineOperation", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_CombineOperation") < 0)) __PYX_ERR(2, 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(2, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CombineOperation", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_CombineOperation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_26__pyx_unpickle_CombineOperation(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_26__pyx_unpickle_CombineOperation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_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__140)
  __Pyx_RefNannySetupContext("__pyx_unpickle_CombineOperation", 0);
  __Pyx_TraceCall("__pyx_unpickle_CombineOperation", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error));

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xc1cd107, 0x81f9b57, 0xaa2ec96):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xc1cd107, 0x81f9b57, 0xaa2ec96) = (consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, phased_combine_fn, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__141, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 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 (0xc1cd107, 0x81f9b57, 0xaa2ec96):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xc1cd107, 0x81f9b57, 0xaa2ec96) = (consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, phased_combine_fn, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name))" % __pyx_checksum)
 *     __pyx_result = CombineOperation.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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(2, 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(2, 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 (0xc1cd107, 0x81f9b57, 0xaa2ec96):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xc1cd107, 0x81f9b57, 0xaa2ec96) = (consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, phased_combine_fn, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = CombineOperation.__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(2, 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(2, 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(2, 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(2, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xc1cd107, 0x81f9b57, 0xaa2ec96):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xc1cd107, 0x81f9b57, 0xaa2ec96) = (consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, phased_combine_fn, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xc1cd107, 0x81f9b57, 0xaa2ec96) = (consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, phased_combine_fn, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name))" % __pyx_checksum)
 *     __pyx_result = CombineOperation.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CombineOperation__set_state(<CombineOperation> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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(2, 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 (0xc1cd107, 0x81f9b57, 0xaa2ec96) = (consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, phased_combine_fn, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name))" % __pyx_checksum)
 *     __pyx_result = CombineOperation.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_CombineOperation__set_state(<CombineOperation> __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 = CombineOperation.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CombineOperation__set_state(<CombineOperation> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_CombineOperation__set_state(CombineOperation __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(2, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_CombineOperation__set_state(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 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 (0xc1cd107, 0x81f9b57, 0xaa2ec96) = (consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, phased_combine_fn, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name))" % __pyx_checksum)
 *     __pyx_result = CombineOperation.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_CombineOperation__set_state(<CombineOperation> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CombineOperation__set_state(<CombineOperation> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_CombineOperation__set_state(CombineOperation __pyx_result, tuple __pyx_state):
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.phased_combine_fn = __pyx_state[8]; __pyx_result.receivers = __pyx_state[9]; __pyx_result.scoped_finish_state = __pyx_state[10]; __pyx_result.scoped_process_state = __pyx_state[11]; __pyx_result.scoped_start_state = __pyx_state[12]; __pyx_result.setup_done = __pyx_state[13]; __pyx_result.spec = __pyx_state[14]; __pyx_result.state_sampler = __pyx_state[15]; __pyx_result.step_name = __pyx_state[16]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_CombineOperation(__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.worker.operations.__pyx_unpickle_CombineOperation", __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_CombineOperation__set_state(<CombineOperation> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_CombineOperation__set_state(CombineOperation __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.phased_combine_fn = __pyx_state[8]; __pyx_result.receivers = __pyx_state[9]; __pyx_result.scoped_finish_state = __pyx_state[10]; __pyx_result.scoped_process_state = __pyx_state[11]; __pyx_result.scoped_start_state = __pyx_state[12]; __pyx_result.setup_done = __pyx_state[13]; __pyx_result.spec = __pyx_state[14]; __pyx_result.state_sampler = __pyx_state[15]; __pyx_result.step_name = __pyx_state[16]
 *     if len(__pyx_state) > 17 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_CombineOperation__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_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_CombineOperation__set_state", 0);
  __Pyx_TraceCall("__pyx_unpickle_CombineOperation__set_state", __pyx_f[2], 11, 0, __PYX_ERR(2, 11, __pyx_L1_error));

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_CombineOperation__set_state(CombineOperation __pyx_result, tuple __pyx_state):
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.phased_combine_fn = __pyx_state[8]; __pyx_result.receivers = __pyx_state[9]; __pyx_result.scoped_finish_state = __pyx_state[10]; __pyx_result.scoped_process_state = __pyx_state[11]; __pyx_result.scoped_start_state = __pyx_state[12]; __pyx_result.setup_done = __pyx_state[13]; __pyx_result.spec = __pyx_state[14]; __pyx_result.state_sampler = __pyx_state[15]; __pyx_result.step_name = __pyx_state[16]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 17 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[17])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.consumers);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.consumers);
  __pyx_v___pyx_result->__pyx_base.consumers = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.counter_factory);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.counter_factory);
  __pyx_v___pyx_result->__pyx_base.counter_factory = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.data_sampler);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.data_sampler);
  __pyx_v___pyx_result->__pyx_base.data_sampler = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.debug_logging_enabled = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.execution_context);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.execution_context);
  __pyx_v___pyx_result->__pyx_base.execution_context = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.metrics_container);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.metrics_container);
  __pyx_v___pyx_result->__pyx_base.metrics_container = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.name_context);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.name_context);
  __pyx_v___pyx_result->__pyx_base.name_context = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.operation_name);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.operation_name);
  __pyx_v___pyx_result->__pyx_base.operation_name = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->phased_combine_fn);
  __Pyx_DECREF(__pyx_v___pyx_result->phased_combine_fn);
  __pyx_v___pyx_result->phased_combine_fn = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.receivers);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.receivers);
  __pyx_v___pyx_result->__pyx_base.receivers = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_finish_state);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.scoped_finish_state);
  __pyx_v___pyx_result->__pyx_base.scoped_finish_state = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_process_state);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.scoped_process_state);
  __pyx_v___pyx_result->__pyx_base.scoped_process_state = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_start_state);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.scoped_start_state);
  __pyx_v___pyx_result->__pyx_base.scoped_start_state = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.setup_done = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.spec);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.spec);
  __pyx_v___pyx_result->__pyx_base.spec = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.state_sampler);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.state_sampler);
  __pyx_v___pyx_result->__pyx_base.state_sampler = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.step_name);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.step_name);
  __pyx_v___pyx_result->__pyx_base.step_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_CombineOperation__set_state(CombineOperation __pyx_result, tuple __pyx_state):
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.phased_combine_fn = __pyx_state[8]; __pyx_result.receivers = __pyx_state[9]; __pyx_result.scoped_finish_state = __pyx_state[10]; __pyx_result.scoped_process_state = __pyx_state[11]; __pyx_result.scoped_start_state = __pyx_state[12]; __pyx_result.setup_done = __pyx_state[13]; __pyx_result.spec = __pyx_state[14]; __pyx_result.state_sampler = __pyx_state[15]; __pyx_result.step_name = __pyx_state[16]
 *     if len(__pyx_state) > 17 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[17])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(2, 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(2, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 17) != 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(2, 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.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.phased_combine_fn = __pyx_state[8]; __pyx_result.receivers = __pyx_state[9]; __pyx_result.scoped_finish_state = __pyx_state[10]; __pyx_result.scoped_process_state = __pyx_state[11]; __pyx_result.scoped_start_state = __pyx_state[12]; __pyx_result.setup_done = __pyx_state[13]; __pyx_result.spec = __pyx_state[14]; __pyx_result.state_sampler = __pyx_state[15]; __pyx_result.step_name = __pyx_state[16]
 *     if len(__pyx_state) > 17 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[17])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 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(2, 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(2, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 17, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 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(2, 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_CombineOperation__set_state(CombineOperation __pyx_result, tuple __pyx_state):
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.phased_combine_fn = __pyx_state[8]; __pyx_result.receivers = __pyx_state[9]; __pyx_result.scoped_finish_state = __pyx_state[10]; __pyx_result.scoped_process_state = __pyx_state[11]; __pyx_result.scoped_start_state = __pyx_state[12]; __pyx_result.setup_done = __pyx_state[13]; __pyx_result.spec = __pyx_state[14]; __pyx_result.state_sampler = __pyx_state[15]; __pyx_result.step_name = __pyx_state[16]
 *     if len(__pyx_state) > 17 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[17])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_CombineOperation__set_state(<CombineOperation> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_CombineOperation__set_state(CombineOperation __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.phased_combine_fn = __pyx_state[8]; __pyx_result.receivers = __pyx_state[9]; __pyx_result.scoped_finish_state = __pyx_state[10]; __pyx_result.scoped_process_state = __pyx_state[11]; __pyx_result.scoped_start_state = __pyx_state[12]; __pyx_result.setup_done = __pyx_state[13]; __pyx_result.spec = __pyx_state[14]; __pyx_result.state_sampler = __pyx_state[15]; __pyx_result.step_name = __pyx_state[16]
 *     if len(__pyx_state) > 17 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.worker.operations.__pyx_unpickle_CombineOperation__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_PGBKCVOperation(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_29__pyx_unpickle_PGBKCVOperation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_29__pyx_unpickle_PGBKCVOperation = {"__pyx_unpickle_PGBKCVOperation", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_29__pyx_unpickle_PGBKCVOperation, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_29__pyx_unpickle_PGBKCVOperation(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_PGBKCVOperation (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_PGBKCVOperation", 1, 3, 3, 1); __PYX_ERR(2, 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_PGBKCVOperation", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_PGBKCVOperation") < 0)) __PYX_ERR(2, 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(2, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PGBKCVOperation", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_PGBKCVOperation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_28__pyx_unpickle_PGBKCVOperation(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_28__pyx_unpickle_PGBKCVOperation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_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__142)
  __Pyx_RefNannySetupContext("__pyx_unpickle_PGBKCVOperation", 0);
  __Pyx_TraceCall("__pyx_unpickle_PGBKCVOperation", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error));

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xf08ce62, 0x65f6927, 0x6c7b164):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xf08ce62, 0x65f6927, 0x6c7b164) = (combine_fn, combine_fn_add_input, combine_fn_compact, consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, is_default_windowing, key_count, max_keys, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name, table, timestamp_combiner))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__143, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 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 (0xf08ce62, 0x65f6927, 0x6c7b164):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xf08ce62, 0x65f6927, 0x6c7b164) = (combine_fn, combine_fn_add_input, combine_fn_compact, consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, is_default_windowing, key_count, max_keys, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name, table, timestamp_combiner))" % __pyx_checksum)
 *     __pyx_result = PGBKCVOperation.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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(2, 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(2, 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 (0xf08ce62, 0x65f6927, 0x6c7b164):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xf08ce62, 0x65f6927, 0x6c7b164) = (combine_fn, combine_fn_add_input, combine_fn_compact, consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, is_default_windowing, key_count, max_keys, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name, table, timestamp_combiner))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = PGBKCVOperation.__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(2, 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(2, 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(2, 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(2, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xf08ce62, 0x65f6927, 0x6c7b164):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xf08ce62, 0x65f6927, 0x6c7b164) = (combine_fn, combine_fn_add_input, combine_fn_compact, consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, is_default_windowing, key_count, max_keys, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name, table, timestamp_combiner))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xf08ce62, 0x65f6927, 0x6c7b164) = (combine_fn, combine_fn_add_input, combine_fn_compact, consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, is_default_windowing, key_count, max_keys, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name, table, timestamp_combiner))" % __pyx_checksum)
 *     __pyx_result = PGBKCVOperation.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_PGBKCVOperation__set_state(<PGBKCVOperation> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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(2, 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 (0xf08ce62, 0x65f6927, 0x6c7b164) = (combine_fn, combine_fn_add_input, combine_fn_compact, consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, is_default_windowing, key_count, max_keys, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name, table, timestamp_combiner))" % __pyx_checksum)
 *     __pyx_result = PGBKCVOperation.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_PGBKCVOperation__set_state(<PGBKCVOperation> __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 = PGBKCVOperation.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_PGBKCVOperation__set_state(<PGBKCVOperation> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_PGBKCVOperation__set_state(PGBKCVOperation __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(2, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_PGBKCVOperation__set_state(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 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 (0xf08ce62, 0x65f6927, 0x6c7b164) = (combine_fn, combine_fn_add_input, combine_fn_compact, consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, is_default_windowing, key_count, max_keys, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name, table, timestamp_combiner))" % __pyx_checksum)
 *     __pyx_result = PGBKCVOperation.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_PGBKCVOperation__set_state(<PGBKCVOperation> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_PGBKCVOperation__set_state(<PGBKCVOperation> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_PGBKCVOperation__set_state(PGBKCVOperation __pyx_result, tuple __pyx_state):
 *     __pyx_result.combine_fn = __pyx_state[0]; __pyx_result.combine_fn_add_input = __pyx_state[1]; __pyx_result.combine_fn_compact = __pyx_state[2]; __pyx_result.consumers = __pyx_state[3]; __pyx_result.counter_factory = __pyx_state[4]; __pyx_result.data_sampler = __pyx_state[5]; __pyx_result.debug_logging_enabled = __pyx_state[6]; __pyx_result.execution_context = __pyx_state[7]; __pyx_result.is_default_windowing = __pyx_state[8]; __pyx_result.key_count = __pyx_state[9]; __pyx_result.max_keys = __pyx_state[10]; __pyx_result.metrics_container = __pyx_state[11]; __pyx_result.name_context = __pyx_state[12]; __pyx_result.operation_name = __pyx_state[13]; __pyx_result.receivers = __pyx_state[14]; __pyx_result.scoped_finish_state = __pyx_state[15]; __pyx_result.scoped_process_state = __pyx_state[16]; __pyx_result.scoped_start_state = __pyx_state[17]; __pyx_result.setup_done = __pyx_state[18]; __pyx_result.spec = __pyx_state[19]; __pyx_result.state_sampler = __pyx_state[20]; __pyx_result.step_name = __pyx_state[21]; __pyx_result.table = __pyx_state[22]; __pyx_result.timestamp_combiner = __pyx_state[23]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_PGBKCVOperation(__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.worker.operations.__pyx_unpickle_PGBKCVOperation", __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_PGBKCVOperation__set_state(<PGBKCVOperation> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_PGBKCVOperation__set_state(PGBKCVOperation __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.combine_fn = __pyx_state[0]; __pyx_result.combine_fn_add_input = __pyx_state[1]; __pyx_result.combine_fn_compact = __pyx_state[2]; __pyx_result.consumers = __pyx_state[3]; __pyx_result.counter_factory = __pyx_state[4]; __pyx_result.data_sampler = __pyx_state[5]; __pyx_result.debug_logging_enabled = __pyx_state[6]; __pyx_result.execution_context = __pyx_state[7]; __pyx_result.is_default_windowing = __pyx_state[8]; __pyx_result.key_count = __pyx_state[9]; __pyx_result.max_keys = __pyx_state[10]; __pyx_result.metrics_container = __pyx_state[11]; __pyx_result.name_context = __pyx_state[12]; __pyx_result.operation_name = __pyx_state[13]; __pyx_result.receivers = __pyx_state[14]; __pyx_result.scoped_finish_state = __pyx_state[15]; __pyx_result.scoped_process_state = __pyx_state[16]; __pyx_result.scoped_start_state = __pyx_state[17]; __pyx_result.setup_done = __pyx_state[18]; __pyx_result.spec = __pyx_state[19]; __pyx_result.state_sampler = __pyx_state[20]; __pyx_result.step_name = __pyx_state[21]; __pyx_result.table = __pyx_state[22]; __pyx_result.timestamp_combiner = __pyx_state[23]
 *     if len(__pyx_state) > 24 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_PGBKCVOperation__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  long __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_PGBKCVOperation__set_state", 0);
  __Pyx_TraceCall("__pyx_unpickle_PGBKCVOperation__set_state", __pyx_f[2], 11, 0, __PYX_ERR(2, 11, __pyx_L1_error));

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_PGBKCVOperation__set_state(PGBKCVOperation __pyx_result, tuple __pyx_state):
 *     __pyx_result.combine_fn = __pyx_state[0]; __pyx_result.combine_fn_add_input = __pyx_state[1]; __pyx_result.combine_fn_compact = __pyx_state[2]; __pyx_result.consumers = __pyx_state[3]; __pyx_result.counter_factory = __pyx_state[4]; __pyx_result.data_sampler = __pyx_state[5]; __pyx_result.debug_logging_enabled = __pyx_state[6]; __pyx_result.execution_context = __pyx_state[7]; __pyx_result.is_default_windowing = __pyx_state[8]; __pyx_result.key_count = __pyx_state[9]; __pyx_result.max_keys = __pyx_state[10]; __pyx_result.metrics_container = __pyx_state[11]; __pyx_result.name_context = __pyx_state[12]; __pyx_result.operation_name = __pyx_state[13]; __pyx_result.receivers = __pyx_state[14]; __pyx_result.scoped_finish_state = __pyx_state[15]; __pyx_result.scoped_process_state = __pyx_state[16]; __pyx_result.scoped_start_state = __pyx_state[17]; __pyx_result.setup_done = __pyx_state[18]; __pyx_result.spec = __pyx_state[19]; __pyx_result.state_sampler = __pyx_state[20]; __pyx_result.step_name = __pyx_state[21]; __pyx_result.table = __pyx_state[22]; __pyx_result.timestamp_combiner = __pyx_state[23]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 24 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[24])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->combine_fn);
  __Pyx_DECREF(__pyx_v___pyx_result->combine_fn);
  __pyx_v___pyx_result->combine_fn = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->combine_fn_add_input);
  __Pyx_DECREF(__pyx_v___pyx_result->combine_fn_add_input);
  __pyx_v___pyx_result->combine_fn_add_input = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->combine_fn_compact);
  __Pyx_DECREF(__pyx_v___pyx_result->combine_fn_compact);
  __pyx_v___pyx_result->combine_fn_compact = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.consumers);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.consumers);
  __pyx_v___pyx_result->__pyx_base.consumers = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.counter_factory);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.counter_factory);
  __pyx_v___pyx_result->__pyx_base.counter_factory = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.data_sampler);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.data_sampler);
  __pyx_v___pyx_result->__pyx_base.data_sampler = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.debug_logging_enabled = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.execution_context);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.execution_context);
  __pyx_v___pyx_result->__pyx_base.execution_context = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->is_default_windowing = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_long(__pyx_t_1); if (unlikely((__pyx_t_3 == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->key_count = __pyx_t_3;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_long(__pyx_t_1); if (unlikely((__pyx_t_3 == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->max_keys = __pyx_t_3;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.metrics_container);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.metrics_container);
  __pyx_v___pyx_result->__pyx_base.metrics_container = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.name_context);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.name_context);
  __pyx_v___pyx_result->__pyx_base.name_context = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.operation_name);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.operation_name);
  __pyx_v___pyx_result->__pyx_base.operation_name = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.receivers);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.receivers);
  __pyx_v___pyx_result->__pyx_base.receivers = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_finish_state);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.scoped_finish_state);
  __pyx_v___pyx_result->__pyx_base.scoped_finish_state = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_process_state);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.scoped_process_state);
  __pyx_v___pyx_result->__pyx_base.scoped_process_state = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_start_state);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.scoped_start_state);
  __pyx_v___pyx_result->__pyx_base.scoped_start_state = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.setup_done = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.spec);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.spec);
  __pyx_v___pyx_result->__pyx_base.spec = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.state_sampler);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.state_sampler);
  __pyx_v___pyx_result->__pyx_base.state_sampler = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.step_name);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.step_name);
  __pyx_v___pyx_result->__pyx_base.step_name = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->table);
  __Pyx_DECREF(__pyx_v___pyx_result->table);
  __pyx_v___pyx_result->table = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->timestamp_combiner);
  __Pyx_DECREF(__pyx_v___pyx_result->timestamp_combiner);
  __pyx_v___pyx_result->timestamp_combiner = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_PGBKCVOperation__set_state(PGBKCVOperation __pyx_result, tuple __pyx_state):
 *     __pyx_result.combine_fn = __pyx_state[0]; __pyx_result.combine_fn_add_input = __pyx_state[1]; __pyx_result.combine_fn_compact = __pyx_state[2]; __pyx_result.consumers = __pyx_state[3]; __pyx_result.counter_factory = __pyx_state[4]; __pyx_result.data_sampler = __pyx_state[5]; __pyx_result.debug_logging_enabled = __pyx_state[6]; __pyx_result.execution_context = __pyx_state[7]; __pyx_result.is_default_windowing = __pyx_state[8]; __pyx_result.key_count = __pyx_state[9]; __pyx_result.max_keys = __pyx_state[10]; __pyx_result.metrics_container = __pyx_state[11]; __pyx_result.name_context = __pyx_state[12]; __pyx_result.operation_name = __pyx_state[13]; __pyx_result.receivers = __pyx_state[14]; __pyx_result.scoped_finish_state = __pyx_state[15]; __pyx_result.scoped_process_state = __pyx_state[16]; __pyx_result.scoped_start_state = __pyx_state[17]; __pyx_result.setup_done = __pyx_state[18]; __pyx_result.spec = __pyx_state[19]; __pyx_result.state_sampler = __pyx_state[20]; __pyx_result.step_name = __pyx_state[21]; __pyx_result.table = __pyx_state[22]; __pyx_result.timestamp_combiner = __pyx_state[23]
 *     if len(__pyx_state) > 24 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[24])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(2, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 24) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_2 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_2 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result.combine_fn = __pyx_state[0]; __pyx_result.combine_fn_add_input = __pyx_state[1]; __pyx_result.combine_fn_compact = __pyx_state[2]; __pyx_result.consumers = __pyx_state[3]; __pyx_result.counter_factory = __pyx_state[4]; __pyx_result.data_sampler = __pyx_state[5]; __pyx_result.debug_logging_enabled = __pyx_state[6]; __pyx_result.execution_context = __pyx_state[7]; __pyx_result.is_default_windowing = __pyx_state[8]; __pyx_result.key_count = __pyx_state[9]; __pyx_result.max_keys = __pyx_state[10]; __pyx_result.metrics_container = __pyx_state[11]; __pyx_result.name_context = __pyx_state[12]; __pyx_result.operation_name = __pyx_state[13]; __pyx_result.receivers = __pyx_state[14]; __pyx_result.scoped_finish_state = __pyx_state[15]; __pyx_result.scoped_process_state = __pyx_state[16]; __pyx_result.scoped_start_state = __pyx_state[17]; __pyx_result.setup_done = __pyx_state[18]; __pyx_result.spec = __pyx_state[19]; __pyx_result.state_sampler = __pyx_state[20]; __pyx_result.step_name = __pyx_state[21]; __pyx_result.table = __pyx_state[22]; __pyx_result.timestamp_combiner = __pyx_state[23]
 *     if len(__pyx_state) > 24 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[24])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(2, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 24, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_PGBKCVOperation__set_state(PGBKCVOperation __pyx_result, tuple __pyx_state):
 *     __pyx_result.combine_fn = __pyx_state[0]; __pyx_result.combine_fn_add_input = __pyx_state[1]; __pyx_result.combine_fn_compact = __pyx_state[2]; __pyx_result.consumers = __pyx_state[3]; __pyx_result.counter_factory = __pyx_state[4]; __pyx_result.data_sampler = __pyx_state[5]; __pyx_result.debug_logging_enabled = __pyx_state[6]; __pyx_result.execution_context = __pyx_state[7]; __pyx_result.is_default_windowing = __pyx_state[8]; __pyx_result.key_count = __pyx_state[9]; __pyx_result.max_keys = __pyx_state[10]; __pyx_result.metrics_container = __pyx_state[11]; __pyx_result.name_context = __pyx_state[12]; __pyx_result.operation_name = __pyx_state[13]; __pyx_result.receivers = __pyx_state[14]; __pyx_result.scoped_finish_state = __pyx_state[15]; __pyx_result.scoped_process_state = __pyx_state[16]; __pyx_result.scoped_start_state = __pyx_state[17]; __pyx_result.setup_done = __pyx_state[18]; __pyx_result.spec = __pyx_state[19]; __pyx_result.state_sampler = __pyx_state[20]; __pyx_result.step_name = __pyx_state[21]; __pyx_result.table = __pyx_state[22]; __pyx_result.timestamp_combiner = __pyx_state[23]
 *     if len(__pyx_state) > 24 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[24])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_PGBKCVOperation__set_state(<PGBKCVOperation> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_PGBKCVOperation__set_state(PGBKCVOperation __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.combine_fn = __pyx_state[0]; __pyx_result.combine_fn_add_input = __pyx_state[1]; __pyx_result.combine_fn_compact = __pyx_state[2]; __pyx_result.consumers = __pyx_state[3]; __pyx_result.counter_factory = __pyx_state[4]; __pyx_result.data_sampler = __pyx_state[5]; __pyx_result.debug_logging_enabled = __pyx_state[6]; __pyx_result.execution_context = __pyx_state[7]; __pyx_result.is_default_windowing = __pyx_state[8]; __pyx_result.key_count = __pyx_state[9]; __pyx_result.max_keys = __pyx_state[10]; __pyx_result.metrics_container = __pyx_state[11]; __pyx_result.name_context = __pyx_state[12]; __pyx_result.operation_name = __pyx_state[13]; __pyx_result.receivers = __pyx_state[14]; __pyx_result.scoped_finish_state = __pyx_state[15]; __pyx_result.scoped_process_state = __pyx_state[16]; __pyx_result.scoped_start_state = __pyx_state[17]; __pyx_result.setup_done = __pyx_state[18]; __pyx_result.spec = __pyx_state[19]; __pyx_result.state_sampler = __pyx_state[20]; __pyx_result.step_name = __pyx_state[21]; __pyx_result.table = __pyx_state[22]; __pyx_result.timestamp_combiner = __pyx_state[23]
 *     if len(__pyx_state) > 24 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_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_PGBKCVOperation__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_FlattenOperation(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_31__pyx_unpickle_FlattenOperation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_31__pyx_unpickle_FlattenOperation = {"__pyx_unpickle_FlattenOperation", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_31__pyx_unpickle_FlattenOperation, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_31__pyx_unpickle_FlattenOperation(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_FlattenOperation (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_FlattenOperation", 1, 3, 3, 1); __PYX_ERR(2, 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_FlattenOperation", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_FlattenOperation") < 0)) __PYX_ERR(2, 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(2, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FlattenOperation", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_FlattenOperation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_30__pyx_unpickle_FlattenOperation(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_30__pyx_unpickle_FlattenOperation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_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__144)
  __Pyx_RefNannySetupContext("__pyx_unpickle_FlattenOperation", 0);
  __Pyx_TraceCall("__pyx_unpickle_FlattenOperation", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error));

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xb6b9d28, 0x33b1103, 0x0ef7c70):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb6b9d28, 0x33b1103, 0x0ef7c70) = (consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__131, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 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 (0xb6b9d28, 0x33b1103, 0x0ef7c70):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb6b9d28, 0x33b1103, 0x0ef7c70) = (consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name))" % __pyx_checksum)
 *     __pyx_result = FlattenOperation.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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(2, 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(2, 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 (0xb6b9d28, 0x33b1103, 0x0ef7c70):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb6b9d28, 0x33b1103, 0x0ef7c70) = (consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = FlattenOperation.__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(2, 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(2, 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(2, 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(2, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xb6b9d28, 0x33b1103, 0x0ef7c70):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb6b9d28, 0x33b1103, 0x0ef7c70) = (consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb6b9d28, 0x33b1103, 0x0ef7c70) = (consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name))" % __pyx_checksum)
 *     __pyx_result = FlattenOperation.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_FlattenOperation__set_state(<FlattenOperation> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_FlattenOperation), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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(2, 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 (0xb6b9d28, 0x33b1103, 0x0ef7c70) = (consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name))" % __pyx_checksum)
 *     __pyx_result = FlattenOperation.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_FlattenOperation__set_state(<FlattenOperation> __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 = FlattenOperation.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_FlattenOperation__set_state(<FlattenOperation> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_FlattenOperation__set_state(FlattenOperation __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(2, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_FlattenOperation__set_state(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_FlattenOperation *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 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 (0xb6b9d28, 0x33b1103, 0x0ef7c70) = (consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name))" % __pyx_checksum)
 *     __pyx_result = FlattenOperation.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_FlattenOperation__set_state(<FlattenOperation> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_FlattenOperation__set_state(<FlattenOperation> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_FlattenOperation__set_state(FlattenOperation __pyx_result, tuple __pyx_state):
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.spec = __pyx_state[13]; __pyx_result.state_sampler = __pyx_state[14]; __pyx_result.step_name = __pyx_state[15]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_FlattenOperation(__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.worker.operations.__pyx_unpickle_FlattenOperation", __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_FlattenOperation__set_state(<FlattenOperation> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_FlattenOperation__set_state(FlattenOperation __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.spec = __pyx_state[13]; __pyx_result.state_sampler = __pyx_state[14]; __pyx_result.step_name = __pyx_state[15]
 *     if len(__pyx_state) > 16 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_FlattenOperation__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_FlattenOperation *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_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_FlattenOperation__set_state", 0);
  __Pyx_TraceCall("__pyx_unpickle_FlattenOperation__set_state", __pyx_f[2], 11, 0, __PYX_ERR(2, 11, __pyx_L1_error));

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_FlattenOperation__set_state(FlattenOperation __pyx_result, tuple __pyx_state):
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.spec = __pyx_state[13]; __pyx_result.state_sampler = __pyx_state[14]; __pyx_result.step_name = __pyx_state[15]             # <<<<<<<<<<<<<<
 *     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(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.consumers);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.consumers);
  __pyx_v___pyx_result->__pyx_base.consumers = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.counter_factory);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.counter_factory);
  __pyx_v___pyx_result->__pyx_base.counter_factory = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.data_sampler);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.data_sampler);
  __pyx_v___pyx_result->__pyx_base.data_sampler = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.debug_logging_enabled = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.execution_context);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.execution_context);
  __pyx_v___pyx_result->__pyx_base.execution_context = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.metrics_container);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.metrics_container);
  __pyx_v___pyx_result->__pyx_base.metrics_container = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.name_context);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.name_context);
  __pyx_v___pyx_result->__pyx_base.name_context = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.operation_name);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.operation_name);
  __pyx_v___pyx_result->__pyx_base.operation_name = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.receivers);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.receivers);
  __pyx_v___pyx_result->__pyx_base.receivers = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_finish_state);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.scoped_finish_state);
  __pyx_v___pyx_result->__pyx_base.scoped_finish_state = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_process_state);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.scoped_process_state);
  __pyx_v___pyx_result->__pyx_base.scoped_process_state = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_start_state);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.scoped_start_state);
  __pyx_v___pyx_result->__pyx_base.scoped_start_state = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.setup_done = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.spec);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.spec);
  __pyx_v___pyx_result->__pyx_base.spec = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.state_sampler);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.state_sampler);
  __pyx_v___pyx_result->__pyx_base.state_sampler = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 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(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.step_name);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.step_name);
  __pyx_v___pyx_result->__pyx_base.step_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_FlattenOperation__set_state(FlattenOperation __pyx_result, tuple __pyx_state):
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.spec = __pyx_state[13]; __pyx_result.state_sampler = __pyx_state[14]; __pyx_result.step_name = __pyx_state[15]
 *     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(2, 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(2, 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(2, 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.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.spec = __pyx_state[13]; __pyx_result.state_sampler = __pyx_state[14]; __pyx_result.step_name = __pyx_state[15]
 *     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(2, 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(2, 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(2, 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(2, 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(2, 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_FlattenOperation__set_state(FlattenOperation __pyx_result, tuple __pyx_state):
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.spec = __pyx_state[13]; __pyx_result.state_sampler = __pyx_state[14]; __pyx_result.step_name = __pyx_state[15]
 *     if len(__pyx_state) > 16 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[16])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_FlattenOperation__set_state(<FlattenOperation> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_FlattenOperation__set_state(FlattenOperation __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.spec = __pyx_state[13]; __pyx_result.state_sampler = __pyx_state[14]; __pyx_result.step_name = __pyx_state[15]
 *     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.worker.operations.__pyx_unpickle_FlattenOperation__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;
}

/* "cpython/datetime.pxd":104
 * # Datetime C API initialization function.
 * # You have to call it before any usage of DateTime CAPI functions.
 * cdef inline void import_datetime():             # <<<<<<<<<<<<<<
 *     PyDateTime_IMPORT
 * 
 */

static CYTHON_INLINE void __pyx_f_7cpython_8datetime_import_datetime(void) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("import_datetime", 0);
  __Pyx_TraceCall("import_datetime", __pyx_f[3], 104, 0, __PYX_ERR(3, 104, __pyx_L1_error));

  /* "cpython/datetime.pxd":105
 * # You have to call it before any usage of DateTime CAPI functions.
 * cdef inline void import_datetime():
 *     PyDateTime_IMPORT             # <<<<<<<<<<<<<<
 * 
 * # Create date object using DateTime CAPI factory function.
 */
  (void)(PyDateTime_IMPORT);

  /* "cpython/datetime.pxd":104
 * # Datetime C API initialization function.
 * # You have to call it before any usage of DateTime CAPI functions.
 * cdef inline void import_datetime():             # <<<<<<<<<<<<<<
 *     PyDateTime_IMPORT
 * 
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cpython.datetime.import_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cpython/datetime.pxd":109
 * # Create date object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline object date_new(int year, int month, int day):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.Date_FromDate(year, month, day, PyDateTimeAPI.DateType)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_date_new(int __pyx_v_year, int __pyx_v_month, int __pyx_v_day) {
  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_RefNannySetupContext("date_new", 0);
  __Pyx_TraceCall("date_new", __pyx_f[3], 109, 0, __PYX_ERR(3, 109, __pyx_L1_error));

  /* "cpython/datetime.pxd":110
 * # Note, there are no range checks for any of the arguments.
 * cdef inline object date_new(int year, int month, int day):
 *     return PyDateTimeAPI.Date_FromDate(year, month, day, PyDateTimeAPI.DateType)             # <<<<<<<<<<<<<<
 * 
 * # Create time object using DateTime CAPI factory function
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyDateTimeAPI->Date_FromDate(__pyx_v_year, __pyx_v_month, __pyx_v_day, PyDateTimeAPI->DateType); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cpython/datetime.pxd":109
 * # Create date object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline object date_new(int year, int month, int day):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.Date_FromDate(year, month, day, PyDateTimeAPI.DateType)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cpython.datetime.date_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cpython/datetime.pxd":114
 * # Create time object using DateTime CAPI factory function
 * # Note, there are no range checks for any of the arguments.
 * cdef inline object time_new(int hour, int minute, int second, int microsecond, object tz):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.Time_FromTime(hour, minute, second, microsecond, tz, PyDateTimeAPI.TimeType)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_time_new(int __pyx_v_hour, int __pyx_v_minute, int __pyx_v_second, int __pyx_v_microsecond, PyObject *__pyx_v_tz) {
  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_RefNannySetupContext("time_new", 0);
  __Pyx_TraceCall("time_new", __pyx_f[3], 114, 0, __PYX_ERR(3, 114, __pyx_L1_error));

  /* "cpython/datetime.pxd":115
 * # Note, there are no range checks for any of the arguments.
 * cdef inline object time_new(int hour, int minute, int second, int microsecond, object tz):
 *     return PyDateTimeAPI.Time_FromTime(hour, minute, second, microsecond, tz, PyDateTimeAPI.TimeType)             # <<<<<<<<<<<<<<
 * 
 * # Create datetime object using DateTime CAPI factory function.
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyDateTimeAPI->Time_FromTime(__pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_tz, PyDateTimeAPI->TimeType); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cpython/datetime.pxd":114
 * # Create time object using DateTime CAPI factory function
 * # Note, there are no range checks for any of the arguments.
 * cdef inline object time_new(int hour, int minute, int second, int microsecond, object tz):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.Time_FromTime(hour, minute, second, microsecond, tz, PyDateTimeAPI.TimeType)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cpython.datetime.time_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cpython/datetime.pxd":119
 * # Create datetime object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline object datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.DateTime_FromDateAndTime(year, month, day, hour, minute, second, microsecond, tz, PyDateTimeAPI.DateTimeType)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_datetime_new(int __pyx_v_year, int __pyx_v_month, int __pyx_v_day, int __pyx_v_hour, int __pyx_v_minute, int __pyx_v_second, int __pyx_v_microsecond, PyObject *__pyx_v_tz) {
  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_RefNannySetupContext("datetime_new", 0);
  __Pyx_TraceCall("datetime_new", __pyx_f[3], 119, 0, __PYX_ERR(3, 119, __pyx_L1_error));

  /* "cpython/datetime.pxd":120
 * # Note, there are no range checks for any of the arguments.
 * cdef inline object datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz):
 *     return PyDateTimeAPI.DateTime_FromDateAndTime(year, month, day, hour, minute, second, microsecond, tz, PyDateTimeAPI.DateTimeType)             # <<<<<<<<<<<<<<
 * 
 * # Create timedelta object using DateTime CAPI factory function.
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyDateTimeAPI->DateTime_FromDateAndTime(__pyx_v_year, __pyx_v_month, __pyx_v_day, __pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_tz, PyDateTimeAPI->DateTimeType); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cpython/datetime.pxd":119
 * # Create datetime object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline object datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.DateTime_FromDateAndTime(year, month, day, hour, minute, second, microsecond, tz, PyDateTimeAPI.DateTimeType)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cpython.datetime.datetime_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cpython/datetime.pxd":124
 * # Create timedelta object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline object timedelta_new(int days, int seconds, int useconds):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.Delta_FromDelta(days, seconds, useconds, 1, PyDateTimeAPI.DeltaType)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_timedelta_new(int __pyx_v_days, int __pyx_v_seconds, int __pyx_v_useconds) {
  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_RefNannySetupContext("timedelta_new", 0);
  __Pyx_TraceCall("timedelta_new", __pyx_f[3], 124, 0, __PYX_ERR(3, 124, __pyx_L1_error));

  /* "cpython/datetime.pxd":125
 * # Note, there are no range checks for any of the arguments.
 * cdef inline object timedelta_new(int days, int seconds, int useconds):
 *     return PyDateTimeAPI.Delta_FromDelta(days, seconds, useconds, 1, PyDateTimeAPI.DeltaType)             # <<<<<<<<<<<<<<
 * 
 * # More recognizable getters for date/time/datetime/timedelta.
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyDateTimeAPI->Delta_FromDelta(__pyx_v_days, __pyx_v_seconds, __pyx_v_useconds, 1, PyDateTimeAPI->DeltaType); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cpython/datetime.pxd":124
 * # Create timedelta object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline object timedelta_new(int days, int seconds, int useconds):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.Delta_FromDelta(days, seconds, useconds, 1, PyDateTimeAPI.DeltaType)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cpython.datetime.timedelta_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cpython/datetime.pxd":133
 * 
 * # Get tzinfo of time
 * cdef inline object time_tzinfo(object o):             # <<<<<<<<<<<<<<
 *     if (<PyDateTime_Time*>o).hastzinfo:
 *         return <object>(<PyDateTime_Time*>o).tzinfo
 */

static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_time_tzinfo(PyObject *__pyx_v_o) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("time_tzinfo", 0);
  __Pyx_TraceCall("time_tzinfo", __pyx_f[3], 133, 0, __PYX_ERR(3, 133, __pyx_L1_error));

  /* "cpython/datetime.pxd":134
 * # Get tzinfo of time
 * cdef inline object time_tzinfo(object o):
 *     if (<PyDateTime_Time*>o).hastzinfo:             # <<<<<<<<<<<<<<
 *         return <object>(<PyDateTime_Time*>o).tzinfo
 *     else:
 */
  __pyx_t_1 = (((PyDateTime_Time *)__pyx_v_o)->hastzinfo != 0);
  if (__pyx_t_1) {

    /* "cpython/datetime.pxd":135
 * cdef inline object time_tzinfo(object o):
 *     if (<PyDateTime_Time*>o).hastzinfo:
 *         return <object>(<PyDateTime_Time*>o).tzinfo             # <<<<<<<<<<<<<<
 *     else:
 *         return None
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)((PyDateTime_Time *)__pyx_v_o)->tzinfo));
    __pyx_r = ((PyObject *)((PyDateTime_Time *)__pyx_v_o)->tzinfo);
    goto __pyx_L0;

    /* "cpython/datetime.pxd":134
 * # Get tzinfo of time
 * cdef inline object time_tzinfo(object o):
 *     if (<PyDateTime_Time*>o).hastzinfo:             # <<<<<<<<<<<<<<
 *         return <object>(<PyDateTime_Time*>o).tzinfo
 *     else:
 */
  }

  /* "cpython/datetime.pxd":137
 *         return <object>(<PyDateTime_Time*>o).tzinfo
 *     else:
 *         return None             # <<<<<<<<<<<<<<
 * 
 * # Get tzinfo of datetime
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
  }

  /* "cpython/datetime.pxd":133
 * 
 * # Get tzinfo of time
 * cdef inline object time_tzinfo(object o):             # <<<<<<<<<<<<<<
 *     if (<PyDateTime_Time*>o).hastzinfo:
 *         return <object>(<PyDateTime_Time*>o).tzinfo
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cpython.datetime.time_tzinfo", __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;
}

/* "cpython/datetime.pxd":140
 * 
 * # Get tzinfo of datetime
 * cdef inline object datetime_tzinfo(object o):             # <<<<<<<<<<<<<<
 *     if (<PyDateTime_DateTime*>o).hastzinfo:
 *         return <object>(<PyDateTime_DateTime*>o).tzinfo
 */

static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_datetime_tzinfo(PyObject *__pyx_v_o) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("datetime_tzinfo", 0);
  __Pyx_TraceCall("datetime_tzinfo", __pyx_f[3], 140, 0, __PYX_ERR(3, 140, __pyx_L1_error));

  /* "cpython/datetime.pxd":141
 * # Get tzinfo of datetime
 * cdef inline object datetime_tzinfo(object o):
 *     if (<PyDateTime_DateTime*>o).hastzinfo:             # <<<<<<<<<<<<<<
 *         return <object>(<PyDateTime_DateTime*>o).tzinfo
 *     else:
 */
  __pyx_t_1 = (((PyDateTime_DateTime *)__pyx_v_o)->hastzinfo != 0);
  if (__pyx_t_1) {

    /* "cpython/datetime.pxd":142
 * cdef inline object datetime_tzinfo(object o):
 *     if (<PyDateTime_DateTime*>o).hastzinfo:
 *         return <object>(<PyDateTime_DateTime*>o).tzinfo             # <<<<<<<<<<<<<<
 *     else:
 *         return None
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)((PyDateTime_DateTime *)__pyx_v_o)->tzinfo));
    __pyx_r = ((PyObject *)((PyDateTime_DateTime *)__pyx_v_o)->tzinfo);
    goto __pyx_L0;

    /* "cpython/datetime.pxd":141
 * # Get tzinfo of datetime
 * cdef inline object datetime_tzinfo(object o):
 *     if (<PyDateTime_DateTime*>o).hastzinfo:             # <<<<<<<<<<<<<<
 *         return <object>(<PyDateTime_DateTime*>o).tzinfo
 *     else:
 */
  }

  /* "cpython/datetime.pxd":144
 *         return <object>(<PyDateTime_DateTime*>o).tzinfo
 *     else:
 *         return None             # <<<<<<<<<<<<<<
 * 
 * # Get year of date
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
  }

  /* "cpython/datetime.pxd":140
 * 
 * # Get tzinfo of datetime
 * cdef inline object datetime_tzinfo(object o):             # <<<<<<<<<<<<<<
 *     if (<PyDateTime_DateTime*>o).hastzinfo:
 *         return <object>(<PyDateTime_DateTime*>o).tzinfo
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cpython.datetime.datetime_tzinfo", __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;
}

/* "cpython/datetime.pxd":147
 * 
 * # Get year of date
 * cdef inline int date_year(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_YEAR(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_date_year(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("date_year", 0);
  __Pyx_TraceCall("date_year", __pyx_f[3], 147, 0, __PYX_ERR(3, 147, __pyx_L1_error));

  /* "cpython/datetime.pxd":148
 * # Get year of date
 * cdef inline int date_year(object o):
 *     return PyDateTime_GET_YEAR(o)             # <<<<<<<<<<<<<<
 * 
 * # Get month of date
 */
  __pyx_r = PyDateTime_GET_YEAR(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":147
 * 
 * # Get year of date
 * cdef inline int date_year(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_YEAR(o)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cpython.datetime.date_year", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cpython/datetime.pxd":151
 * 
 * # Get month of date
 * cdef inline int date_month(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_MONTH(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_date_month(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("date_month", 0);
  __Pyx_TraceCall("date_month", __pyx_f[3], 151, 0, __PYX_ERR(3, 151, __pyx_L1_error));

  /* "cpython/datetime.pxd":152
 * # Get month of date
 * cdef inline int date_month(object o):
 *     return PyDateTime_GET_MONTH(o)             # <<<<<<<<<<<<<<
 * 
 * # Get day of date
 */
  __pyx_r = PyDateTime_GET_MONTH(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":151
 * 
 * # Get month of date
 * cdef inline int date_month(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_MONTH(o)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cpython.datetime.date_month", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cpython/datetime.pxd":155
 * 
 * # Get day of date
 * cdef inline int date_day(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_DAY(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_date_day(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("date_day", 0);
  __Pyx_TraceCall("date_day", __pyx_f[3], 155, 0, __PYX_ERR(3, 155, __pyx_L1_error));

  /* "cpython/datetime.pxd":156
 * # Get day of date
 * cdef inline int date_day(object o):
 *     return PyDateTime_GET_DAY(o)             # <<<<<<<<<<<<<<
 * 
 * # Get year of datetime
 */
  __pyx_r = PyDateTime_GET_DAY(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":155
 * 
 * # Get day of date
 * cdef inline int date_day(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_DAY(o)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cpython.datetime.date_day", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cpython/datetime.pxd":159
 * 
 * # Get year of datetime
 * cdef inline int datetime_year(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_YEAR(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_year(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("datetime_year", 0);
  __Pyx_TraceCall("datetime_year", __pyx_f[3], 159, 0, __PYX_ERR(3, 159, __pyx_L1_error));

  /* "cpython/datetime.pxd":160
 * # Get year of datetime
 * cdef inline int datetime_year(object o):
 *     return PyDateTime_GET_YEAR(o)             # <<<<<<<<<<<<<<
 * 
 * # Get month of datetime
 */
  __pyx_r = PyDateTime_GET_YEAR(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":159
 * 
 * # Get year of datetime
 * cdef inline int datetime_year(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_YEAR(o)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cpython.datetime.datetime_year", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cpython/datetime.pxd":163
 * 
 * # Get month of datetime
 * cdef inline int datetime_month(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_MONTH(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_month(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("datetime_month", 0);
  __Pyx_TraceCall("datetime_month", __pyx_f[3], 163, 0, __PYX_ERR(3, 163, __pyx_L1_error));

  /* "cpython/datetime.pxd":164
 * # Get month of datetime
 * cdef inline int datetime_month(object o):
 *     return PyDateTime_GET_MONTH(o)             # <<<<<<<<<<<<<<
 * 
 * # Get day of datetime
 */
  __pyx_r = PyDateTime_GET_MONTH(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":163
 * 
 * # Get month of datetime
 * cdef inline int datetime_month(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_MONTH(o)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cpython.datetime.datetime_month", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cpython/datetime.pxd":167
 * 
 * # Get day of datetime
 * cdef inline int datetime_day(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_DAY(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_day(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("datetime_day", 0);
  __Pyx_TraceCall("datetime_day", __pyx_f[3], 167, 0, __PYX_ERR(3, 167, __pyx_L1_error));

  /* "cpython/datetime.pxd":168
 * # Get day of datetime
 * cdef inline int datetime_day(object o):
 *     return PyDateTime_GET_DAY(o)             # <<<<<<<<<<<<<<
 * 
 * # Get hour of time
 */
  __pyx_r = PyDateTime_GET_DAY(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":167
 * 
 * # Get day of datetime
 * cdef inline int datetime_day(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_DAY(o)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cpython.datetime.datetime_day", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cpython/datetime.pxd":171
 * 
 * # Get hour of time
 * cdef inline int time_hour(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_HOUR(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_hour(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("time_hour", 0);
  __Pyx_TraceCall("time_hour", __pyx_f[3], 171, 0, __PYX_ERR(3, 171, __pyx_L1_error));

  /* "cpython/datetime.pxd":172
 * # Get hour of time
 * cdef inline int time_hour(object o):
 *     return PyDateTime_TIME_GET_HOUR(o)             # <<<<<<<<<<<<<<
 * 
 * # Get minute of time
 */
  __pyx_r = PyDateTime_TIME_GET_HOUR(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":171
 * 
 * # Get hour of time
 * cdef inline int time_hour(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_HOUR(o)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cpython.datetime.time_hour", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cpython/datetime.pxd":175
 * 
 * # Get minute of time
 * cdef inline int time_minute(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_MINUTE(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_minute(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("time_minute", 0);
  __Pyx_TraceCall("time_minute", __pyx_f[3], 175, 0, __PYX_ERR(3, 175, __pyx_L1_error));

  /* "cpython/datetime.pxd":176
 * # Get minute of time
 * cdef inline int time_minute(object o):
 *     return PyDateTime_TIME_GET_MINUTE(o)             # <<<<<<<<<<<<<<
 * 
 * # Get second of time
 */
  __pyx_r = PyDateTime_TIME_GET_MINUTE(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":175
 * 
 * # Get minute of time
 * cdef inline int time_minute(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_MINUTE(o)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cpython.datetime.time_minute", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cpython/datetime.pxd":179
 * 
 * # Get second of time
 * cdef inline int time_second(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_SECOND(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_second(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("time_second", 0);
  __Pyx_TraceCall("time_second", __pyx_f[3], 179, 0, __PYX_ERR(3, 179, __pyx_L1_error));

  /* "cpython/datetime.pxd":180
 * # Get second of time
 * cdef inline int time_second(object o):
 *     return PyDateTime_TIME_GET_SECOND(o)             # <<<<<<<<<<<<<<
 * 
 * # Get microsecond of time
 */
  __pyx_r = PyDateTime_TIME_GET_SECOND(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":179
 * 
 * # Get second of time
 * cdef inline int time_second(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_SECOND(o)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cpython.datetime.time_second", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cpython/datetime.pxd":183
 * 
 * # Get microsecond of time
 * cdef inline int time_microsecond(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_MICROSECOND(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_microsecond(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("time_microsecond", 0);
  __Pyx_TraceCall("time_microsecond", __pyx_f[3], 183, 0, __PYX_ERR(3, 183, __pyx_L1_error));

  /* "cpython/datetime.pxd":184
 * # Get microsecond of time
 * cdef inline int time_microsecond(object o):
 *     return PyDateTime_TIME_GET_MICROSECOND(o)             # <<<<<<<<<<<<<<
 * 
 * # Get hour of datetime
 */
  __pyx_r = PyDateTime_TIME_GET_MICROSECOND(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":183
 * 
 * # Get microsecond of time
 * cdef inline int time_microsecond(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_MICROSECOND(o)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cpython.datetime.time_microsecond", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cpython/datetime.pxd":187
 * 
 * # Get hour of datetime
 * cdef inline int datetime_hour(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_HOUR(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_hour(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("datetime_hour", 0);
  __Pyx_TraceCall("datetime_hour", __pyx_f[3], 187, 0, __PYX_ERR(3, 187, __pyx_L1_error));

  /* "cpython/datetime.pxd":188
 * # Get hour of datetime
 * cdef inline int datetime_hour(object o):
 *     return PyDateTime_DATE_GET_HOUR(o)             # <<<<<<<<<<<<<<
 * 
 * # Get minute of datetime
 */
  __pyx_r = PyDateTime_DATE_GET_HOUR(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":187
 * 
 * # Get hour of datetime
 * cdef inline int datetime_hour(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_HOUR(o)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cpython.datetime.datetime_hour", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cpython/datetime.pxd":191
 * 
 * # Get minute of datetime
 * cdef inline int datetime_minute(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_MINUTE(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_minute(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("datetime_minute", 0);
  __Pyx_TraceCall("datetime_minute", __pyx_f[3], 191, 0, __PYX_ERR(3, 191, __pyx_L1_error));

  /* "cpython/datetime.pxd":192
 * # Get minute of datetime
 * cdef inline int datetime_minute(object o):
 *     return PyDateTime_DATE_GET_MINUTE(o)             # <<<<<<<<<<<<<<
 * 
 * # Get second of datetime
 */
  __pyx_r = PyDateTime_DATE_GET_MINUTE(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":191
 * 
 * # Get minute of datetime
 * cdef inline int datetime_minute(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_MINUTE(o)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cpython.datetime.datetime_minute", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cpython/datetime.pxd":195
 * 
 * # Get second of datetime
 * cdef inline int datetime_second(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_SECOND(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_second(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("datetime_second", 0);
  __Pyx_TraceCall("datetime_second", __pyx_f[3], 195, 0, __PYX_ERR(3, 195, __pyx_L1_error));

  /* "cpython/datetime.pxd":196
 * # Get second of datetime
 * cdef inline int datetime_second(object o):
 *     return PyDateTime_DATE_GET_SECOND(o)             # <<<<<<<<<<<<<<
 * 
 * # Get microsecond of datetime
 */
  __pyx_r = PyDateTime_DATE_GET_SECOND(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":195
 * 
 * # Get second of datetime
 * cdef inline int datetime_second(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_SECOND(o)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cpython.datetime.datetime_second", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cpython/datetime.pxd":199
 * 
 * # Get microsecond of datetime
 * cdef inline int datetime_microsecond(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_MICROSECOND(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_microsecond(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("datetime_microsecond", 0);
  __Pyx_TraceCall("datetime_microsecond", __pyx_f[3], 199, 0, __PYX_ERR(3, 199, __pyx_L1_error));

  /* "cpython/datetime.pxd":200
 * # Get microsecond of datetime
 * cdef inline int datetime_microsecond(object o):
 *     return PyDateTime_DATE_GET_MICROSECOND(o)             # <<<<<<<<<<<<<<
 * 
 * # Get days of timedelta
 */
  __pyx_r = PyDateTime_DATE_GET_MICROSECOND(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":199
 * 
 * # Get microsecond of datetime
 * cdef inline int datetime_microsecond(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_MICROSECOND(o)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cpython.datetime.datetime_microsecond", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cpython/datetime.pxd":203
 * 
 * # Get days of timedelta
 * cdef inline int timedelta_days(object o):             # <<<<<<<<<<<<<<
 *     return (<PyDateTime_Delta*>o).days
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_days(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("timedelta_days", 0);
  __Pyx_TraceCall("timedelta_days", __pyx_f[3], 203, 0, __PYX_ERR(3, 203, __pyx_L1_error));

  /* "cpython/datetime.pxd":204
 * # Get days of timedelta
 * cdef inline int timedelta_days(object o):
 *     return (<PyDateTime_Delta*>o).days             # <<<<<<<<<<<<<<
 * 
 * # Get seconds of timedelta
 */
  __pyx_r = ((PyDateTime_Delta *)__pyx_v_o)->days;
  goto __pyx_L0;

  /* "cpython/datetime.pxd":203
 * 
 * # Get days of timedelta
 * cdef inline int timedelta_days(object o):             # <<<<<<<<<<<<<<
 *     return (<PyDateTime_Delta*>o).days
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cpython.datetime.timedelta_days", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cpython/datetime.pxd":207
 * 
 * # Get seconds of timedelta
 * cdef inline int timedelta_seconds(object o):             # <<<<<<<<<<<<<<
 *     return (<PyDateTime_Delta*>o).seconds
 * 
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_seconds(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("timedelta_seconds", 0);
  __Pyx_TraceCall("timedelta_seconds", __pyx_f[3], 207, 0, __PYX_ERR(3, 207, __pyx_L1_error));

  /* "cpython/datetime.pxd":208
 * # Get seconds of timedelta
 * cdef inline int timedelta_seconds(object o):
 *     return (<PyDateTime_Delta*>o).seconds             # <<<<<<<<<<<<<<
 * 
 * # Get microseconds of timedelta
 */
  __pyx_r = ((PyDateTime_Delta *)__pyx_v_o)->seconds;
  goto __pyx_L0;

  /* "cpython/datetime.pxd":207
 * 
 * # Get seconds of timedelta
 * cdef inline int timedelta_seconds(object o):             # <<<<<<<<<<<<<<
 *     return (<PyDateTime_Delta*>o).seconds
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cpython.datetime.timedelta_seconds", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cpython/datetime.pxd":211
 * 
 * # Get microseconds of timedelta
 * cdef inline int timedelta_microseconds(object o):             # <<<<<<<<<<<<<<
 *     return (<PyDateTime_Delta*>o).microseconds
 */

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_microseconds(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("timedelta_microseconds", 0);
  __Pyx_TraceCall("timedelta_microseconds", __pyx_f[3], 211, 0, __PYX_ERR(3, 211, __pyx_L1_error));

  /* "cpython/datetime.pxd":212
 * # Get microseconds of timedelta
 * cdef inline int timedelta_microseconds(object o):
 *     return (<PyDateTime_Delta*>o).microseconds             # <<<<<<<<<<<<<<
 */
  __pyx_r = ((PyDateTime_Delta *)__pyx_v_o)->microseconds;
  goto __pyx_L0;

  /* "cpython/datetime.pxd":211
 * 
 * # Get microseconds of timedelta
 * cdef inline int timedelta_microseconds(object o):             # <<<<<<<<<<<<<<
 *     return (<PyDateTime_Delta*>o).microseconds
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cpython.datetime.timedelta_microseconds", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_ConsumerSet __pyx_vtable_11apache_beam_7runners_6worker_10operations_ConsumerSet;

static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_ConsumerSet(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *p;
  PyObject *o = __pyx_ptype_11apache_beam_7runners_6common_Receiver->tp_new(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_7runners_6common_Receiver*)__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_ConsumerSet;
  p->consumers = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->opcounter = ((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)Py_None); Py_INCREF(Py_None);
  p->step_name = Py_None; Py_INCREF(Py_None);
  p->output_index = Py_None; Py_INCREF(Py_None);
  p->coder = Py_None; Py_INCREF(Py_None);
  p->output_sampler = Py_None; Py_INCREF(Py_None);
  p->element_sampler = Py_None; Py_INCREF(Py_None);
  p->execution_context = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_ConsumerSet(PyObject *o) {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(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->consumers);
  Py_CLEAR(p->opcounter);
  Py_CLEAR(p->step_name);
  Py_CLEAR(p->output_index);
  Py_CLEAR(p->coder);
  Py_CLEAR(p->output_sampler);
  Py_CLEAR(p->element_sampler);
  Py_CLEAR(p->execution_context);
  if (PyType_IS_GC(__pyx_ptype_11apache_beam_7runners_6common_Receiver)) PyObject_GC_Track(o);
  if (likely(__pyx_ptype_11apache_beam_7runners_6common_Receiver)) __pyx_ptype_11apache_beam_7runners_6common_Receiver->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_ConsumerSet);
}

static int __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_ConsumerSet(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)o;
  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_6worker_10operations_ConsumerSet)); if (e) return e;
  if (p->consumers) {
    e = (*v)(p->consumers, a); if (e) return e;
  }
  if (p->opcounter) {
    e = (*v)(((PyObject *)p->opcounter), a); if (e) return e;
  }
  if (p->step_name) {
    e = (*v)(p->step_name, a); if (e) return e;
  }
  if (p->output_index) {
    e = (*v)(p->output_index, a); if (e) return e;
  }
  if (p->coder) {
    e = (*v)(p->coder, a); if (e) return e;
  }
  if (p->output_sampler) {
    e = (*v)(p->output_sampler, a); if (e) return e;
  }
  if (p->element_sampler) {
    e = (*v)(p->element_sampler, a); if (e) return e;
  }
  if (p->execution_context) {
    e = (*v)(p->execution_context, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_ConsumerSet(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)o;
  if (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_6worker_10operations_ConsumerSet);
  tmp = ((PyObject*)p->consumers);
  p->consumers = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->opcounter);
  p->opcounter = ((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->step_name);
  p->step_name = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->output_index);
  p->output_index = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->coder);
  p->coder = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->output_sampler);
  p->output_sampler = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->element_sampler);
  p->element_sampler = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->execution_context);
  p->execution_context = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_opcounter(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9opcounter_1__get__(o);
}

static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_step_name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9step_name_1__get__(o);
}

static int __pyx_setprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_step_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9step_name_3__set__(o, v);
  }
  else {
    return __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9step_name_5__del__(o);
  }
}

static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_output_index(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_12output_index_1__get__(o);
}

static int __pyx_setprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_output_index(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_12output_index_3__set__(o, v);
  }
  else {
    return __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_12output_index_5__del__(o);
  }
}

static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_coder(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5coder_1__get__(o);
}

static int __pyx_setprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_coder(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5coder_3__set__(o, v);
  }
  else {
    return __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5coder_5__del__(o);
  }
}

static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_output_sampler(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14output_sampler_1__get__(o);
}

static int __pyx_setprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_output_sampler(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14output_sampler_3__set__(o, v);
  }
  else {
    return __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14output_sampler_5__del__(o);
  }
}

static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_element_sampler(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15element_sampler_1__get__(o);
}

static int __pyx_setprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_element_sampler(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15element_sampler_3__set__(o, v);
  }
  else {
    return __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15element_sampler_5__del__(o);
  }
}

static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_execution_context(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17execution_context_1__get__(o);
}

static int __pyx_setprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_execution_context(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17execution_context_3__set__(o, v);
  }
  else {
    return __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17execution_context_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_11apache_beam_7runners_6worker_10operations_ConsumerSet[] = {
  {"create", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_1create, METH_VARARGS|METH_KEYWORDS, 0},
  {"try_split", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5try_split, METH_O, 0},
  {"current_element_progress", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_7current_element_progress, METH_NOARGS, __pyx_doc_11apache_beam_7runners_6worker_10operations_11ConsumerSet_6current_element_progress},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_19__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_11apache_beam_7runners_6worker_10operations_ConsumerSet[] = {
  {(char *)"opcounter", __pyx_getprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_opcounter, 0, (char *)0, 0},
  {(char *)"step_name", __pyx_getprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_step_name, __pyx_setprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_step_name, (char *)0, 0},
  {(char *)"output_index", __pyx_getprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_output_index, __pyx_setprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_output_index, (char *)0, 0},
  {(char *)"coder", __pyx_getprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_coder, __pyx_setprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_coder, (char *)0, 0},
  {(char *)"output_sampler", __pyx_getprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_output_sampler, __pyx_setprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_output_sampler, (char *)0, 0},
  {(char *)"element_sampler", __pyx_getprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_element_sampler, __pyx_setprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_element_sampler, (char *)0, 0},
  {(char *)"execution_context", __pyx_getprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_execution_context, __pyx_setprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_execution_context, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_7runners_6worker_10operations_ConsumerSet = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.runners.worker.operations.ConsumerSet", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_ConsumerSet, /*tp_dealloc*/
  #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
  __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "A ConsumerSet represents a graph edge between two Operation nodes.\n\n  The ConsumerSet object collects information from the output of the\n  Operation at one end of its edge and the input of the Operation at\n  the other edge.\n  ConsumerSet are attached to the outputting Operation.\n  ", /*tp_doc*/
  __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_ConsumerSet, /*tp_traverse*/
  __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_ConsumerSet, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_7runners_6worker_10operations_ConsumerSet, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_11apache_beam_7runners_6worker_10operations_ConsumerSet, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_7runners_6worker_10operations_ConsumerSet, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if 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_6worker_10operations_SingletonElementConsumerSet __pyx_vtable_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet;

static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *p;
  PyObject *o = __pyx_tp_new_11apache_beam_7runners_6worker_10operations_ConsumerSet(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_7runners_6common_Receiver*)__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet;
  p->consumer = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet(PyObject *o) {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(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->consumer);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_ConsumerSet(o);
}

static int __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *)o;
  e = __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_ConsumerSet(o, v, a); if (e) return e;
  if (p->consumer) {
    e = (*v)(((PyObject *)p->consumer), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *)o;
  __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_ConsumerSet(o);
  tmp = ((PyObject*)p->consumer);
  p->consumer = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet[] = {
  {"try_split", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_9try_split, METH_O, 0},
  {"current_element_progress", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_11current_element_progress, METH_NOARGS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_13__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_15__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.runners.worker.operations.SingletonElementConsumerSet", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet, /*tp_dealloc*/
  #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
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "ConsumerSet representing a single consumer that can only process elements\n  (not batches).", /*tp_doc*/
  __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet, /*tp_traverse*/
  __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if 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_6worker_10operations_GeneralPurposeConsumerSet __pyx_vtable_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet;

static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *p;
  PyObject *o = __pyx_tp_new_11apache_beam_7runners_6worker_10operations_ConsumerSet(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_7runners_6common_Receiver*)__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet;
  p->element_consumers = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->passthrough_batch_consumers = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->other_batch_consumers = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->_batched_elements = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->producer_batch_converter = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet(PyObject *o) {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(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->element_consumers);
  Py_CLEAR(p->passthrough_batch_consumers);
  Py_CLEAR(p->other_batch_consumers);
  Py_CLEAR(p->_batched_elements);
  Py_CLEAR(p->producer_batch_converter);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_ConsumerSet(o);
}

static int __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *)o;
  e = __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_ConsumerSet(o, v, a); if (e) return e;
  if (p->element_consumers) {
    e = (*v)(p->element_consumers, a); if (e) return e;
  }
  if (p->passthrough_batch_consumers) {
    e = (*v)(p->passthrough_batch_consumers, a); if (e) return e;
  }
  if (p->other_batch_consumers) {
    e = (*v)(p->other_batch_consumers, a); if (e) return e;
  }
  if (p->_batched_elements) {
    e = (*v)(p->_batched_elements, a); if (e) return e;
  }
  if (p->producer_batch_converter) {
    e = (*v)(p->producer_batch_converter, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *)o;
  __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_ConsumerSet(o);
  tmp = ((PyObject*)p->element_consumers);
  p->element_consumers = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->passthrough_batch_consumers);
  p->passthrough_batch_consumers = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->other_batch_consumers);
  p->other_batch_consumers = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_batched_elements);
  p->_batched_elements = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->producer_batch_converter);
  p->producer_batch_converter = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_9__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_11__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.runners.worker.operations.GeneralPurposeConsumerSet", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet, /*tp_dealloc*/
  #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
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "ConsumerSet implementation that handles all combinations of possible edges.\n  ", /*tp_doc*/
  __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet, /*tp_traverse*/
  __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if 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_6worker_10operations_Operation __pyx_vtable_11apache_beam_7runners_6worker_10operations_Operation;

static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_Operation(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *p;
  PyObject *o;
  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_6worker_10operations_Operation *)o);
  p->__pyx_vtab = __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_Operation;
  p->name_context = Py_None; Py_INCREF(Py_None);
  p->operation_name = Py_None; Py_INCREF(Py_None);
  p->spec = Py_None; Py_INCREF(Py_None);
  p->consumers = Py_None; Py_INCREF(Py_None);
  p->counter_factory = Py_None; Py_INCREF(Py_None);
  p->metrics_container = Py_None; Py_INCREF(Py_None);
  p->execution_context = Py_None; Py_INCREF(Py_None);
  p->receivers = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->step_name = Py_None; Py_INCREF(Py_None);
  p->state_sampler = Py_None; Py_INCREF(Py_None);
  p->scoped_start_state = Py_None; Py_INCREF(Py_None);
  p->scoped_process_state = Py_None; Py_INCREF(Py_None);
  p->scoped_finish_state = Py_None; Py_INCREF(Py_None);
  p->data_sampler = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_Operation(PyObject *o) {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(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->name_context);
  Py_CLEAR(p->operation_name);
  Py_CLEAR(p->spec);
  Py_CLEAR(p->consumers);
  Py_CLEAR(p->counter_factory);
  Py_CLEAR(p->metrics_container);
  Py_CLEAR(p->execution_context);
  Py_CLEAR(p->receivers);
  Py_CLEAR(p->step_name);
  Py_CLEAR(p->state_sampler);
  Py_CLEAR(p->scoped_start_state);
  Py_CLEAR(p->scoped_process_state);
  Py_CLEAR(p->scoped_finish_state);
  Py_CLEAR(p->data_sampler);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_Operation(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)o;
  if (p->name_context) {
    e = (*v)(p->name_context, a); if (e) return e;
  }
  if (p->operation_name) {
    e = (*v)(p->operation_name, a); if (e) return e;
  }
  if (p->spec) {
    e = (*v)(p->spec, a); if (e) return e;
  }
  if (p->consumers) {
    e = (*v)(p->consumers, a); if (e) return e;
  }
  if (p->counter_factory) {
    e = (*v)(p->counter_factory, a); if (e) return e;
  }
  if (p->metrics_container) {
    e = (*v)(p->metrics_container, a); if (e) return e;
  }
  if (p->execution_context) {
    e = (*v)(p->execution_context, a); if (e) return e;
  }
  if (p->receivers) {
    e = (*v)(p->receivers, a); if (e) return e;
  }
  if (p->step_name) {
    e = (*v)(p->step_name, a); if (e) return e;
  }
  if (p->state_sampler) {
    e = (*v)(p->state_sampler, a); if (e) return e;
  }
  if (p->scoped_start_state) {
    e = (*v)(p->scoped_start_state, a); if (e) return e;
  }
  if (p->scoped_process_state) {
    e = (*v)(p->scoped_process_state, a); if (e) return e;
  }
  if (p->scoped_finish_state) {
    e = (*v)(p->scoped_finish_state, a); if (e) return e;
  }
  if (p->data_sampler) {
    e = (*v)(p->data_sampler, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_Operation(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)o;
  tmp = ((PyObject*)p->name_context);
  p->name_context = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->operation_name);
  p->operation_name = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->spec);
  p->spec = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->consumers);
  p->consumers = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->counter_factory);
  p->counter_factory = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->metrics_container);
  p->metrics_container = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->execution_context);
  p->execution_context = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->receivers);
  p->receivers = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->step_name);
  p->step_name = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->state_sampler);
  p->state_sampler = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->scoped_start_state);
  p->scoped_start_state = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->scoped_process_state);
  p->scoped_process_state = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->scoped_finish_state);
  p->scoped_finish_state = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->data_sampler);
  p->data_sampler = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_name_context(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_12name_context_1__get__(o);
}

static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_operation_name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_14operation_name_1__get__(o);
}

static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_spec(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_4spec_1__get__(o);
}

static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_counter_factory(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_15counter_factory_1__get__(o);
}

static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_metrics_container(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17metrics_container_1__get__(o);
}

static int __pyx_setprop_11apache_beam_7runners_6worker_10operations_9Operation_metrics_container(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17metrics_container_3__set__(o, v);
  }
  else {
    return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17metrics_container_5__del__(o);
  }
}

static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_execution_context(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17execution_context_1__get__(o);
}

static int __pyx_setprop_11apache_beam_7runners_6worker_10operations_9Operation_execution_context(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17execution_context_3__set__(o, v);
  }
  else {
    return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17execution_context_5__del__(o);
  }
}

static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_receivers(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9receivers_1__get__(o);
}

static int __pyx_setprop_11apache_beam_7runners_6worker_10operations_9Operation_receivers(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9receivers_3__set__(o, v);
  }
  else {
    return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9receivers_5__del__(o);
  }
}

static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_debug_logging_enabled(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_21debug_logging_enabled_1__get__(o);
}

static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_step_name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9step_name_1__get__(o);
}

static int __pyx_setprop_11apache_beam_7runners_6worker_10operations_9Operation_step_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9step_name_3__set__(o, v);
  }
  else {
    return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9step_name_5__del__(o);
  }
}

static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_state_sampler(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_13state_sampler_1__get__(o);
}

static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_scoped_start_state(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_18scoped_start_state_1__get__(o);
}

static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_scoped_process_state(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_20scoped_process_state_1__get__(o);
}

static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_scoped_finish_state(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_19scoped_finish_state_1__get__(o);
}

static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_data_sampler(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_12data_sampler_1__get__(o);
}

static PyMethodDef __pyx_methods_11apache_beam_7runners_6worker_10operations_Operation[] = {
  {"setup", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_3setup, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_2setup},
  {"get_batching_preference", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_7get_batching_preference, METH_NOARGS, 0},
  {"get_input_batch_converter", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9get_input_batch_converter, METH_NOARGS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_8get_input_batch_converter},
  {"get_output_batch_converter", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_11get_output_batch_converter, METH_NOARGS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_10get_output_batch_converter},
  {"process_batch", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_15process_batch, METH_O, 0},
  {"finalize_bundle", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17finalize_bundle, METH_NOARGS, 0},
  {"needs_finalization", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_19needs_finalization, METH_NOARGS, 0},
  {"try_split", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_21try_split, METH_O, 0},
  {"current_element_progress", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_23current_element_progress, METH_NOARGS, 0},
  {"reset", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_29reset, METH_NOARGS, 0},
  {"add_receiver", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_33add_receiver, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_32add_receiver},
  {"str_internal", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_45str_internal, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_44str_internal},
  {"_get_runtime_performance_hints", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_47_get_runtime_performance_hints, METH_NOARGS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_46_get_runtime_performance_hints},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_49__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_51__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_11apache_beam_7runners_6worker_10operations_Operation[] = {
  {(char *)"name_context", __pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_name_context, 0, (char *)0, 0},
  {(char *)"operation_name", __pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_operation_name, 0, (char *)0, 0},
  {(char *)"spec", __pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_spec, 0, (char *)0, 0},
  {(char *)"counter_factory", __pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_counter_factory, 0, (char *)0, 0},
  {(char *)"metrics_container", __pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_metrics_container, __pyx_setprop_11apache_beam_7runners_6worker_10operations_9Operation_metrics_container, (char *)0, 0},
  {(char *)"execution_context", __pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_execution_context, __pyx_setprop_11apache_beam_7runners_6worker_10operations_9Operation_execution_context, (char *)0, 0},
  {(char *)"receivers", __pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_receivers, __pyx_setprop_11apache_beam_7runners_6worker_10operations_9Operation_receivers, (char *)0, 0},
  {(char *)"debug_logging_enabled", __pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_debug_logging_enabled, 0, (char *)0, 0},
  {(char *)"step_name", __pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_step_name, __pyx_setprop_11apache_beam_7runners_6worker_10operations_9Operation_step_name, (char *)0, 0},
  {(char *)"state_sampler", __pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_state_sampler, 0, (char *)0, 0},
  {(char *)"scoped_start_state", __pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_scoped_start_state, 0, (char *)0, 0},
  {(char *)"scoped_process_state", __pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_scoped_process_state, 0, (char *)0, 0},
  {(char *)"scoped_finish_state", __pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_scoped_finish_state, 0, (char *)0, 0},
  {(char *)"data_sampler", __pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_data_sampler, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_7runners_6worker_10operations_Operation = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.runners.worker.operations.Operation", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_Operation, /*tp_dealloc*/
  #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*/
  __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_43__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "An operation representing the live version of a work item specification.\n\n  An operation can have one or more outputs and for each output it can have\n  one or more receiver operations that will take that as input.\n  ", /*tp_doc*/
  __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_Operation, /*tp_traverse*/
  __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_Operation, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_7runners_6worker_10operations_Operation, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_11apache_beam_7runners_6worker_10operations_Operation, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_7runners_6worker_10operations_Operation, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if 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_6worker_10operations_ReadOperation __pyx_vtable_11apache_beam_7runners_6worker_10operations_ReadOperation;

static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_ReadOperation(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation *p;
  PyObject *o = __pyx_tp_new_11apache_beam_7runners_6worker_10operations_Operation(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation*)__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_ReadOperation;
  return o;
}

static PyMethodDef __pyx_methods_11apache_beam_7runners_6worker_10operations_ReadOperation[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_13ReadOperation_3__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_13ReadOperation_5__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_7runners_6worker_10operations_ReadOperation = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.runners.worker.operations.ReadOperation", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_Operation, /*tp_dealloc*/
  #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*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_43__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_Operation, /*tp_traverse*/
  __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_Operation, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_7runners_6worker_10operations_ReadOperation, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_7runners_6worker_10operations_ReadOperation, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if 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_6worker_10operations_ImpulseReadOperation __pyx_vtable_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation;

static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *p;
  PyObject *o = __pyx_tp_new_11apache_beam_7runners_6worker_10operations_Operation(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation*)__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation;
  p->source = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation(PyObject *o) {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(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->source);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_Operation(o);
}

static int __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *)o;
  e = __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_Operation(o, v, a); if (e) return e;
  if (p->source) {
    e = (*v)(p->source, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *)o;
  __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_Operation(o);
  tmp = ((PyObject*)p->source);
  p->source = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.runners.worker.operations.ImpulseReadOperation", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation, /*tp_dealloc*/
  #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*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_43__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation, /*tp_traverse*/
  __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if 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_6worker_10operations_DoOperation __pyx_vtable_11apache_beam_7runners_6worker_10operations_DoOperation;

static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_DoOperation(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *p;
  PyObject *o = __pyx_tp_new_11apache_beam_7runners_6worker_10operations_Operation(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation*)__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_DoOperation;
  p->dofn_runner = ((struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *)Py_None); Py_INCREF(Py_None);
  p->tagged_receivers = Py_None; Py_INCREF(Py_None);
  p->side_input_maps = Py_None; Py_INCREF(Py_None);
  p->user_state_context = Py_None; Py_INCREF(Py_None);
  p->timer_inputs = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->timer_specs = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->input_info = Py_None; Py_INCREF(Py_None);
  p->fn = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_DoOperation(PyObject *o) {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(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->dofn_runner);
  Py_CLEAR(p->tagged_receivers);
  Py_CLEAR(p->side_input_maps);
  Py_CLEAR(p->user_state_context);
  Py_CLEAR(p->timer_inputs);
  Py_CLEAR(p->timer_specs);
  Py_CLEAR(p->input_info);
  Py_CLEAR(p->fn);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_Operation(o);
}

static int __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_DoOperation(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)o;
  e = __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_Operation(o, v, a); if (e) return e;
  if (p->dofn_runner) {
    e = (*v)(((PyObject *)p->dofn_runner), a); if (e) return e;
  }
  if (p->tagged_receivers) {
    e = (*v)(p->tagged_receivers, a); if (e) return e;
  }
  if (p->side_input_maps) {
    e = (*v)(p->side_input_maps, a); if (e) return e;
  }
  if (p->user_state_context) {
    e = (*v)(p->user_state_context, a); if (e) return e;
  }
  if (p->timer_inputs) {
    e = (*v)(p->timer_inputs, a); if (e) return e;
  }
  if (p->timer_specs) {
    e = (*v)(p->timer_specs, a); if (e) return e;
  }
  if (p->input_info) {
    e = (*v)(p->input_info, a); if (e) return e;
  }
  if (p->fn) {
    e = (*v)(p->fn, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_DoOperation(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)o;
  __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_Operation(o);
  tmp = ((PyObject*)p->dofn_runner);
  p->dofn_runner = ((struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->tagged_receivers);
  p->tagged_receivers = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->side_input_maps);
  p->side_input_maps = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->user_state_context);
  p->user_state_context = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->timer_inputs);
  p->timer_inputs = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->timer_specs);
  p->timer_specs = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->input_info);
  p->input_info = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->fn);
  p->fn = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_11DoOperation_timer_inputs(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_12timer_inputs_1__get__(o);
}

static int __pyx_setprop_11apache_beam_7runners_6worker_10operations_11DoOperation_timer_inputs(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_12timer_inputs_3__set__(o, v);
  }
  else {
    return __pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_12timer_inputs_5__del__(o);
  }
}

static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_11DoOperation_input_info(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_10input_info_1__get__(o);
}

static int __pyx_setprop_11apache_beam_7runners_6worker_10operations_11DoOperation_input_info(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_10input_info_3__set__(o, v);
  }
  else {
    return __pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_10input_info_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_11apache_beam_7runners_6worker_10operations_DoOperation[] = {
  {"_read_side_inputs", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_3_read_side_inputs, METH_O, __pyx_doc_11apache_beam_7runners_6worker_10operations_11DoOperation_2_read_side_inputs},
  {"setup", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_6setup, METH_VARARGS|METH_KEYWORDS, 0},
  {"get_batching_preference", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_10get_batching_preference, METH_NOARGS, 0},
  {"get_input_batch_converter", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_12get_input_batch_converter, METH_NOARGS, 0},
  {"get_output_batch_converter", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_14get_output_batch_converter, METH_NOARGS, 0},
  {"process_batch", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_18process_batch, METH_O, 0},
  {"finalize_bundle", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_20finalize_bundle, METH_NOARGS, 0},
  {"needs_finalization", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_22needs_finalization, METH_NOARGS, 0},
  {"add_timer_info", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_24add_timer_info, METH_VARARGS|METH_KEYWORDS, 0},
  {"process_timer", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_26process_timer, METH_VARARGS|METH_KEYWORDS, 0},
  {"reset", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_32reset, METH_NOARGS, 0},
  {"_get_runtime_performance_hints", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_36_get_runtime_performance_hints, METH_NOARGS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_38__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_40__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_11apache_beam_7runners_6worker_10operations_DoOperation[] = {
  {(char *)"timer_inputs", __pyx_getprop_11apache_beam_7runners_6worker_10operations_11DoOperation_timer_inputs, __pyx_setprop_11apache_beam_7runners_6worker_10operations_11DoOperation_timer_inputs, (char *)0, 0},
  {(char *)"input_info", __pyx_getprop_11apache_beam_7runners_6worker_10operations_11DoOperation_input_info, __pyx_setprop_11apache_beam_7runners_6worker_10operations_11DoOperation_input_info, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_7runners_6worker_10operations_DoOperation = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.runners.worker.operations.DoOperation", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_DoOperation, /*tp_dealloc*/
  #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*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_43__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "A Do operation that will execute a custom DoFn for each input element.", /*tp_doc*/
  __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_DoOperation, /*tp_traverse*/
  __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_DoOperation, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_7runners_6worker_10operations_DoOperation, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_11apache_beam_7runners_6worker_10operations_DoOperation, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_7runners_6worker_10operations_DoOperation, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if 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_6worker_10operations_SdfProcessSizedElements __pyx_vtable_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements;

static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *p;
  PyObject *o = __pyx_tp_new_11apache_beam_7runners_6worker_10operations_DoOperation(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation*)__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements;
  p->lock = Py_None; Py_INCREF(Py_None);
  p->element_start_output_bytes = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements(PyObject *o) {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(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->lock);
  Py_CLEAR(p->element_start_output_bytes);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_DoOperation(o);
}

static int __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *)o;
  e = __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_DoOperation(o, v, a); if (e) return e;
  if (p->lock) {
    e = (*v)(p->lock, a); if (e) return e;
  }
  if (p->element_start_output_bytes) {
    e = (*v)(p->element_start_output_bytes, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *)o;
  __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_DoOperation(o);
  tmp = ((PyObject*)p->lock);
  p->lock = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->element_start_output_bytes);
  p->element_start_output_bytes = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements[] = {
  {"try_split", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_5try_split, METH_O, 0},
  {"current_element_progress", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_7current_element_progress, METH_NOARGS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_11__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_13__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.runners.worker.operations.SdfProcessSizedElements", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements, /*tp_dealloc*/
  #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*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_43__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements, /*tp_traverse*/
  __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if 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_6worker_10operations_SdfTruncateSizedRestrictions __pyx_vtable_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions;

static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *p;
  PyObject *o = __pyx_tp_new_11apache_beam_7runners_6worker_10operations_DoOperation(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation*)__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions;
  return o;
}

static PyMethodDef __pyx_methods_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions[] = {
  {"current_element_progress", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_3current_element_progress, METH_NOARGS, 0},
  {"try_split", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_5try_split, METH_O, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_7__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_9__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.runners.worker.operations.SdfTruncateSizedRestrictions", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_DoOperation, /*tp_dealloc*/
  #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*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_43__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_DoOperation, /*tp_traverse*/
  __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_DoOperation, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if 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_6worker_10operations_CombineOperation __pyx_vtable_11apache_beam_7runners_6worker_10operations_CombineOperation;

static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_CombineOperation(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *p;
  PyObject *o = __pyx_tp_new_11apache_beam_7runners_6worker_10operations_Operation(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation*)__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_CombineOperation;
  p->phased_combine_fn = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_CombineOperation(PyObject *o) {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(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->phased_combine_fn);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_Operation(o);
}

static int __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_CombineOperation(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *)o;
  e = __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_Operation(o, v, a); if (e) return e;
  if (p->phased_combine_fn) {
    e = (*v)(p->phased_combine_fn, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_CombineOperation(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *)o;
  __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_Operation(o);
  tmp = ((PyObject*)p->phased_combine_fn);
  p->phased_combine_fn = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_11apache_beam_7runners_6worker_10operations_CombineOperation[] = {
  {"setup", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_3setup, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_11__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_13__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_7runners_6worker_10operations_CombineOperation = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.runners.worker.operations.CombineOperation", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_CombineOperation, /*tp_dealloc*/
  #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*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_43__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "A Combine operation executing a CombineFn for each input element.", /*tp_doc*/
  __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_CombineOperation, /*tp_traverse*/
  __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_CombineOperation, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_7runners_6worker_10operations_CombineOperation, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_7runners_6worker_10operations_CombineOperation, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if 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_6worker_10operations_PGBKCVOperation __pyx_vtable_11apache_beam_7runners_6worker_10operations_PGBKCVOperation;

static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_PGBKCVOperation(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *p;
  PyObject *o = __pyx_tp_new_11apache_beam_7runners_6worker_10operations_Operation(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation*)__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_PGBKCVOperation;
  p->combine_fn = Py_None; Py_INCREF(Py_None);
  p->combine_fn_add_input = Py_None; Py_INCREF(Py_None);
  p->combine_fn_compact = Py_None; Py_INCREF(Py_None);
  p->timestamp_combiner = Py_None; Py_INCREF(Py_None);
  p->table = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_PGBKCVOperation(PyObject *o) {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(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->combine_fn);
  Py_CLEAR(p->combine_fn_add_input);
  Py_CLEAR(p->combine_fn_compact);
  Py_CLEAR(p->timestamp_combiner);
  Py_CLEAR(p->table);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_Operation(o);
}

static int __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_PGBKCVOperation(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)o;
  e = __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_Operation(o, v, a); if (e) return e;
  if (p->combine_fn) {
    e = (*v)(p->combine_fn, a); if (e) return e;
  }
  if (p->combine_fn_add_input) {
    e = (*v)(p->combine_fn_add_input, a); if (e) return e;
  }
  if (p->combine_fn_compact) {
    e = (*v)(p->combine_fn_compact, a); if (e) return e;
  }
  if (p->timestamp_combiner) {
    e = (*v)(p->timestamp_combiner, a); if (e) return e;
  }
  if (p->table) {
    e = (*v)(p->table, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_PGBKCVOperation(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)o;
  __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_Operation(o);
  tmp = ((PyObject*)p->combine_fn);
  p->combine_fn = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->combine_fn_add_input);
  p->combine_fn_add_input = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->combine_fn_compact);
  p->combine_fn_compact = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->timestamp_combiner);
  p->timestamp_combiner = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->table);
  p->table = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_combine_fn(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10combine_fn_1__get__(o);
}

static int __pyx_setprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_combine_fn(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10combine_fn_3__set__(o, v);
  }
  else {
    return __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10combine_fn_5__del__(o);
  }
}

static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_combine_fn_add_input(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20combine_fn_add_input_1__get__(o);
}

static int __pyx_setprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_combine_fn_add_input(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20combine_fn_add_input_3__set__(o, v);
  }
  else {
    return __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20combine_fn_add_input_5__del__(o);
  }
}

static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_combine_fn_compact(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18combine_fn_compact_1__get__(o);
}

static int __pyx_setprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_combine_fn_compact(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18combine_fn_compact_3__set__(o, v);
  }
  else {
    return __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18combine_fn_compact_5__del__(o);
  }
}

static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_is_default_windowing(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20is_default_windowing_1__get__(o);
}

static int __pyx_setprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_is_default_windowing(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20is_default_windowing_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_timestamp_combiner(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18timestamp_combiner_1__get__(o);
}

static int __pyx_setprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_timestamp_combiner(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18timestamp_combiner_3__set__(o, v);
  }
  else {
    return __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18timestamp_combiner_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_11apache_beam_7runners_6worker_10operations_PGBKCVOperation[] = {
  {"setup", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_3setup, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_13__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_15__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_11apache_beam_7runners_6worker_10operations_PGBKCVOperation[] = {
  {(char *)"combine_fn", __pyx_getprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_combine_fn, __pyx_setprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_combine_fn, (char *)0, 0},
  {(char *)"combine_fn_add_input", __pyx_getprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_combine_fn_add_input, __pyx_setprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_combine_fn_add_input, (char *)0, 0},
  {(char *)"combine_fn_compact", __pyx_getprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_combine_fn_compact, __pyx_setprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_combine_fn_compact, (char *)0, 0},
  {(char *)"is_default_windowing", __pyx_getprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_is_default_windowing, __pyx_setprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_is_default_windowing, (char *)0, 0},
  {(char *)"timestamp_combiner", __pyx_getprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_timestamp_combiner, __pyx_setprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_timestamp_combiner, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_7runners_6worker_10operations_PGBKCVOperation = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.runners.worker.operations.PGBKCVOperation", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_PGBKCVOperation, /*tp_dealloc*/
  #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*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_43__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_PGBKCVOperation, /*tp_traverse*/
  __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_PGBKCVOperation, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_7runners_6worker_10operations_PGBKCVOperation, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_11apache_beam_7runners_6worker_10operations_PGBKCVOperation, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_7runners_6worker_10operations_PGBKCVOperation, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if 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_6worker_10operations_FlattenOperation __pyx_vtable_11apache_beam_7runners_6worker_10operations_FlattenOperation;

static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_FlattenOperation(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_FlattenOperation *p;
  PyObject *o = __pyx_tp_new_11apache_beam_7runners_6worker_10operations_Operation(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_FlattenOperation *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation*)__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_FlattenOperation;
  return o;
}

static PyMethodDef __pyx_methods_11apache_beam_7runners_6worker_10operations_FlattenOperation[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_16FlattenOperation_3__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_16FlattenOperation_5__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_7runners_6worker_10operations_FlattenOperation = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.runners.worker.operations.FlattenOperation", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_FlattenOperation), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_Operation, /*tp_dealloc*/
  #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*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_43__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "Flatten operation.\n\n  Receives one or more producer operations, outputs just one list\n  with all the items.\n  ", /*tp_doc*/
  __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_Operation, /*tp_traverse*/
  __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_Operation, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_7runners_6worker_10operations_FlattenOperation, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_7runners_6worker_10operations_FlattenOperation, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if 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_6worker_10operations___pyx_scope_struct__setup *__pyx_freelist_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup[8];
static int __pyx_freecount_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup = 0;

static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup)))) {
    o = (PyObject*)__pyx_freelist_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup[--__pyx_freecount_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup];
    memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup));
    (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_6worker_10operations___pyx_scope_struct__setup(PyObject *o) {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_data_sampler);
  Py_CLEAR(p->__pyx_v_transform_id);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup)))) {
    __pyx_freelist_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup[__pyx_freecount_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup++] = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup *)o;
  if (p->__pyx_v_data_sampler) {
    e = (*v)(p->__pyx_v_data_sampler, a); if (e) return e;
  }
  if (p->__pyx_v_transform_id) {
    e = (*v)(p->__pyx_v_transform_id, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup *)o;
  tmp = ((PyObject*)p->__pyx_v_data_sampler);
  p->__pyx_v_data_sampler = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_transform_id);
  p->__pyx_v_transform_id = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.runners.worker.operations.__pyx_scope_struct__setup", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup, /*tp_dealloc*/
  #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_6worker_10operations___pyx_scope_struct__setup, /*tp_traverse*/
  __pyx_tp_clear_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if 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_6worker_10operations___pyx_scope_struct_1__read_side_inputs *__pyx_freelist_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs[8];
static int __pyx_freecount_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs = 0;

static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs)))) {
    o = (PyObject*)__pyx_freelist_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs[--__pyx_freecount_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs];
    memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs));
    (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_6worker_10operations___pyx_scope_struct_1__read_side_inputs(PyObject *o) {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_element_counter);
  Py_CLEAR(p->__pyx_v_i);
  Py_CLEAR(p->__pyx_v_iterator_fn);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_si);
  Py_CLEAR(p->__pyx_v_si_counter);
  Py_CLEAR(p->__pyx_v_side_tag);
  Py_CLEAR(p->__pyx_v_sources);
  Py_CLEAR(p->__pyx_v_tags_and_types);
  Py_CLEAR(p->__pyx_v_view_class);
  Py_CLEAR(p->__pyx_v_view_options);
  Py_CLEAR(p->__pyx_t_0);
  Py_CLEAR(p->__pyx_t_1);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs)))) {
    __pyx_freelist_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs[__pyx_freecount_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs++] = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs *)o;
  if (p->__pyx_v_element_counter) {
    e = (*v)(p->__pyx_v_element_counter, a); if (e) return e;
  }
  if (p->__pyx_v_i) {
    e = (*v)(p->__pyx_v_i, a); if (e) return e;
  }
  if (p->__pyx_v_iterator_fn) {
    e = (*v)(p->__pyx_v_iterator_fn, a); if (e) return e;
  }
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  if (p->__pyx_v_si) {
    e = (*v)(p->__pyx_v_si, a); if (e) return e;
  }
  if (p->__pyx_v_si_counter) {
    e = (*v)(p->__pyx_v_si_counter, a); if (e) return e;
  }
  if (p->__pyx_v_side_tag) {
    e = (*v)(p->__pyx_v_side_tag, a); if (e) return e;
  }
  if (p->__pyx_v_sources) {
    e = (*v)(p->__pyx_v_sources, a); if (e) return e;
  }
  if (p->__pyx_v_tags_and_types) {
    e = (*v)(p->__pyx_v_tags_and_types, a); if (e) return e;
  }
  if (p->__pyx_v_view_class) {
    e = (*v)(p->__pyx_v_view_class, a); if (e) return e;
  }
  if (p->__pyx_v_view_options) {
    e = (*v)(p->__pyx_v_view_options, a); if (e) return e;
  }
  if (p->__pyx_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  if (p->__pyx_t_1) {
    e = (*v)(p->__pyx_t_1, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.runners.worker.operations.__pyx_scope_struct_1__read_side_inputs", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs, /*tp_dealloc*/
  #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_6worker_10operations___pyx_scope_struct_1__read_side_inputs, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if 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_operations(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_operations},
  {0, NULL}
};
#endif

static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    "operations",
    __pyx_k_Worker_operations_executor, /* 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_kp_s_A_write_operation_that_will_writ, __pyx_k_A_write_operation_that_will_writ, sizeof(__pyx_k_A_write_operation_that_will_writ), 0, 0, 1, 0},
  {&__pyx_kp_s_An_executor_for_map_tasks_Stores, __pyx_k_An_executor_for_map_tasks_Stores, sizeof(__pyx_k_An_executor_for_map_tasks_Stores), 0, 0, 1, 0},
  {&__pyx_n_s_Any, __pyx_k_Any, sizeof(__pyx_k_Any), 0, 0, 1, 1},
  {&__pyx_n_s_AssertionError, __pyx_k_AssertionError, sizeof(__pyx_k_AssertionError), 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_n_s_BatchConverter, __pyx_k_BatchConverter, sizeof(__pyx_k_BatchConverter), 0, 0, 1, 1},
  {&__pyx_n_s_BatchGroupAlsoByWindowsOperation, __pyx_k_BatchGroupAlsoByWindowsOperation, sizeof(__pyx_k_BatchGroupAlsoByWindowsOperation), 0, 0, 1, 1},
  {&__pyx_n_s_BatchingPreference, __pyx_k_BatchingPreference, sizeof(__pyx_k_BatchingPreference), 0, 0, 1, 1},
  {&__pyx_n_s_CallableWrapperCombineFn, __pyx_k_CallableWrapperCombineFn, sizeof(__pyx_k_CallableWrapperCombineFn), 0, 0, 1, 1},
  {&__pyx_n_s_CombineFn, __pyx_k_CombineFn, sizeof(__pyx_k_CombineFn), 0, 0, 1, 1},
  {&__pyx_n_s_CombineOperation, __pyx_k_CombineOperation, sizeof(__pyx_k_CombineOperation), 0, 0, 1, 1},
  {&__pyx_n_s_CombineOperation___reduce_cython, __pyx_k_CombineOperation___reduce_cython, sizeof(__pyx_k_CombineOperation___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CombineOperation___setstate_cyth, __pyx_k_CombineOperation___setstate_cyth, sizeof(__pyx_k_CombineOperation___setstate_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_CombineOperation_finish, __pyx_k_CombineOperation_finish, sizeof(__pyx_k_CombineOperation_finish), 0, 0, 1, 1},
  {&__pyx_n_s_CombineOperation_process, __pyx_k_CombineOperation_process, sizeof(__pyx_k_CombineOperation_process), 0, 0, 1, 1},
  {&__pyx_n_s_CombineOperation_setup, __pyx_k_CombineOperation_setup, sizeof(__pyx_k_CombineOperation_setup), 0, 0, 1, 1},
  {&__pyx_n_s_CombineOperation_teardown, __pyx_k_CombineOperation_teardown, sizeof(__pyx_k_CombineOperation_teardown), 0, 0, 1, 1},
  {&__pyx_n_s_ConsumerSet, __pyx_k_ConsumerSet, sizeof(__pyx_k_ConsumerSet), 0, 0, 1, 1},
  {&__pyx_n_s_ConsumerSet___reduce_cython, __pyx_k_ConsumerSet___reduce_cython, sizeof(__pyx_k_ConsumerSet___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_ConsumerSet___setstate_cython, __pyx_k_ConsumerSet___setstate_cython, sizeof(__pyx_k_ConsumerSet___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_ConsumerSet_create, __pyx_k_ConsumerSet_create, sizeof(__pyx_k_ConsumerSet_create), 0, 0, 1, 1},
  {&__pyx_n_s_ConsumerSet_current_element_prog, __pyx_k_ConsumerSet_current_element_prog, sizeof(__pyx_k_ConsumerSet_current_element_prog), 0, 0, 1, 1},
  {&__pyx_n_s_ConsumerSet_try_split, __pyx_k_ConsumerSet_try_split, sizeof(__pyx_k_ConsumerSet_try_split), 0, 0, 1, 1},
  {&__pyx_n_s_ConsumerSet_update_counters_batc, __pyx_k_ConsumerSet_update_counters_batc, sizeof(__pyx_k_ConsumerSet_update_counters_batc), 0, 0, 1, 1},
  {&__pyx_n_s_ConsumerSet_update_counters_fini, __pyx_k_ConsumerSet_update_counters_fini, sizeof(__pyx_k_ConsumerSet_update_counters_fini), 0, 0, 1, 1},
  {&__pyx_n_s_ConsumerSet_update_counters_star, __pyx_k_ConsumerSet_update_counters_star, sizeof(__pyx_k_ConsumerSet_update_counters_star), 0, 0, 1, 1},
  {&__pyx_n_s_CountCombineFn, __pyx_k_CountCombineFn, sizeof(__pyx_k_CountCombineFn), 0, 0, 1, 1},
  {&__pyx_n_s_DEBUG, __pyx_k_DEBUG, sizeof(__pyx_k_DEBUG), 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_DataSampler, __pyx_k_DataSampler, sizeof(__pyx_k_DataSampler), 0, 0, 1, 1},
  {&__pyx_n_s_DefaultDict, __pyx_k_DefaultDict, sizeof(__pyx_k_DefaultDict), 0, 0, 1, 1},
  {&__pyx_n_s_Dict, __pyx_k_Dict, sizeof(__pyx_k_Dict), 0, 0, 1, 1},
  {&__pyx_n_s_DistributionData, __pyx_k_DistributionData, sizeof(__pyx_k_DistributionData), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnRunner, __pyx_k_DoFnRunner, sizeof(__pyx_k_DoFnRunner), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnState, __pyx_k_DoFnState, sizeof(__pyx_k_DoFnState), 0, 0, 1, 1},
  {&__pyx_n_s_DoOperation, __pyx_k_DoOperation, sizeof(__pyx_k_DoOperation), 0, 0, 1, 1},
  {&__pyx_n_u_DoOperation, __pyx_k_DoOperation, sizeof(__pyx_k_DoOperation), 0, 1, 0, 1},
  {&__pyx_n_s_DoOperation___reduce_cython, __pyx_k_DoOperation___reduce_cython, sizeof(__pyx_k_DoOperation___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_DoOperation___setstate_cython, __pyx_k_DoOperation___setstate_cython, sizeof(__pyx_k_DoOperation___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_DoOperation__get_runtime_perform, __pyx_k_DoOperation__get_runtime_perform, sizeof(__pyx_k_DoOperation__get_runtime_perform), 0, 0, 1, 1},
  {&__pyx_n_s_DoOperation__read_side_inputs, __pyx_k_DoOperation__read_side_inputs, sizeof(__pyx_k_DoOperation__read_side_inputs), 0, 0, 1, 1},
  {&__pyx_n_s_DoOperation_add_timer_info, __pyx_k_DoOperation_add_timer_info, sizeof(__pyx_k_DoOperation_add_timer_info), 0, 0, 1, 1},
  {&__pyx_n_s_DoOperation_finalize_bundle, __pyx_k_DoOperation_finalize_bundle, sizeof(__pyx_k_DoOperation_finalize_bundle), 0, 0, 1, 1},
  {&__pyx_n_s_DoOperation_finish, __pyx_k_DoOperation_finish, sizeof(__pyx_k_DoOperation_finish), 0, 0, 1, 1},
  {&__pyx_n_s_DoOperation_get_batching_prefere, __pyx_k_DoOperation_get_batching_prefere, sizeof(__pyx_k_DoOperation_get_batching_prefere), 0, 0, 1, 1},
  {&__pyx_n_s_DoOperation_get_input_batch_conv, __pyx_k_DoOperation_get_input_batch_conv, sizeof(__pyx_k_DoOperation_get_input_batch_conv), 0, 0, 1, 1},
  {&__pyx_n_s_DoOperation_get_output_batch_con, __pyx_k_DoOperation_get_output_batch_con, sizeof(__pyx_k_DoOperation_get_output_batch_con), 0, 0, 1, 1},
  {&__pyx_n_s_DoOperation_needs_finalization, __pyx_k_DoOperation_needs_finalization, sizeof(__pyx_k_DoOperation_needs_finalization), 0, 0, 1, 1},
  {&__pyx_n_s_DoOperation_pcollection_count_mo, __pyx_k_DoOperation_pcollection_count_mo, sizeof(__pyx_k_DoOperation_pcollection_count_mo), 0, 0, 1, 1},
  {&__pyx_n_s_DoOperation_process, __pyx_k_DoOperation_process, sizeof(__pyx_k_DoOperation_process), 0, 0, 1, 1},
  {&__pyx_n_s_DoOperation_process_batch, __pyx_k_DoOperation_process_batch, sizeof(__pyx_k_DoOperation_process_batch), 0, 0, 1, 1},
  {&__pyx_n_s_DoOperation_process_timer, __pyx_k_DoOperation_process_timer, sizeof(__pyx_k_DoOperation_process_timer), 0, 0, 1, 1},
  {&__pyx_n_s_DoOperation_reset, __pyx_k_DoOperation_reset, sizeof(__pyx_k_DoOperation_reset), 0, 0, 1, 1},
  {&__pyx_n_s_DoOperation_setup, __pyx_k_DoOperation_setup, sizeof(__pyx_k_DoOperation_setup), 0, 0, 1, 1},
  {&__pyx_n_s_DoOperation_start, __pyx_k_DoOperation_start, sizeof(__pyx_k_DoOperation_start), 0, 0, 1, 1},
  {&__pyx_n_s_DoOperation_teardown, __pyx_k_DoOperation_teardown, sizeof(__pyx_k_DoOperation_teardown), 0, 0, 1, 1},
  {&__pyx_n_s_ELEMENT_COUNT_URN, __pyx_k_ELEMENT_COUNT_URN, sizeof(__pyx_k_ELEMENT_COUNT_URN), 0, 0, 1, 1},
  {&__pyx_n_s_EmulatedIterable, __pyx_k_EmulatedIterable, sizeof(__pyx_k_EmulatedIterable), 0, 0, 1, 1},
  {&__pyx_n_s_ExecutionContext, __pyx_k_ExecutionContext, sizeof(__pyx_k_ExecutionContext), 0, 0, 1, 1},
  {&__pyx_kp_u_Expected_an_instance_of_operatio, __pyx_k_Expected_an_instance_of_operatio, sizeof(__pyx_k_Expected_an_instance_of_operatio), 0, 1, 0, 0},
  {&__pyx_n_s_FINISH_BUNDLE_MSECS_URN, __pyx_k_FINISH_BUNDLE_MSECS_URN, sizeof(__pyx_k_FINISH_BUNDLE_MSECS_URN), 0, 0, 1, 1},
  {&__pyx_kp_u_Finishing_s, __pyx_k_Finishing_s, sizeof(__pyx_k_Finishing_s), 0, 1, 0, 0},
  {&__pyx_n_s_FlattenOperation, __pyx_k_FlattenOperation, sizeof(__pyx_k_FlattenOperation), 0, 0, 1, 1},
  {&__pyx_n_s_FlattenOperation___reduce_cython, __pyx_k_FlattenOperation___reduce_cython, sizeof(__pyx_k_FlattenOperation___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_FlattenOperation___setstate_cyth, __pyx_k_FlattenOperation___setstate_cyth, sizeof(__pyx_k_FlattenOperation___setstate_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_FlattenOperation_process, __pyx_k_FlattenOperation_process, sizeof(__pyx_k_FlattenOperation_process), 0, 0, 1, 1},
  {&__pyx_n_s_FloatCoder, __pyx_k_FloatCoder, sizeof(__pyx_k_FloatCoder), 0, 0, 1, 1},
  {&__pyx_n_s_FrozenSet, __pyx_k_FrozenSet, sizeof(__pyx_k_FrozenSet), 0, 0, 1, 1},
  {&__pyx_n_s_GeneralPurposeConsumerSet, __pyx_k_GeneralPurposeConsumerSet, sizeof(__pyx_k_GeneralPurposeConsumerSet), 0, 0, 1, 1},
  {&__pyx_n_s_GeneralPurposeConsumerSet___redu, __pyx_k_GeneralPurposeConsumerSet___redu, sizeof(__pyx_k_GeneralPurposeConsumerSet___redu), 0, 0, 1, 1},
  {&__pyx_n_s_GeneralPurposeConsumerSet___sets, __pyx_k_GeneralPurposeConsumerSet___sets, sizeof(__pyx_k_GeneralPurposeConsumerSet___sets), 0, 0, 1, 1},
  {&__pyx_n_s_GeneralPurposeConsumerSet_flush, __pyx_k_GeneralPurposeConsumerSet_flush, sizeof(__pyx_k_GeneralPurposeConsumerSet_flush), 0, 0, 1, 1},
  {&__pyx_n_s_GeneralPurposeConsumerSet_receiv, __pyx_k_GeneralPurposeConsumerSet_receiv, sizeof(__pyx_k_GeneralPurposeConsumerSet_receiv), 0, 0, 1, 1},
  {&__pyx_n_s_GeneralPurposeConsumerSet_receiv_2, __pyx_k_GeneralPurposeConsumerSet_receiv_2, sizeof(__pyx_k_GeneralPurposeConsumerSet_receiv_2), 0, 0, 1, 1},
  {&__pyx_n_s_GlobalWindows, __pyx_k_GlobalWindows, sizeof(__pyx_k_GlobalWindows), 0, 0, 1, 1},
  {&__pyx_n_s_GroupedShuffleReadOperation, __pyx_k_GroupedShuffleReadOperation, sizeof(__pyx_k_GroupedShuffleReadOperation), 0, 0, 1, 1},
  {&__pyx_n_s_Hashable, __pyx_k_Hashable, sizeof(__pyx_k_Hashable), 0, 0, 1, 1},
  {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
  {&__pyx_n_s_ImpulseReadOperation, __pyx_k_ImpulseReadOperation, sizeof(__pyx_k_ImpulseReadOperation), 0, 0, 1, 1},
  {&__pyx_n_s_ImpulseReadOperation___reduce_cy, __pyx_k_ImpulseReadOperation___reduce_cy, sizeof(__pyx_k_ImpulseReadOperation___reduce_cy), 0, 0, 1, 1},
  {&__pyx_n_s_ImpulseReadOperation___setstate, __pyx_k_ImpulseReadOperation___setstate, sizeof(__pyx_k_ImpulseReadOperation___setstate), 0, 0, 1, 1},
  {&__pyx_n_s_ImpulseReadOperation_process, __pyx_k_ImpulseReadOperation_process, sizeof(__pyx_k_ImpulseReadOperation_process), 0, 0, 1, 1},
  {&__pyx_n_s_InMemoryWriteOperation, __pyx_k_InMemoryWriteOperation, sizeof(__pyx_k_InMemoryWriteOperation), 0, 0, 1, 1},
  {&__pyx_n_s_InMemoryWriteOperation_process, __pyx_k_InMemoryWriteOperation_process, sizeof(__pyx_k_InMemoryWriteOperation_process), 0, 0, 1, 1},
  {&__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_n_s_InefficientExecutionWarning, __pyx_k_InefficientExecutionWarning, sizeof(__pyx_k_InefficientExecutionWarning), 0, 0, 1, 1},
  {&__pyx_kp_u_Input_to_operation, __pyx_k_Input_to_operation, sizeof(__pyx_k_Input_to_operation), 0, 1, 0, 0},
  {&__pyx_n_s_Iterable, __pyx_k_Iterable, sizeof(__pyx_k_Iterable), 0, 0, 1, 1},
  {&__pyx_n_s_IterableCoder, __pyx_k_IterableCoder, sizeof(__pyx_k_IterableCoder), 0, 0, 1, 1},
  {&__pyx_n_s_Iterator, __pyx_k_Iterator, sizeof(__pyx_k_Iterator), 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_MAX_BATCH_SIZE, __pyx_k_MAX_BATCH_SIZE, sizeof(__pyx_k_MAX_BATCH_SIZE), 0, 0, 1, 1},
  {&__pyx_n_s_Mapping, __pyx_k_Mapping, sizeof(__pyx_k_Mapping), 0, 0, 1, 1},
  {&__pyx_n_s_MeanCombineFn, __pyx_k_MeanCombineFn, sizeof(__pyx_k_MeanCombineFn), 0, 0, 1, 1},
  {&__pyx_n_s_MetricsContainer, __pyx_k_MetricsContainer, sizeof(__pyx_k_MetricsContainer), 0, 0, 1, 1},
  {&__pyx_n_s_MonitoringInfo, __pyx_k_MonitoringInfo, sizeof(__pyx_k_MonitoringInfo), 0, 0, 1, 1},
  {&__pyx_n_s_NameContext, __pyx_k_NameContext, sizeof(__pyx_k_NameContext), 0, 0, 1, 1},
  {&__pyx_n_s_NamedTuple, __pyx_k_NamedTuple, sizeof(__pyx_k_NamedTuple), 0, 0, 1, 1},
  {&__pyx_n_s_NativeReadOperation, __pyx_k_NativeReadOperation, sizeof(__pyx_k_NativeReadOperation), 0, 0, 1, 1},
  {&__pyx_n_s_NativeWriteOperation, __pyx_k_NativeWriteOperation, sizeof(__pyx_k_NativeWriteOperation), 0, 0, 1, 1},
  {&__pyx_n_u_None, __pyx_k_None, sizeof(__pyx_k_None), 0, 1, 0, 1},
  {&__pyx_n_s_NotImplementedError, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1},
  {&__pyx_n_s_OUTPUT_AT_EOW, __pyx_k_OUTPUT_AT_EOW, sizeof(__pyx_k_OUTPUT_AT_EOW), 0, 0, 1, 1},
  {&__pyx_n_s_OpInputInfo, __pyx_k_OpInputInfo, sizeof(__pyx_k_OpInputInfo), 0, 0, 1, 1},
  {&__pyx_n_u_OpInputInfo, __pyx_k_OpInputInfo, sizeof(__pyx_k_OpInputInfo), 0, 1, 0, 1},
  {&__pyx_n_s_Operation, __pyx_k_Operation, sizeof(__pyx_k_Operation), 0, 0, 1, 1},
  {&__pyx_n_s_Operation___reduce_cython, __pyx_k_Operation___reduce_cython, sizeof(__pyx_k_Operation___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Operation___setstate_cython, __pyx_k_Operation___setstate_cython, sizeof(__pyx_k_Operation___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Operation__get_runtime_performan, __pyx_k_Operation__get_runtime_performan, sizeof(__pyx_k_Operation__get_runtime_performan), 0, 0, 1, 1},
  {&__pyx_n_s_Operation_add_receiver, __pyx_k_Operation_add_receiver, sizeof(__pyx_k_Operation_add_receiver), 0, 0, 1, 1},
  {&__pyx_n_s_Operation_current_element_progre, __pyx_k_Operation_current_element_progre, sizeof(__pyx_k_Operation_current_element_progre), 0, 0, 1, 1},
  {&__pyx_n_s_Operation_execution_time_monitor, __pyx_k_Operation_execution_time_monitor, sizeof(__pyx_k_Operation_execution_time_monitor), 0, 0, 1, 1},
  {&__pyx_n_s_Operation_finalize_bundle, __pyx_k_Operation_finalize_bundle, sizeof(__pyx_k_Operation_finalize_bundle), 0, 0, 1, 1},
  {&__pyx_n_s_Operation_finish, __pyx_k_Operation_finish, sizeof(__pyx_k_Operation_finish), 0, 0, 1, 1},
  {&__pyx_n_s_Operation_get_batching_preferenc, __pyx_k_Operation_get_batching_preferenc, sizeof(__pyx_k_Operation_get_batching_preferenc), 0, 0, 1, 1},
  {&__pyx_n_s_Operation_get_input_batch_conver, __pyx_k_Operation_get_input_batch_conver, sizeof(__pyx_k_Operation_get_input_batch_conver), 0, 0, 1, 1},
  {&__pyx_n_s_Operation_get_output_batch_conve, __pyx_k_Operation_get_output_batch_conve, sizeof(__pyx_k_Operation_get_output_batch_conve), 0, 0, 1, 1},
  {&__pyx_n_s_Operation_monitoring_infos, __pyx_k_Operation_monitoring_infos, sizeof(__pyx_k_Operation_monitoring_infos), 0, 0, 1, 1},
  {&__pyx_n_s_Operation_needs_finalization, __pyx_k_Operation_needs_finalization, sizeof(__pyx_k_Operation_needs_finalization), 0, 0, 1, 1},
  {&__pyx_n_s_Operation_output, __pyx_k_Operation_output, sizeof(__pyx_k_Operation_output), 0, 0, 1, 1},
  {&__pyx_n_s_Operation_pcollection_count_moni, __pyx_k_Operation_pcollection_count_moni, sizeof(__pyx_k_Operation_pcollection_count_moni), 0, 0, 1, 1},
  {&__pyx_n_s_Operation_process, __pyx_k_Operation_process, sizeof(__pyx_k_Operation_process), 0, 0, 1, 1},
  {&__pyx_n_s_Operation_process_batch, __pyx_k_Operation_process_batch, sizeof(__pyx_k_Operation_process_batch), 0, 0, 1, 1},
  {&__pyx_n_s_Operation_reset, __pyx_k_Operation_reset, sizeof(__pyx_k_Operation_reset), 0, 0, 1, 1},
  {&__pyx_n_s_Operation_setup, __pyx_k_Operation_setup, sizeof(__pyx_k_Operation_setup), 0, 0, 1, 1},
  {&__pyx_n_s_Operation_start, __pyx_k_Operation_start, sizeof(__pyx_k_Operation_start), 0, 0, 1, 1},
  {&__pyx_n_s_Operation_str_internal, __pyx_k_Operation_str_internal, sizeof(__pyx_k_Operation_str_internal), 0, 0, 1, 1},
  {&__pyx_n_s_Operation_teardown, __pyx_k_Operation_teardown, sizeof(__pyx_k_Operation_teardown), 0, 0, 1, 1},
  {&__pyx_n_s_Operation_try_split, __pyx_k_Operation_try_split, sizeof(__pyx_k_Operation_try_split), 0, 0, 1, 1},
  {&__pyx_n_s_Operation_user_monitoring_infos, __pyx_k_Operation_user_monitoring_infos, sizeof(__pyx_k_Operation_user_monitoring_infos), 0, 0, 1, 1},
  {&__pyx_n_s_Optional, __pyx_k_Optional, sizeof(__pyx_k_Optional), 0, 0, 1, 1},
  {&__pyx_n_s_OutputSampler, __pyx_k_OutputSampler, sizeof(__pyx_k_OutputSampler), 0, 0, 1, 1},
  {&__pyx_n_s_PGBKCVOperation, __pyx_k_PGBKCVOperation, sizeof(__pyx_k_PGBKCVOperation), 0, 0, 1, 1},
  {&__pyx_n_s_PGBKCVOperation___reduce_cython, __pyx_k_PGBKCVOperation___reduce_cython, sizeof(__pyx_k_PGBKCVOperation___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_PGBKCVOperation___setstate_cytho, __pyx_k_PGBKCVOperation___setstate_cytho, sizeof(__pyx_k_PGBKCVOperation___setstate_cytho), 0, 0, 1, 1},
  {&__pyx_n_s_PGBKCVOperation_finish, __pyx_k_PGBKCVOperation_finish, sizeof(__pyx_k_PGBKCVOperation_finish), 0, 0, 1, 1},
  {&__pyx_n_s_PGBKCVOperation_output_key, __pyx_k_PGBKCVOperation_output_key, sizeof(__pyx_k_PGBKCVOperation_output_key), 0, 0, 1, 1},
  {&__pyx_n_s_PGBKCVOperation_process, __pyx_k_PGBKCVOperation_process, sizeof(__pyx_k_PGBKCVOperation_process), 0, 0, 1, 1},
  {&__pyx_n_s_PGBKCVOperation_setup, __pyx_k_PGBKCVOperation_setup, sizeof(__pyx_k_PGBKCVOperation_setup), 0, 0, 1, 1},
  {&__pyx_n_s_PGBKCVOperation_teardown, __pyx_k_PGBKCVOperation_teardown, sizeof(__pyx_k_PGBKCVOperation_teardown), 0, 0, 1, 1},
  {&__pyx_n_s_PGBKOperation, __pyx_k_PGBKOperation, sizeof(__pyx_k_PGBKOperation), 0, 0, 1, 1},
  {&__pyx_n_s_PGBKOperation___init, __pyx_k_PGBKOperation___init, sizeof(__pyx_k_PGBKOperation___init), 0, 0, 1, 1},
  {&__pyx_n_s_PGBKOperation_finish, __pyx_k_PGBKOperation_finish, sizeof(__pyx_k_PGBKOperation_finish), 0, 0, 1, 1},
  {&__pyx_n_s_PGBKOperation_flush, __pyx_k_PGBKOperation_flush, sizeof(__pyx_k_PGBKOperation_flush), 0, 0, 1, 1},
  {&__pyx_n_s_PGBKOperation_process, __pyx_k_PGBKOperation_process, sizeof(__pyx_k_PGBKOperation_process), 0, 0, 1, 1},
  {&__pyx_n_s_PROCESS_BUNDLE_MSECS_URN, __pyx_k_PROCESS_BUNDLE_MSECS_URN, sizeof(__pyx_k_PROCESS_BUNDLE_MSECS_URN), 0, 0, 1, 1},
  {&__pyx_n_s_PROGRESS_TYPE, __pyx_k_PROGRESS_TYPE, sizeof(__pyx_k_PROGRESS_TYPE), 0, 0, 1, 1},
  {&__pyx_kp_s_Partial_group_by_key_operation_T, __pyx_k_Partial_group_by_key_operation_T, sizeof(__pyx_k_Partial_group_by_key_operation_T), 0, 0, 1, 0},
  {&__pyx_n_s_PhasedCombineFnExecutor, __pyx_k_PhasedCombineFnExecutor, sizeof(__pyx_k_PhasedCombineFnExecutor), 0, 0, 1, 1},
  {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
  {&__pyx_kp_u_Processing_s_in_s, __pyx_k_Processing_s_in_s, sizeof(__pyx_k_Processing_s_in_s), 0, 1, 0, 0},
  {&__pyx_n_s_RLock, __pyx_k_RLock, sizeof(__pyx_k_RLock), 0, 0, 1, 1},
  {&__pyx_n_s_ReadOperation, __pyx_k_ReadOperation, sizeof(__pyx_k_ReadOperation), 0, 0, 1, 1},
  {&__pyx_n_s_ReadOperation___reduce_cython, __pyx_k_ReadOperation___reduce_cython, sizeof(__pyx_k_ReadOperation___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_ReadOperation___setstate_cython, __pyx_k_ReadOperation___setstate_cython, sizeof(__pyx_k_ReadOperation___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_ReadOperation_start, __pyx_k_ReadOperation_start, sizeof(__pyx_k_ReadOperation_start), 0, 0, 1, 1},
  {&__pyx_n_s_Receiver, __pyx_k_Receiver, sizeof(__pyx_k_Receiver), 0, 0, 1, 1},
  {&__pyx_n_s_ReifyTimestampAndWindowsOperatio, __pyx_k_ReifyTimestampAndWindowsOperatio, sizeof(__pyx_k_ReifyTimestampAndWindowsOperatio), 0, 0, 1, 1},
  {&__pyx_n_s_RuntimeWarning, __pyx_k_RuntimeWarning, sizeof(__pyx_k_RuntimeWarning), 0, 0, 1, 1},
  {&__pyx_n_s_SAMPLED_BYTE_SIZE_URN, __pyx_k_SAMPLED_BYTE_SIZE_URN, sizeof(__pyx_k_SAMPLED_BYTE_SIZE_URN), 0, 0, 1, 1},
  {&__pyx_n_s_START_BUNDLE_MSECS_URN, __pyx_k_START_BUNDLE_MSECS_URN, sizeof(__pyx_k_START_BUNDLE_MSECS_URN), 0, 0, 1, 1},
  {&__pyx_n_s_SdfProcessSizedElements, __pyx_k_SdfProcessSizedElements, sizeof(__pyx_k_SdfProcessSizedElements), 0, 0, 1, 1},
  {&__pyx_n_s_SdfProcessSizedElements___reduce, __pyx_k_SdfProcessSizedElements___reduce, sizeof(__pyx_k_SdfProcessSizedElements___reduce), 0, 0, 1, 1},
  {&__pyx_n_s_SdfProcessSizedElements___setsta, __pyx_k_SdfProcessSizedElements___setsta, sizeof(__pyx_k_SdfProcessSizedElements___setsta), 0, 0, 1, 1},
  {&__pyx_n_s_SdfProcessSizedElements_current, __pyx_k_SdfProcessSizedElements_current, sizeof(__pyx_k_SdfProcessSizedElements_current), 0, 0, 1, 1},
  {&__pyx_n_s_SdfProcessSizedElements_monitori, __pyx_k_SdfProcessSizedElements_monitori, sizeof(__pyx_k_SdfProcessSizedElements_monitori), 0, 0, 1, 1},
  {&__pyx_n_s_SdfProcessSizedElements_process, __pyx_k_SdfProcessSizedElements_process, sizeof(__pyx_k_SdfProcessSizedElements_process), 0, 0, 1, 1},
  {&__pyx_n_s_SdfProcessSizedElements_try_spli, __pyx_k_SdfProcessSizedElements_try_spli, sizeof(__pyx_k_SdfProcessSizedElements_try_spli), 0, 0, 1, 1},
  {&__pyx_n_s_SdfSplitResultsPrimary, __pyx_k_SdfSplitResultsPrimary, sizeof(__pyx_k_SdfSplitResultsPrimary), 0, 0, 1, 1},
  {&__pyx_n_s_SdfSplitResultsResidual, __pyx_k_SdfSplitResultsResidual, sizeof(__pyx_k_SdfSplitResultsResidual), 0, 0, 1, 1},
  {&__pyx_n_s_SdfTruncateSizedRestrictions, __pyx_k_SdfTruncateSizedRestrictions, sizeof(__pyx_k_SdfTruncateSizedRestrictions), 0, 0, 1, 1},
  {&__pyx_n_s_SdfTruncateSizedRestrictions___r, __pyx_k_SdfTruncateSizedRestrictions___r, sizeof(__pyx_k_SdfTruncateSizedRestrictions___r), 0, 0, 1, 1},
  {&__pyx_n_s_SdfTruncateSizedRestrictions___s, __pyx_k_SdfTruncateSizedRestrictions___s, sizeof(__pyx_k_SdfTruncateSizedRestrictions___s), 0, 0, 1, 1},
  {&__pyx_n_s_SdfTruncateSizedRestrictions_cur, __pyx_k_SdfTruncateSizedRestrictions_cur, sizeof(__pyx_k_SdfTruncateSizedRestrictions_cur), 0, 0, 1, 1},
  {&__pyx_n_s_SdfTruncateSizedRestrictions_try, __pyx_k_SdfTruncateSizedRestrictions_try, sizeof(__pyx_k_SdfTruncateSizedRestrictions_try), 0, 0, 1, 1},
  {&__pyx_kp_u_Setup_called_for_s, __pyx_k_Setup_called_for_s, sizeof(__pyx_k_Setup_called_for_s), 0, 1, 0, 0},
  {&__pyx_n_s_ShuffleWriteOperation, __pyx_k_ShuffleWriteOperation, sizeof(__pyx_k_ShuffleWriteOperation), 0, 0, 1, 1},
  {&__pyx_n_s_SideInputMap, __pyx_k_SideInputMap, sizeof(__pyx_k_SideInputMap), 0, 0, 1, 1},
  {&__pyx_n_s_SimpleMapTaskExecutor, __pyx_k_SimpleMapTaskExecutor, sizeof(__pyx_k_SimpleMapTaskExecutor), 0, 0, 1, 1},
  {&__pyx_n_s_SimpleMapTaskExecutor___init, __pyx_k_SimpleMapTaskExecutor___init, sizeof(__pyx_k_SimpleMapTaskExecutor___init), 0, 0, 1, 1},
  {&__pyx_n_s_SimpleMapTaskExecutor_execute, __pyx_k_SimpleMapTaskExecutor_execute, sizeof(__pyx_k_SimpleMapTaskExecutor_execute), 0, 0, 1, 1},
  {&__pyx_n_s_SimpleMapTaskExecutor_operations, __pyx_k_SimpleMapTaskExecutor_operations, sizeof(__pyx_k_SimpleMapTaskExecutor_operations), 0, 0, 1, 1},
  {&__pyx_n_s_SingletonElementConsumerSet, __pyx_k_SingletonElementConsumerSet, sizeof(__pyx_k_SingletonElementConsumerSet), 0, 0, 1, 1},
  {&__pyx_n_s_SingletonElementConsumerSet___re, __pyx_k_SingletonElementConsumerSet___re, sizeof(__pyx_k_SingletonElementConsumerSet___re), 0, 0, 1, 1},
  {&__pyx_n_s_SingletonElementConsumerSet___se, __pyx_k_SingletonElementConsumerSet___se, sizeof(__pyx_k_SingletonElementConsumerSet___se), 0, 0, 1, 1},
  {&__pyx_n_s_SingletonElementConsumerSet_curr, __pyx_k_SingletonElementConsumerSet_curr, sizeof(__pyx_k_SingletonElementConsumerSet_curr), 0, 0, 1, 1},
  {&__pyx_n_s_SingletonElementConsumerSet_flus, __pyx_k_SingletonElementConsumerSet_flus, sizeof(__pyx_k_SingletonElementConsumerSet_flus), 0, 0, 1, 1},
  {&__pyx_kp_u_SingletonElementConsumerSet_rece, __pyx_k_SingletonElementConsumerSet_rece, sizeof(__pyx_k_SingletonElementConsumerSet_rece), 0, 1, 0, 0},
  {&__pyx_n_s_SingletonElementConsumerSet_rece_2, __pyx_k_SingletonElementConsumerSet_rece_2, sizeof(__pyx_k_SingletonElementConsumerSet_rece_2), 0, 0, 1, 1},
  {&__pyx_n_s_SingletonElementConsumerSet_rece_3, __pyx_k_SingletonElementConsumerSet_rece_3, sizeof(__pyx_k_SingletonElementConsumerSet_rece_3), 0, 0, 1, 1},
  {&__pyx_n_s_SingletonElementConsumerSet_try, __pyx_k_SingletonElementConsumerSet_try, sizeof(__pyx_k_SingletonElementConsumerSet_try), 0, 0, 1, 1},
  {&__pyx_n_s_SourceBundle, __pyx_k_SourceBundle, sizeof(__pyx_k_SourceBundle), 0, 0, 1, 1},
  {&__pyx_n_s_SplitResultPrimary, __pyx_k_SplitResultPrimary, sizeof(__pyx_k_SplitResultPrimary), 0, 0, 1, 1},
  {&__pyx_n_u_SplitResultPrimary, __pyx_k_SplitResultPrimary, sizeof(__pyx_k_SplitResultPrimary), 0, 1, 0, 1},
  {&__pyx_n_s_SplitResultResidual, __pyx_k_SplitResultResidual, sizeof(__pyx_k_SplitResultResidual), 0, 0, 1, 1},
  {&__pyx_n_u_SplitResultResidual, __pyx_k_SplitResultResidual, sizeof(__pyx_k_SplitResultResidual), 0, 1, 0, 1},
  {&__pyx_kp_u_Starting_op_d_s, __pyx_k_Starting_op_d_s, sizeof(__pyx_k_Starting_op_d_s), 0, 1, 0, 0},
  {&__pyx_n_s_StateSampler, __pyx_k_StateSampler, sizeof(__pyx_k_StateSampler), 0, 0, 1, 1},
  {&__pyx_n_s_StreamingGroupAlsoByWindowsOpera, __pyx_k_StreamingGroupAlsoByWindowsOpera, sizeof(__pyx_k_StreamingGroupAlsoByWindowsOpera), 0, 0, 1, 1},
  {&__pyx_n_s_TOTAL_MSECS_URN, __pyx_k_TOTAL_MSECS_URN, sizeof(__pyx_k_TOTAL_MSECS_URN), 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_TaggedReceivers, __pyx_k_TaggedReceivers, sizeof(__pyx_k_TaggedReceivers), 0, 0, 1, 1},
  {&__pyx_n_s_TaggedReceivers___init, __pyx_k_TaggedReceivers___init, sizeof(__pyx_k_TaggedReceivers___init), 0, 0, 1, 1},
  {&__pyx_n_s_TaggedReceivers___missing, __pyx_k_TaggedReceivers___missing, sizeof(__pyx_k_TaggedReceivers___missing), 0, 0, 1, 1},
  {&__pyx_n_s_TaggedReceivers_total_output_by, __pyx_k_TaggedReceivers_total_output_by, sizeof(__pyx_k_TaggedReceivers_total_output_by), 0, 0, 1, 1},
  {&__pyx_kp_u_Teardown_called_for_s, __pyx_k_Teardown_called_for_s, sizeof(__pyx_k_Teardown_called_for_s), 0, 1, 0, 0},
  {&__pyx_kp_u_This_is_very_inefficient_consid, __pyx_k_This_is_very_inefficient_consid, sizeof(__pyx_k_This_is_very_inefficient_consid), 0, 1, 0, 0},
  {&__pyx_n_s_TimerSpec, __pyx_k_TimerSpec, sizeof(__pyx_k_TimerSpec), 0, 0, 1, 1},
  {&__pyx_n_s_TimestampCombiner, __pyx_k_TimestampCombiner, sizeof(__pyx_k_TimestampCombiner), 0, 0, 1, 1},
  {&__pyx_n_s_Tuple, __pyx_k_Tuple, sizeof(__pyx_k_Tuple), 0, 0, 1, 1},
  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  {&__pyx_n_s_UngroupedShuffleReadOperation, __pyx_k_UngroupedShuffleReadOperation, sizeof(__pyx_k_UngroupedShuffleReadOperation), 0, 0, 1, 1},
  {&__pyx_kp_u_Unknown_side_input_type_r, __pyx_k_Unknown_side_input_type_r, sizeof(__pyx_k_Unknown_side_input_type_r), 0, 1, 0, 0},
  {&__pyx_n_s_WORK_COMPLETED_URN, __pyx_k_WORK_COMPLETED_URN, sizeof(__pyx_k_WORK_COMPLETED_URN), 0, 0, 1, 1},
  {&__pyx_n_s_WORK_REMAINING_URN, __pyx_k_WORK_REMAINING_URN, sizeof(__pyx_k_WORK_REMAINING_URN), 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_n_s_WorkerCombineFn, __pyx_k_WorkerCombineFn, sizeof(__pyx_k_WorkerCombineFn), 0, 0, 1, 1},
  {&__pyx_n_s_WorkerDoFn, __pyx_k_WorkerDoFn, sizeof(__pyx_k_WorkerDoFn), 0, 0, 1, 1},
  {&__pyx_n_s_WorkerFlatten, __pyx_k_WorkerFlatten, sizeof(__pyx_k_WorkerFlatten), 0, 0, 1, 1},
  {&__pyx_n_s_WorkerGroupingShuffleRead, __pyx_k_WorkerGroupingShuffleRead, sizeof(__pyx_k_WorkerGroupingShuffleRead), 0, 0, 1, 1},
  {&__pyx_n_s_WorkerInMemoryWrite, __pyx_k_WorkerInMemoryWrite, sizeof(__pyx_k_WorkerInMemoryWrite), 0, 0, 1, 1},
  {&__pyx_n_s_WorkerMergeWindows, __pyx_k_WorkerMergeWindows, sizeof(__pyx_k_WorkerMergeWindows), 0, 0, 1, 1},
  {&__pyx_n_s_WorkerPartialGroupByKey, __pyx_k_WorkerPartialGroupByKey, sizeof(__pyx_k_WorkerPartialGroupByKey), 0, 0, 1, 1},
  {&__pyx_n_s_WorkerRead, __pyx_k_WorkerRead, sizeof(__pyx_k_WorkerRead), 0, 0, 1, 1},
  {&__pyx_n_s_WorkerReifyTimestampAndWindows, __pyx_k_WorkerReifyTimestampAndWindows, sizeof(__pyx_k_WorkerReifyTimestampAndWindows), 0, 0, 1, 1},
  {&__pyx_n_s_WorkerShuffleWrite, __pyx_k_WorkerShuffleWrite, sizeof(__pyx_k_WorkerShuffleWrite), 0, 0, 1, 1},
  {&__pyx_n_s_WorkerSideInputSource, __pyx_k_WorkerSideInputSource, sizeof(__pyx_k_WorkerSideInputSource), 0, 0, 1, 1},
  {&__pyx_n_s_WorkerUngroupedShuffleRead, __pyx_k_WorkerUngroupedShuffleRead, sizeof(__pyx_k_WorkerUngroupedShuffleRead), 0, 0, 1, 1},
  {&__pyx_n_s_WorkerWrite, __pyx_k_WorkerWrite, sizeof(__pyx_k_WorkerWrite), 0, 0, 1, 1},
  {&__pyx_kp_u__10, __pyx_k__10, sizeof(__pyx_k__10), 0, 1, 0, 0},
  {&__pyx_kp_u__50, __pyx_k__50, sizeof(__pyx_k__50), 0, 1, 0, 0},
  {&__pyx_kp_u__51, __pyx_k__51, sizeof(__pyx_k__51), 0, 1, 0, 0},
  {&__pyx_kp_u__52, __pyx_k__52, sizeof(__pyx_k__52), 0, 1, 0, 0},
  {&__pyx_kp_u__53, __pyx_k__53, sizeof(__pyx_k__53), 0, 1, 0, 0},
  {&__pyx_kp_u__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 1, 0, 0},
  {&__pyx_n_s_accumulator, __pyx_k_accumulator, sizeof(__pyx_k_accumulator), 0, 0, 1, 1},
  {&__pyx_n_s_add_input, __pyx_k_add_input, sizeof(__pyx_k_add_input), 0, 0, 1, 1},
  {&__pyx_n_s_add_receiver, __pyx_k_add_receiver, sizeof(__pyx_k_add_receiver), 0, 0, 1, 1},
  {&__pyx_n_s_add_timer_info, __pyx_k_add_timer_info, sizeof(__pyx_k_add_timer_info), 0, 0, 1, 1},
  {&__pyx_n_s_apache_beam, __pyx_k_apache_beam, sizeof(__pyx_k_apache_beam), 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, __pyx_k_apache_beam_io, sizeof(__pyx_k_apache_beam_io), 0, 0, 1, 1},
  {&__pyx_n_s_apache_beam_metrics, __pyx_k_apache_beam_metrics, sizeof(__pyx_k_apache_beam_metrics), 0, 0, 1, 1},
  {&__pyx_n_s_apache_beam_metrics_cells, __pyx_k_apache_beam_metrics_cells, sizeof(__pyx_k_apache_beam_metrics_cells), 0, 0, 1, 1},
  {&__pyx_n_s_apache_beam_metrics_execution, __pyx_k_apache_beam_metrics_execution, sizeof(__pyx_k_apache_beam_metrics_execution), 0, 0, 1, 1},
  {&__pyx_n_s_apache_beam_portability_api, __pyx_k_apache_beam_portability_api, sizeof(__pyx_k_apache_beam_portability_api), 0, 0, 1, 1},
  {&__pyx_n_s_apache_beam_runners, __pyx_k_apache_beam_runners, sizeof(__pyx_k_apache_beam_runners), 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_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, __pyx_k_apache_beam_runners_worker, sizeof(__pyx_k_apache_beam_runners_worker), 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_runners_worker_data, __pyx_k_apache_beam_runners_worker_data, sizeof(__pyx_k_apache_beam_runners_worker_data), 0, 0, 1, 1},
  {&__pyx_n_s_apache_beam_runners_worker_opera, __pyx_k_apache_beam_runners_worker_opera, sizeof(__pyx_k_apache_beam_runners_worker_opera), 0, 0, 1, 1},
  {&__pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_k_apache_beam_runners_worker_opera_2, sizeof(__pyx_k_apache_beam_runners_worker_opera_2), 0, 0, 1, 0},
  {&__pyx_n_s_apache_beam_runners_worker_state, __pyx_k_apache_beam_runners_worker_state, sizeof(__pyx_k_apache_beam_runners_worker_state), 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_combiners, __pyx_k_apache_beam_transforms_combiners, sizeof(__pyx_k_apache_beam_transforms_combiners), 0, 0, 1, 1},
  {&__pyx_n_s_apache_beam_transforms_userstate, __pyx_k_apache_beam_transforms_userstate, sizeof(__pyx_k_apache_beam_transforms_userstate), 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_batch, __pyx_k_apache_beam_typehints_batch, sizeof(__pyx_k_apache_beam_typehints_batch), 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_apache_sideinputs, __pyx_k_apache_sideinputs, sizeof(__pyx_k_apache_sideinputs), 0, 0, 1, 1},
  {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
  {&__pyx_n_s_apply, __pyx_k_apply, sizeof(__pyx_k_apply), 0, 0, 1, 1},
  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
  {&__pyx_n_s_as_windowed_values, __pyx_k_as_windowed_values, sizeof(__pyx_k_as_windowed_values), 0, 0, 1, 1},
  {&__pyx_n_s_batch, __pyx_k_batch, sizeof(__pyx_k_batch), 0, 0, 1, 1},
  {&__pyx_n_s_batch_type, __pyx_k_batch_type, sizeof(__pyx_k_batch_type), 0, 0, 1, 1},
  {&__pyx_n_s_cast_to_operation, __pyx_k_cast_to_operation, sizeof(__pyx_k_cast_to_operation), 0, 0, 1, 1},
  {&__pyx_n_s_cast_to_receiver, __pyx_k_cast_to_receiver, sizeof(__pyx_k_cast_to_receiver), 0, 0, 1, 1},
  {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 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, __pyx_k_coder, sizeof(__pyx_k_coder), 0, 0, 1, 1},
  {&__pyx_n_u_coder, __pyx_k_coder, sizeof(__pyx_k_coder), 0, 1, 0, 1},
  {&__pyx_kp_u_coder_2, __pyx_k_coder_2, sizeof(__pyx_k_coder_2), 0, 1, 0, 0},
  {&__pyx_n_s_coders, __pyx_k_coders, sizeof(__pyx_k_coders), 0, 0, 1, 1},
  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
  {&__pyx_n_s_combine, __pyx_k_combine, sizeof(__pyx_k_combine), 0, 0, 1, 1},
  {&__pyx_n_s_combine_fn, __pyx_k_combine_fn, sizeof(__pyx_k_combine_fn), 0, 0, 1, 1},
  {&__pyx_n_s_combiners, __pyx_k_combiners, sizeof(__pyx_k_combiners), 0, 0, 1, 1},
  {&__pyx_n_s_commit, __pyx_k_commit, sizeof(__pyx_k_commit), 0, 0, 1, 1},
  {&__pyx_n_s_common, __pyx_k_common, sizeof(__pyx_k_common), 0, 0, 1, 1},
  {&__pyx_n_s_compact, __pyx_k_compact, sizeof(__pyx_k_compact), 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_consumer, __pyx_k_consumer, sizeof(__pyx_k_consumer), 0, 0, 1, 1},
  {&__pyx_n_s_consumer_batch_converter, __pyx_k_consumer_batch_converter, sizeof(__pyx_k_consumer_batch_converter), 0, 0, 1, 1},
  {&__pyx_n_s_consumer_batch_preference, __pyx_k_consumer_batch_preference, sizeof(__pyx_k_consumer_batch_preference), 0, 0, 1, 1},
  {&__pyx_n_s_consumers, __pyx_k_consumers, sizeof(__pyx_k_consumers), 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_create, __pyx_k_create, sizeof(__pyx_k_create), 0, 0, 1, 1},
  {&__pyx_n_s_create_accumulator, __pyx_k_create_accumulator, sizeof(__pyx_k_create_accumulator), 0, 0, 1, 1},
  {&__pyx_n_s_create_labels, __pyx_k_create_labels, sizeof(__pyx_k_create_labels), 0, 0, 1, 1},
  {&__pyx_n_s_create_operation, __pyx_k_create_operation, sizeof(__pyx_k_create_operation), 0, 0, 1, 1},
  {&__pyx_n_s_create_pgbk_op, __pyx_k_create_pgbk_op, sizeof(__pyx_k_create_pgbk_op), 0, 0, 1, 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_curry_combine_fn, __pyx_k_curry_combine_fn, sizeof(__pyx_k_curry_combine_fn), 0, 0, 1, 1},
  {&__pyx_n_s_data_sampler, __pyx_k_data_sampler, sizeof(__pyx_k_data_sampler), 0, 0, 1, 1},
  {&__pyx_n_s_dataflow_worker_native_operation, __pyx_k_dataflow_worker_native_operation, sizeof(__pyx_k_dataflow_worker_native_operation), 0, 0, 1, 1},
  {&__pyx_n_s_dataflow_worker_shuffle_operatio, __pyx_k_dataflow_worker_shuffle_operatio, sizeof(__pyx_k_dataflow_worker_shuffle_operatio), 0, 0, 1, 1},
  {&__pyx_n_s_debug, __pyx_k_debug, sizeof(__pyx_k_debug), 0, 0, 1, 1},
  {&__pyx_n_s_debug_logging_enabled, __pyx_k_debug_logging_enabled, sizeof(__pyx_k_debug_logging_enabled), 0, 0, 1, 1},
  {&__pyx_n_s_declaring_step, __pyx_k_declaring_step, sizeof(__pyx_k_declaring_step), 0, 0, 1, 1},
  {&__pyx_n_s_defaultdict, __pyx_k_defaultdict, sizeof(__pyx_k_defaultdict), 0, 0, 1, 1},
  {&__pyx_n_s_delayed_applications, __pyx_k_delayed_applications, sizeof(__pyx_k_delayed_applications), 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_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_el, __pyx_k_el, sizeof(__pyx_k_el), 0, 0, 1, 1},
  {&__pyx_n_s_element_counter, __pyx_k_element_counter, sizeof(__pyx_k_element_counter), 0, 0, 1, 1},
  {&__pyx_n_s_element_sampler, __pyx_k_element_sampler, sizeof(__pyx_k_element_sampler), 0, 0, 1, 1},
  {&__pyx_n_s_elements, __pyx_k_elements, sizeof(__pyx_k_elements), 0, 0, 1, 1},
  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
  {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1},
  {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
  {&__pyx_n_s_execute, __pyx_k_execute, sizeof(__pyx_k_execute), 0, 0, 1, 1},
  {&__pyx_n_s_execution_context, __pyx_k_execution_context, sizeof(__pyx_k_execution_context), 0, 0, 1, 1},
  {&__pyx_n_s_execution_time_monitoring_infos, __pyx_k_execution_time_monitoring_infos, sizeof(__pyx_k_execution_time_monitoring_infos), 0, 0, 1, 1},
  {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1},
  {&__pyx_n_s_explode_batch, __pyx_k_explode_batch, sizeof(__pyx_k_explode_batch), 0, 0, 1, 1},
  {&__pyx_n_s_filter, __pyx_k_filter, sizeof(__pyx_k_filter), 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, __pyx_k_finish, sizeof(__pyx_k_finish), 0, 1, 0, 1},
  {&__pyx_n_s_fire_timestamp, __pyx_k_fire_timestamp, sizeof(__pyx_k_fire_timestamp), 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_n_s_fn_2, __pyx_k_fn_2, sizeof(__pyx_k_fn_2), 0, 0, 1, 1},
  {&__pyx_n_s_fns, __pyx_k_fns, sizeof(__pyx_k_fns), 0, 0, 1, 1},
  {&__pyx_n_s_fraction_completed, __pyx_k_fraction_completed, sizeof(__pyx_k_fraction_completed), 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_n_s_fraction_remaining, __pyx_k_fraction_remaining, sizeof(__pyx_k_fraction_remaining), 0, 0, 1, 1},
  {&__pyx_n_s_from_windowed_values, __pyx_k_from_windowed_values, sizeof(__pyx_k_from_windowed_values), 0, 0, 1, 1},
  {&__pyx_n_s_func, __pyx_k_func, sizeof(__pyx_k_func), 0, 0, 1, 1},
  {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
  {&__pyx_n_s_getLogger, __pyx_k_getLogger, sizeof(__pyx_k_getLogger), 0, 0, 1, 1},
  {&__pyx_n_s_get_batching_preference, __pyx_k_get_batching_preference, sizeof(__pyx_k_get_batching_preference), 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_impl, __pyx_k_get_impl, sizeof(__pyx_k_get_impl), 0, 0, 1, 1},
  {&__pyx_n_s_get_input_batch_converter, __pyx_k_get_input_batch_converter, sizeof(__pyx_k_get_input_batch_converter), 0, 0, 1, 1},
  {&__pyx_n_s_get_iterator_fn_for_sources, __pyx_k_get_iterator_fn_for_sources, sizeof(__pyx_k_get_iterator_fn_for_sources), 0, 0, 1, 1},
  {&__pyx_n_s_get_output_batch_converter, __pyx_k_get_output_batch_converter, sizeof(__pyx_k_get_output_batch_converter), 0, 0, 1, 1},
  {&__pyx_n_s_get_output_sampler, __pyx_k_get_output_sampler, sizeof(__pyx_k_get_output_sampler), 0, 0, 1, 1},
  {&__pyx_n_s_get_range_tracker, __pyx_k_get_range_tracker, sizeof(__pyx_k_get_range_tracker), 0, 0, 1, 1},
  {&__pyx_n_s_get_runtime_performance_hints, __pyx_k_get_runtime_performance_hints, sizeof(__pyx_k_get_runtime_performance_hints), 0, 0, 1, 1},
  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
  {&__pyx_n_s_global_window_type, __pyx_k_global_window_type, sizeof(__pyx_k_global_window_type), 0, 0, 1, 1},
  {&__pyx_n_s_globally_windowed_value, __pyx_k_globally_windowed_value, sizeof(__pyx_k_globally_windowed_value), 0, 0, 1, 1},
  {&__pyx_n_s_has_callbacks, __pyx_k_has_callbacks, sizeof(__pyx_k_has_callbacks), 0, 0, 1, 1},
  {&__pyx_n_s_has_element, __pyx_k_has_element, sizeof(__pyx_k_has_element), 0, 0, 1, 1},
  {&__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_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1},
  {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
  {&__pyx_n_s_init___locals_lambda, __pyx_k_init___locals_lambda, sizeof(__pyx_k_init___locals_lambda), 0, 0, 1, 1},
  {&__pyx_n_s_input, __pyx_k_input, sizeof(__pyx_k_input), 0, 0, 1, 1},
  {&__pyx_n_u_input, __pyx_k_input, sizeof(__pyx_k_input), 0, 1, 0, 1},
  {&__pyx_n_u_input_batch_converter, __pyx_k_input_batch_converter, sizeof(__pyx_k_input_batch_converter), 0, 1, 0, 1},
  {&__pyx_n_s_input_index, __pyx_k_input_index, sizeof(__pyx_k_input_index), 0, 0, 1, 1},
  {&__pyx_n_s_inputs, __pyx_k_inputs, sizeof(__pyx_k_inputs), 0, 0, 1, 1},
  {&__pyx_n_u_inputs, __pyx_k_inputs, sizeof(__pyx_k_inputs), 0, 1, 0, 1},
  {&__pyx_n_s_int64_counter, __pyx_k_int64_counter, sizeof(__pyx_k_int64_counter), 0, 0, 1, 1},
  {&__pyx_n_s_int64_distribution, __pyx_k_int64_distribution, sizeof(__pyx_k_int64_distribution), 0, 0, 1, 1},
  {&__pyx_n_s_iobase, __pyx_k_iobase, sizeof(__pyx_k_iobase), 0, 0, 1, 1},
  {&__pyx_n_s_isEnabledFor, __pyx_k_isEnabledFor, sizeof(__pyx_k_isEnabledFor), 0, 0, 1, 1},
  {&__pyx_n_s_is_default, __pyx_k_is_default, sizeof(__pyx_k_is_default), 0, 0, 1, 1},
  {&__pyx_n_s_is_recursive, __pyx_k_is_recursive, sizeof(__pyx_k_is_recursive), 0, 0, 1, 1},
  {&__pyx_n_s_is_streaming, __pyx_k_is_streaming, sizeof(__pyx_k_is_streaming), 0, 0, 1, 1},
  {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
  {&__pyx_n_s_iterator_fn, __pyx_k_iterator_fn, sizeof(__pyx_k_iterator_fn), 0, 0, 1, 1},
  {&__pyx_n_s_ix, __pyx_k_ix, sizeof(__pyx_k_ix), 0, 0, 1, 1},
  {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 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_labels, __pyx_k_labels, sizeof(__pyx_k_labels), 0, 0, 1, 1},
  {&__pyx_kp_u_len_consumers, __pyx_k_len_consumers, sizeof(__pyx_k_len_consumers), 0, 1, 0, 0},
  {&__pyx_n_s_limit, __pyx_k_limit, sizeof(__pyx_k_limit), 0, 0, 1, 1},
  {&__pyx_n_s_loads, __pyx_k_loads, sizeof(__pyx_k_loads), 0, 0, 1, 1},
  {&__pyx_n_s_logging, __pyx_k_logging, sizeof(__pyx_k_logging), 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_u_main_input_coder, __pyx_k_main_input_coder, sizeof(__pyx_k_main_input_coder), 0, 1, 0, 1},
  {&__pyx_n_u_main_input_tag, __pyx_k_main_input_tag, sizeof(__pyx_k_main_input_tag), 0, 1, 0, 1},
  {&__pyx_n_s_map_task, __pyx_k_map_task, sizeof(__pyx_k_map_task), 0, 0, 1, 1},
  {&__pyx_n_s_map_task_2, __pyx_k_map_task_2, sizeof(__pyx_k_map_task_2), 0, 0, 1, 1},
  {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1},
  {&__pyx_n_s_max_size, __pyx_k_max_size, sizeof(__pyx_k_max_size), 0, 0, 1, 1},
  {&__pyx_n_s_max_timestamp, __pyx_k_max_timestamp, sizeof(__pyx_k_max_timestamp), 0, 0, 1, 1},
  {&__pyx_n_s_mean, __pyx_k_mean, sizeof(__pyx_k_mean), 0, 0, 1, 1},
  {&__pyx_n_s_mean_byte_counter, __pyx_k_mean_byte_counter, sizeof(__pyx_k_mean_byte_counter), 0, 0, 1, 1},
  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
  {&__pyx_n_s_metrics_container, __pyx_k_metrics_container, sizeof(__pyx_k_metrics_container), 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_metrics_pb2, __pyx_k_metrics_pb2, sizeof(__pyx_k_metrics_pb2), 0, 0, 1, 1},
  {&__pyx_n_s_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1},
  {&__pyx_n_s_missing, __pyx_k_missing, sizeof(__pyx_k_missing), 0, 0, 1, 1},
  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
  {&__pyx_n_s_monitoring_infos, __pyx_k_monitoring_infos, sizeof(__pyx_k_monitoring_infos), 0, 0, 1, 1},
  {&__pyx_kp_u_must_be_rebatched_from_type, __pyx_k_must_be_rebatched_from_type, sizeof(__pyx_k_must_be_rebatched_from_type), 0, 1, 0, 0},
  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
  {&__pyx_n_s_name_context, __pyx_k_name_context, sizeof(__pyx_k_name_context), 0, 0, 1, 1},
  {&__pyx_n_s_name_contexts, __pyx_k_name_contexts, sizeof(__pyx_k_name_contexts), 0, 0, 1, 1},
  {&__pyx_n_s_needs_finalization, __pyx_k_needs_finalization, sizeof(__pyx_k_needs_finalization), 0, 0, 1, 1},
  {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
  {&__pyx_n_s_o, __pyx_k_o, sizeof(__pyx_k_o), 0, 0, 1, 1},
  {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
  {&__pyx_n_u_once, __pyx_k_once, sizeof(__pyx_k_once), 0, 1, 0, 1},
  {&__pyx_n_s_op, __pyx_k_op, sizeof(__pyx_k_op), 0, 0, 1, 1},
  {&__pyx_n_s_opcounter, __pyx_k_opcounter, sizeof(__pyx_k_opcounter), 0, 0, 1, 1},
  {&__pyx_n_s_opcounters, __pyx_k_opcounters, sizeof(__pyx_k_opcounters), 0, 0, 1, 1},
  {&__pyx_n_s_operation, __pyx_k_operation, sizeof(__pyx_k_operation), 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_operation_specs, __pyx_k_operation_specs, sizeof(__pyx_k_operation_specs), 0, 0, 1, 1},
  {&__pyx_n_s_operations, __pyx_k_operations, sizeof(__pyx_k_operations), 0, 0, 1, 1},
  {&__pyx_n_s_ops, __pyx_k_ops, sizeof(__pyx_k_ops), 0, 0, 1, 1},
  {&__pyx_kp_u_out, __pyx_k_out, sizeof(__pyx_k_out), 0, 1, 0, 0},
  {&__pyx_n_s_output, __pyx_k_output, sizeof(__pyx_k_output), 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_buffer, __pyx_k_output_buffer, sizeof(__pyx_k_output_buffer), 0, 0, 1, 1},
  {&__pyx_n_s_output_coder, __pyx_k_output_coder, sizeof(__pyx_k_output_coder), 0, 0, 1, 1},
  {&__pyx_n_s_output_coders, __pyx_k_output_coders, sizeof(__pyx_k_output_coders), 0, 0, 1, 1},
  {&__pyx_n_u_output_coders, __pyx_k_output_coders, sizeof(__pyx_k_output_coders), 0, 1, 0, 1},
  {&__pyx_n_s_output_index, __pyx_k_output_index, sizeof(__pyx_k_output_index), 0, 0, 1, 1},
  {&__pyx_n_s_output_key, __pyx_k_output_key, sizeof(__pyx_k_output_key), 0, 0, 1, 1},
  {&__pyx_n_s_output_num, __pyx_k_output_num, sizeof(__pyx_k_output_num), 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_tags, __pyx_k_output_tags, sizeof(__pyx_k_output_tags), 0, 0, 1, 1},
  {&__pyx_n_s_output_value, __pyx_k_output_value, sizeof(__pyx_k_output_value), 0, 0, 1, 1},
  {&__pyx_n_u_outputs, __pyx_k_outputs, sizeof(__pyx_k_outputs), 0, 1, 0, 1},
  {&__pyx_n_s_paneinfo, __pyx_k_paneinfo, sizeof(__pyx_k_paneinfo), 0, 0, 1, 1},
  {&__pyx_n_s_payload, __pyx_k_payload, sizeof(__pyx_k_payload), 0, 0, 1, 1},
  {&__pyx_n_s_pcollection, __pyx_k_pcollection, sizeof(__pyx_k_pcollection), 0, 0, 1, 1},
  {&__pyx_n_s_pcollection_count_monitoring_inf, __pyx_k_pcollection_count_monitoring_inf, sizeof(__pyx_k_pcollection_count_monitoring_inf), 0, 0, 1, 1},
  {&__pyx_n_s_phase, __pyx_k_phase, sizeof(__pyx_k_phase), 0, 0, 1, 1},
  {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
  {&__pyx_n_s_pickler, __pyx_k_pickler, sizeof(__pyx_k_pickler), 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_printable_fields, __pyx_k_printable_fields, sizeof(__pyx_k_printable_fields), 0, 0, 1, 1},
  {&__pyx_n_s_printable_name, __pyx_k_printable_name, sizeof(__pyx_k_printable_name), 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_s_process_batch_defined, __pyx_k_process_batch_defined, sizeof(__pyx_k_process_batch_defined), 0, 0, 1, 1},
  {&__pyx_n_s_process_defined, __pyx_k_process_defined, sizeof(__pyx_k_process_defined), 0, 0, 1, 1},
  {&__pyx_n_s_process_timer, __pyx_k_process_timer, sizeof(__pyx_k_process_timer), 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_produce_batch, __pyx_k_produce_batch, sizeof(__pyx_k_produce_batch), 0, 0, 1, 1},
  {&__pyx_n_s_produce_fn, __pyx_k_produce_fn, sizeof(__pyx_k_produce_fn), 0, 0, 1, 1},
  {&__pyx_n_s_producer, __pyx_k_producer, sizeof(__pyx_k_producer), 0, 0, 1, 1},
  {&__pyx_n_s_producer_batch_converter, __pyx_k_producer_batch_converter, sizeof(__pyx_k_producer_batch_converter), 0, 0, 1, 1},
  {&__pyx_n_s_producer_type_hints, __pyx_k_producer_type_hints, sizeof(__pyx_k_producer_type_hints), 0, 0, 1, 1},
  {&__pyx_n_s_progress, __pyx_k_progress, sizeof(__pyx_k_progress), 0, 0, 1, 1},
  {&__pyx_n_s_ptransform, __pyx_k_ptransform, sizeof(__pyx_k_ptransform), 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_CombineOperation, __pyx_k_pyx_unpickle_CombineOperation, sizeof(__pyx_k_pyx_unpickle_CombineOperation), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_ConsumerSet, __pyx_k_pyx_unpickle_ConsumerSet, sizeof(__pyx_k_pyx_unpickle_ConsumerSet), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_DoOperation, __pyx_k_pyx_unpickle_DoOperation, sizeof(__pyx_k_pyx_unpickle_DoOperation), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_FlattenOperation, __pyx_k_pyx_unpickle_FlattenOperation, sizeof(__pyx_k_pyx_unpickle_FlattenOperation), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_GeneralPurposeCon, __pyx_k_pyx_unpickle_GeneralPurposeCon, sizeof(__pyx_k_pyx_unpickle_GeneralPurposeCon), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_ImpulseReadOperat, __pyx_k_pyx_unpickle_ImpulseReadOperat, sizeof(__pyx_k_pyx_unpickle_ImpulseReadOperat), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_Operation, __pyx_k_pyx_unpickle_Operation, sizeof(__pyx_k_pyx_unpickle_Operation), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_PGBKCVOperation, __pyx_k_pyx_unpickle_PGBKCVOperation, sizeof(__pyx_k_pyx_unpickle_PGBKCVOperation), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_ReadOperation, __pyx_k_pyx_unpickle_ReadOperation, sizeof(__pyx_k_pyx_unpickle_ReadOperation), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_SdfProcessSizedEl, __pyx_k_pyx_unpickle_SdfProcessSizedEl, sizeof(__pyx_k_pyx_unpickle_SdfProcessSizedEl), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_SdfTruncateSizedR, __pyx_k_pyx_unpickle_SdfTruncateSizedR, sizeof(__pyx_k_pyx_unpickle_SdfTruncateSizedR), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_SingletonElementC, __pyx_k_pyx_unpickle_SingletonElementC, sizeof(__pyx_k_pyx_unpickle_SingletonElementC), 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_read, __pyx_k_read, sizeof(__pyx_k_read), 0, 0, 1, 1},
  {&__pyx_n_s_read_counter, __pyx_k_read_counter, sizeof(__pyx_k_read_counter), 0, 0, 1, 1},
  {&__pyx_n_s_read_side_inputs, __pyx_k_read_side_inputs, sizeof(__pyx_k_read_side_inputs), 0, 0, 1, 1},
  {&__pyx_n_s_read_side_inputs_locals_lambda, __pyx_k_read_side_inputs_locals_lambda, sizeof(__pyx_k_read_side_inputs_locals_lambda), 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_receiver, __pyx_k_receiver, sizeof(__pyx_k_receiver), 0, 0, 1, 1},
  {&__pyx_n_u_receivers, __pyx_k_receivers, sizeof(__pyx_k_receivers), 0, 1, 0, 1},
  {&__pyx_kp_u_receivers_s, __pyx_k_receivers_s, sizeof(__pyx_k_receivers_s), 0, 1, 0, 0},
  {&__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_work, __pyx_k_remaining_work, sizeof(__pyx_k_remaining_work), 0, 0, 1, 1},
  {&__pyx_n_s_reset, __pyx_k_reset, sizeof(__pyx_k_reset), 0, 0, 1, 1},
  {&__pyx_n_s_residual, __pyx_k_residual, sizeof(__pyx_k_residual), 0, 0, 1, 1},
  {&__pyx_n_s_residuals, __pyx_k_residuals, sizeof(__pyx_k_residuals), 0, 0, 1, 1},
  {&__pyx_n_s_restart_sampling, __pyx_k_restart_sampling, sizeof(__pyx_k_restart_sampling), 0, 0, 1, 1},
  {&__pyx_n_s_return, __pyx_k_return, sizeof(__pyx_k_return), 0, 0, 1, 1},
  {&__pyx_n_s_reversed, __pyx_k_reversed, sizeof(__pyx_k_reversed), 0, 0, 1, 1},
  {&__pyx_n_s_runtime_output_constraints, __pyx_k_runtime_output_constraints, sizeof(__pyx_k_runtime_output_constraints), 0, 0, 1, 1},
  {&__pyx_n_u_runtime_output_constraints, __pyx_k_runtime_output_constraints, sizeof(__pyx_k_runtime_output_constraints), 0, 1, 0, 1},
  {&__pyx_kp_u_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 1, 0, 0},
  {&__pyx_kp_u_s_2, __pyx_k_s_2, sizeof(__pyx_k_s_2), 0, 1, 0, 0},
  {&__pyx_n_s_sampled_msecs_int, __pyx_k_sampled_msecs_int, sizeof(__pyx_k_sampled_msecs_int), 0, 0, 1, 1},
  {&__pyx_n_s_sampler, __pyx_k_sampler, sizeof(__pyx_k_sampler), 0, 0, 1, 1},
  {&__pyx_n_s_sampler_for_output, __pyx_k_sampler_for_output, sizeof(__pyx_k_sampler_for_output), 0, 0, 1, 1},
  {&__pyx_n_s_scoped_process_state, __pyx_k_scoped_process_state, sizeof(__pyx_k_scoped_process_state), 0, 0, 1, 1},
  {&__pyx_n_s_scoped_state, __pyx_k_scoped_state, sizeof(__pyx_k_scoped_state), 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_serialized_fn, __pyx_k_serialized_fn, sizeof(__pyx_k_serialized_fn), 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_s_setup_locals_get_output_sampler, __pyx_k_setup_locals_get_output_sampler, sizeof(__pyx_k_setup_locals_get_output_sampler), 0, 0, 1, 1},
  {&__pyx_n_s_shuffle_sink, __pyx_k_shuffle_sink, sizeof(__pyx_k_shuffle_sink), 0, 0, 1, 1},
  {&__pyx_n_s_shuffle_source, __pyx_k_shuffle_source, sizeof(__pyx_k_shuffle_source), 0, 0, 1, 1},
  {&__pyx_n_s_si, __pyx_k_si, sizeof(__pyx_k_si), 0, 0, 1, 1},
  {&__pyx_n_s_si_counter, __pyx_k_si_counter, sizeof(__pyx_k_si_counter), 0, 0, 1, 1},
  {&__pyx_kp_u_side_input, __pyx_k_side_input, sizeof(__pyx_k_side_input), 0, 1, 0, 0},
  {&__pyx_n_s_side_input_map, __pyx_k_side_input_map, sizeof(__pyx_k_side_input_map), 0, 0, 1, 1},
  {&__pyx_n_s_side_input_maps, __pyx_k_side_input_maps, sizeof(__pyx_k_side_input_maps), 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_side_tag, __pyx_k_side_tag, sizeof(__pyx_k_side_tag), 0, 0, 1, 1},
  {&__pyx_n_s_sideinputs, __pyx_k_sideinputs, sizeof(__pyx_k_sideinputs), 0, 0, 1, 1},
  {&__pyx_n_s_simplefilter, __pyx_k_simplefilter, sizeof(__pyx_k_simplefilter), 0, 0, 1, 1},
  {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
  {&__pyx_n_s_source, __pyx_k_source, sizeof(__pyx_k_source), 0, 0, 1, 1},
  {&__pyx_n_s_sources, __pyx_k_sources, sizeof(__pyx_k_sources), 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_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
  {&__pyx_n_u_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 1, 0, 1},
  {&__pyx_n_s_start_position, __pyx_k_start_position, sizeof(__pyx_k_start_position), 0, 0, 1, 1},
  {&__pyx_n_s_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1},
  {&__pyx_n_s_state_sampler, __pyx_k_state_sampler, sizeof(__pyx_k_state_sampler), 0, 0, 1, 1},
  {&__pyx_n_s_state_sampler_2, __pyx_k_state_sampler_2, sizeof(__pyx_k_state_sampler_2), 0, 0, 1, 1},
  {&__pyx_n_s_staticmethod, __pyx_k_staticmethod, sizeof(__pyx_k_staticmethod), 0, 0, 1, 1},
  {&__pyx_n_s_step_name, __pyx_k_step_name, sizeof(__pyx_k_step_name), 0, 0, 1, 1},
  {&__pyx_n_u_step_name, __pyx_k_step_name, sizeof(__pyx_k_step_name), 0, 1, 0, 1},
  {&__pyx_n_s_step_name_2, __pyx_k_step_name_2, sizeof(__pyx_k_step_name_2), 0, 0, 1, 1},
  {&__pyx_n_s_stop_position, __pyx_k_stop_position, sizeof(__pyx_k_stop_position), 0, 0, 1, 1},
  {&__pyx_n_s_str_internal, __pyx_k_str_internal, sizeof(__pyx_k_str_internal), 0, 0, 1, 1},
  {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
  {&__pyx_n_s_suffix, __pyx_k_suffix, sizeof(__pyx_k_suffix), 0, 0, 1, 1},
  {&__pyx_n_s_sum, __pyx_k_sum, sizeof(__pyx_k_sum), 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_table, __pyx_k_table, sizeof(__pyx_k_table), 0, 0, 1, 1},
  {&__pyx_n_s_tag, __pyx_k_tag, sizeof(__pyx_k_tag), 0, 0, 1, 1},
  {&__pyx_n_s_tag_to_pcollection_id, __pyx_k_tag_to_pcollection_id, sizeof(__pyx_k_tag_to_pcollection_id), 0, 0, 1, 1},
  {&__pyx_n_s_tagged_receivers, __pyx_k_tagged_receivers, sizeof(__pyx_k_tagged_receivers), 0, 0, 1, 1},
  {&__pyx_n_s_tags_and_types, __pyx_k_tags_and_types, sizeof(__pyx_k_tags_and_types), 0, 0, 1, 1},
  {&__pyx_n_s_target, __pyx_k_target, sizeof(__pyx_k_target), 0, 0, 1, 1},
  {&__pyx_n_s_teardown, __pyx_k_teardown, sizeof(__pyx_k_teardown), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_n_s_test_shuffle_sink, __pyx_k_test_shuffle_sink, sizeof(__pyx_k_test_shuffle_sink), 0, 0, 1, 1},
  {&__pyx_n_s_test_shuffle_sink_2, __pyx_k_test_shuffle_sink_2, sizeof(__pyx_k_test_shuffle_sink_2), 0, 0, 1, 1},
  {&__pyx_n_s_test_shuffle_source, __pyx_k_test_shuffle_source, sizeof(__pyx_k_test_shuffle_source), 0, 0, 1, 1},
  {&__pyx_n_s_test_shuffle_source_2, __pyx_k_test_shuffle_source_2, sizeof(__pyx_k_test_shuffle_source_2), 0, 0, 1, 1},
  {&__pyx_n_s_threading, __pyx_k_threading, sizeof(__pyx_k_threading), 0, 0, 1, 1},
  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
  {&__pyx_n_s_timer_data, __pyx_k_timer_data, sizeof(__pyx_k_timer_data), 0, 0, 1, 1},
  {&__pyx_n_s_timer_family_id, __pyx_k_timer_family_id, sizeof(__pyx_k_timer_family_id), 0, 0, 1, 1},
  {&__pyx_n_s_timer_info, __pyx_k_timer_info, sizeof(__pyx_k_timer_info), 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_combiner, __pyx_k_timestamp_combiner, sizeof(__pyx_k_timestamp_combiner), 0, 0, 1, 1},
  {&__pyx_kp_u_to, __pyx_k_to, sizeof(__pyx_k_to), 0, 1, 0, 0},
  {&__pyx_n_s_to_key, __pyx_k_to_key, sizeof(__pyx_k_to_key), 0, 0, 1, 1},
  {&__pyx_n_s_to_runner_api_monitoring_infos, __pyx_k_to_runner_api_monitoring_infos, sizeof(__pyx_k_to_runner_api_monitoring_infos), 0, 0, 1, 1},
  {&__pyx_n_s_total, __pyx_k_total, sizeof(__pyx_k_total), 0, 0, 1, 1},
  {&__pyx_n_s_total_output_bytes, __pyx_k_total_output_bytes, sizeof(__pyx_k_total_output_bytes), 0, 0, 1, 1},
  {&__pyx_n_s_transform_id, __pyx_k_transform_id, sizeof(__pyx_k_transform_id), 0, 0, 1, 1},
  {&__pyx_n_u_transform_id, __pyx_k_transform_id, sizeof(__pyx_k_transform_id), 0, 1, 0, 1},
  {&__pyx_n_s_try_split, __pyx_k_try_split, sizeof(__pyx_k_try_split), 0, 0, 1, 1},
  {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1},
  {&__pyx_n_s_typing, __pyx_k_typing, sizeof(__pyx_k_typing), 0, 0, 1, 1},
  {&__pyx_n_s_unused_impulse, __pyx_k_unused_impulse, sizeof(__pyx_k_unused_impulse), 0, 0, 1, 1},
  {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
  {&__pyx_n_s_update_counters_batch, __pyx_k_update_counters_batch, sizeof(__pyx_k_update_counters_batch), 0, 0, 1, 1},
  {&__pyx_n_s_update_counters_finish, __pyx_k_update_counters_finish, sizeof(__pyx_k_update_counters_finish), 0, 0, 1, 1},
  {&__pyx_n_s_update_counters_start, __pyx_k_update_counters_start, sizeof(__pyx_k_update_counters_start), 0, 0, 1, 1},
  {&__pyx_n_s_urn, __pyx_k_urn, sizeof(__pyx_k_urn), 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_key, __pyx_k_user_key, sizeof(__pyx_k_user_key), 0, 0, 1, 1},
  {&__pyx_n_s_user_monitoring_infos, __pyx_k_user_monitoring_infos, sizeof(__pyx_k_user_monitoring_infos), 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_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1},
  {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
  {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
  {&__pyx_n_s_view_class, __pyx_k_view_class, sizeof(__pyx_k_view_class), 0, 0, 1, 1},
  {&__pyx_n_s_view_options, __pyx_k_view_options, sizeof(__pyx_k_view_options), 0, 0, 1, 1},
  {&__pyx_n_s_vs, __pyx_k_vs, sizeof(__pyx_k_vs), 0, 0, 1, 1},
  {&__pyx_n_s_warn, __pyx_k_warn, sizeof(__pyx_k_warn), 0, 0, 1, 1},
  {&__pyx_kp_s_warning_to_indicate_an_inefficie, __pyx_k_warning_to_indicate_an_inefficie, sizeof(__pyx_k_warning_to_indicate_an_inefficie), 0, 0, 1, 0},
  {&__pyx_n_s_warnings, __pyx_k_warnings, sizeof(__pyx_k_warnings), 0, 0, 1, 1},
  {&__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_windowed_batch, __pyx_k_windowed_batch, sizeof(__pyx_k_windowed_batch), 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_n_s_with_completed, __pyx_k_with_completed, sizeof(__pyx_k_with_completed), 0, 0, 1, 1},
  {&__pyx_n_s_wkey, __pyx_k_wkey, sizeof(__pyx_k_wkey), 0, 0, 1, 1},
  {&__pyx_n_s_wkv, __pyx_k_wkv, sizeof(__pyx_k_wkv), 0, 0, 1, 1},
  {&__pyx_n_s_worker_printable_fields, __pyx_k_worker_printable_fields, sizeof(__pyx_k_worker_printable_fields), 0, 0, 1, 1},
  {&__pyx_n_s_write_windowed_values, __pyx_k_write_windowed_values, sizeof(__pyx_k_write_windowed_values), 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_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 80, __pyx_L1_error)
  __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 82, __pyx_L1_error)
  __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 120, __pyx_L1_error)
  __pyx_builtin_RuntimeWarning = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeWarning); if (!__pyx_builtin_RuntimeWarning) __PYX_ERR(0, 1524, __pyx_L1_error)
  __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 253, __pyx_L1_error)
  __pyx_builtin_AssertionError = __Pyx_GetBuiltinName(__pyx_n_s_AssertionError); if (!__pyx_builtin_AssertionError) __PYX_ERR(0, 270, __pyx_L1_error)
  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 496, __pyx_L1_error)
  __pyx_builtin_filter = __Pyx_GetBuiltinName(__pyx_n_s_filter); if (!__pyx_builtin_filter) __PYX_ERR(0, 854, __pyx_L1_error)
  __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 856, __pyx_L1_error)
  __pyx_builtin_min = __Pyx_GetBuiltinName(__pyx_n_s_min); if (!__pyx_builtin_min) __PYX_ERR(0, 1268, __pyx_L1_error)
  __pyx_builtin_max = __Pyx_GetBuiltinName(__pyx_n_s_max); if (!__pyx_builtin_max) __PYX_ERR(0, 1268, __pyx_L1_error)
  __pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_n_s_sum); if (!__pyx_builtin_sum) __PYX_ERR(0, 1268, __pyx_L1_error)
  __pyx_builtin_reversed = __Pyx_GetBuiltinName(__pyx_n_s_reversed); if (!__pyx_builtin_reversed) __PYX_ERR(0, 1301, __pyx_L1_error)
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 1435, __pyx_L1_error)
  __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 1495, __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/worker/operations.py":270
 * 
 *   def receive_batch(self, windowed_batch):
 *     raise AssertionError(             # <<<<<<<<<<<<<<
 *         "SingletonElementConsumerSet.receive_batch is not implemented")
 * 
 */
  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_u_SingletonElementConsumerSet_rece); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__15);
  __Pyx_GIVEREF(__pyx_tuple__15);

  /* "apache_beam/runners/worker/operations.py":481
 *       if getattr(self.spec, 'output_coders', None):
 * 
 *         def get_output_sampler(output_num):             # <<<<<<<<<<<<<<
 *           if data_sampler is None:
 *             return None
 */
  __pyx_tuple__27 = PyTuple_Pack(1, __pyx_n_s_output_num); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__27);
  __Pyx_GIVEREF(__pyx_tuple__27);
  __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__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_get_output_sampler, 481, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 481, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":470
 * 
 *     This must be called before any other methods of the operation."""
 *     with self.scoped_start_state:             # <<<<<<<<<<<<<<
 *       self.data_sampler = data_sampler
 *       self.debug_logging_enabled = logging.getLogger().isEnabledFor(
 */
  __pyx_tuple__29 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__29);
  __Pyx_GIVEREF(__pyx_tuple__29);

  /* "apache_beam/runners/worker/operations.py":746
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:
 *       range_tracker = self.source.get_range_tracker(None, None)             # <<<<<<<<<<<<<<
 *       for value in self.source.read(range_tracker):
 *         if isinstance(value, WindowedValue):
 */
  __pyx_tuple__61 = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__61);
  __Pyx_GIVEREF(__pyx_tuple__61);

  /* "apache_beam/runners/worker/operations.py":1149
 *     # and therefore the code to handle the extra args/kwargs is simpler than for
 *     # the DoFn's of ParDo.
 *     fn, args, kwargs = pickler.loads(self.spec.serialized_fn)[:3]             # <<<<<<<<<<<<<<
 *     self.phased_combine_fn = (
 *         PhasedCombineFnExecutor(self.spec.phase, fn, args, kwargs))
 */
  __pyx_slice__97 = PySlice_New(Py_None, __pyx_int_3, Py_None); if (unlikely(!__pyx_slice__97)) __PYX_ERR(0, 1149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__97);
  __Pyx_GIVEREF(__pyx_slice__97);

  /* "apache_beam/runners/worker/operations.py":1477
 *   def operations(self):
 *     # type: () -> List[Operation]
 *     return self._ops[:]             # <<<<<<<<<<<<<<
 * 
 *   def execute(self):
 */
  __pyx_slice__122 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__122)) __PYX_ERR(0, 1477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__122);
  __Pyx_GIVEREF(__pyx_slice__122);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x94398cf, 0xdda7ffa, 0xb6f3513):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x94398cf, 0xdda7ffa, 0xb6f3513) = (coder, consumers, element_sampler, execution_context, opcounter, output_index, output_sampler, step_name))" % __pyx_checksum)
 */
  __pyx_tuple__125 = PyTuple_Pack(3, __pyx_int_155424975, __pyx_int_232423418, __pyx_int_191837459); if (unlikely(!__pyx_tuple__125)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__125);
  __Pyx_GIVEREF(__pyx_tuple__125);
  __pyx_tuple__127 = PyTuple_Pack(3, __pyx_int_160425100, __pyx_int_13052437, __pyx_int_138733249); if (unlikely(!__pyx_tuple__127)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__127);
  __Pyx_GIVEREF(__pyx_tuple__127);
  __pyx_tuple__129 = PyTuple_Pack(3, __pyx_int_53600133, __pyx_int_267513676, __pyx_int_44220925); if (unlikely(!__pyx_tuple__129)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__129);
  __Pyx_GIVEREF(__pyx_tuple__129);
  __pyx_tuple__131 = PyTuple_Pack(3, __pyx_int_191601960, __pyx_int_54202627, __pyx_int_15694960); if (unlikely(!__pyx_tuple__131)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__131);
  __Pyx_GIVEREF(__pyx_tuple__131);
  __pyx_tuple__134 = PyTuple_Pack(3, __pyx_int_35037786, __pyx_int_157929342, __pyx_int_86866479); if (unlikely(!__pyx_tuple__134)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__134);
  __Pyx_GIVEREF(__pyx_tuple__134);
  __pyx_tuple__136 = PyTuple_Pack(3, __pyx_int_86082411, __pyx_int_210856725, __pyx_int_241484073); if (unlikely(!__pyx_tuple__136)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__136);
  __Pyx_GIVEREF(__pyx_tuple__136);
  __pyx_tuple__139 = PyTuple_Pack(3, __pyx_int_147096570, __pyx_int_129208062, __pyx_int_196990909); if (unlikely(!__pyx_tuple__139)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__139);
  __Pyx_GIVEREF(__pyx_tuple__139);
  __pyx_tuple__141 = PyTuple_Pack(3, __pyx_int_203215111, __pyx_int_136289111, __pyx_int_178449558); if (unlikely(!__pyx_tuple__141)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__141);
  __Pyx_GIVEREF(__pyx_tuple__141);
  __pyx_tuple__143 = PyTuple_Pack(3, __pyx_int_252235362, __pyx_int_106916135, __pyx_int_113750372); if (unlikely(!__pyx_tuple__143)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__143);
  __Pyx_GIVEREF(__pyx_tuple__143);

  /* "apache_beam/runners/worker/operations.py":87
 *   globals()['cython'] = FakeCython()
 * 
 * _globally_windowed_value = GlobalWindows.windowed_value(None)             # <<<<<<<<<<<<<<
 * _global_window_type = type(_globally_windowed_value.windows[0])
 * 
 */
  __pyx_tuple__145 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__145)) __PYX_ERR(0, 87, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__145);
  __Pyx_GIVEREF(__pyx_tuple__145);

  /* "apache_beam/runners/worker/operations.py":92
 * _LOGGER = logging.getLogger(__name__)
 * 
 * SdfSplitResultsPrimary = Tuple['DoOperation', 'SplitResultPrimary']             # <<<<<<<<<<<<<<
 * SdfSplitResultsResidual = Tuple['DoOperation', 'SplitResultResidual']
 * 
 */
  __pyx_tuple__146 = PyTuple_Pack(2, __pyx_n_u_DoOperation, __pyx_n_u_SplitResultPrimary); if (unlikely(!__pyx_tuple__146)) __PYX_ERR(0, 92, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__146);
  __Pyx_GIVEREF(__pyx_tuple__146);

  /* "apache_beam/runners/worker/operations.py":93
 * 
 * SdfSplitResultsPrimary = Tuple['DoOperation', 'SplitResultPrimary']
 * SdfSplitResultsResidual = Tuple['DoOperation', 'SplitResultResidual']             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_tuple__147 = PyTuple_Pack(2, __pyx_n_u_DoOperation, __pyx_n_u_SplitResultResidual); if (unlikely(!__pyx_tuple__147)) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__147);
  __Pyx_GIVEREF(__pyx_tuple__147);

  /* "apache_beam/runners/worker/operations.py":97
 * 
 * # TODO(BEAM-9324) Remove these workarounds once upgraded to Cython 3
 * def _cast_to_operation(value):             # <<<<<<<<<<<<<<
 *   if cython.compiled:
 *     return cython.cast(Operation, value)
 */
  __pyx_tuple__148 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__148)) __PYX_ERR(0, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__148);
  __Pyx_GIVEREF(__pyx_tuple__148);
  __pyx_codeobj_ = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__148, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_cast_to_operation, 97, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj_)) __PYX_ERR(0, 97, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":105
 * 
 * # TODO(BEAM-9324) Remove these workarounds once upgraded to Cython 3
 * def _cast_to_receiver(value):             # <<<<<<<<<<<<<<
 *   if cython.compiled:
 *     return cython.cast(Receiver, value)
 */
  __pyx_tuple__149 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__149)) __PYX_ERR(0, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__149);
  __Pyx_GIVEREF(__pyx_tuple__149);
  __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__149, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_cast_to_receiver, 105, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 105, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":121
 *   """
 *   @staticmethod
 *   def create(counter_factory,             # <<<<<<<<<<<<<<
 *              step_name,  # type: str
 *              output_index,
 */
  __pyx_tuple__150 = PyTuple_Pack(11, __pyx_n_s_counter_factory, __pyx_n_s_step_name, __pyx_n_s_output_index, __pyx_n_s_consumers, __pyx_n_s_coder, __pyx_n_s_producer_type_hints, __pyx_n_s_producer_batch_converter, __pyx_n_s_output_sampler, __pyx_n_s_consumer, __pyx_n_s_consumer_batch_preference, __pyx_n_s_consumer_batch_converter); if (unlikely(!__pyx_tuple__150)) __PYX_ERR(0, 121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__150);
  __Pyx_GIVEREF(__pyx_tuple__150);
  __pyx_codeobj__3 = (PyObject*)__Pyx_PyCode_New(8, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__150, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_create, 121, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__3)) __PYX_ERR(0, 121, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":185
 *     self.execution_context = None  # type: Optional[ExecutionContext]
 * 
 *   def try_split(self, fraction_of_remainder):             # <<<<<<<<<<<<<<
 *     # type: (...) -> Optional[Any]
 *     # TODO(SDF): Consider supporting splitting each consumer individually.
 */
  __pyx_tuple__151 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_fraction_of_remainder); if (unlikely(!__pyx_tuple__151)) __PYX_ERR(0, 185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__151);
  __Pyx_GIVEREF(__pyx_tuple__151);
  __pyx_codeobj__4 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__151, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_try_split, 185, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__4)) __PYX_ERR(0, 185, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":194
 *     return None
 * 
 *   def current_element_progress(self):             # <<<<<<<<<<<<<<
 *     # type: () -> Optional[iobase.RestrictionProgress]
 * 
 */
  __pyx_tuple__152 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__152)) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__152);
  __Pyx_GIVEREF(__pyx_tuple__152);
  __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__152, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_current_element_progress, 194, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__5)) __PYX_ERR(0, 194, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":206
 *     return None
 * 
 *   def update_counters_start(self, windowed_value):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     self.opcounter.update_from(windowed_value)
 */
  __pyx_tuple__153 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_windowed_value); if (unlikely(!__pyx_tuple__153)) __PYX_ERR(0, 206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__153);
  __Pyx_GIVEREF(__pyx_tuple__153);
  __pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__153, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_update_counters_start, 206, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(0, 206, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":224
 *         self.element_sampler.has_element = True
 * 
 *   def update_counters_finish(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     self.opcounter.update_collect()
 */
  __pyx_tuple__154 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__154)) __PYX_ERR(0, 224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__154);
  __Pyx_GIVEREF(__pyx_tuple__154);
  __pyx_codeobj__7 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_worker_opera_2, __pyx_n_s_update_counters_finish, 224, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__7)) __PYX_ERR(0, 224, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":228
 *     self.opcounter.update_collect()
 * 
 *   def update_counters_batch(self, windowed_batch):             # <<<<<<<<<<<<<<
 *     # type: (WindowedBatch) -> None
 *     self.opcounter.update_from_batch(windowed_batch)
 */
  __pyx_tuple__155 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_windowed_batch); if (unlikely(!__pyx_tuple__155)) __PYX_ERR(0, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__155);
  __Pyx_GIVEREF(__pyx_tuple__155);
  __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__155, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_update_counters_batch, 228, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 228, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__156 = 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__156)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__156);
  __Pyx_GIVEREF(__pyx_tuple__156);
  __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 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_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) __PYX_ERR(2, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_ConsumerSet, (type(self), 0x94398cf, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ConsumerSet__set_state(self, __pyx_state)
 */
  __pyx_tuple__157 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__157)) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__157);
  __Pyx_GIVEREF(__pyx_tuple__157);
  __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(2, 16, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":263
 *     self.consumer = consumer
 * 
 *   def receive(self, windowed_value):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     self.update_counters_start(windowed_value)
 */
  __pyx_tuple__158 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_windowed_value); if (unlikely(!__pyx_tuple__158)) __PYX_ERR(0, 263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__158);
  __Pyx_GIVEREF(__pyx_tuple__158);
  __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_worker_opera_2, __pyx_n_s_receive, 263, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(0, 263, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":269
 *     self.update_counters_finish()
 * 
 *   def receive_batch(self, windowed_batch):             # <<<<<<<<<<<<<<
 *     raise AssertionError(
 *         "SingletonElementConsumerSet.receive_batch is not implemented")
 */
  __pyx_tuple__159 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_windowed_batch); if (unlikely(!__pyx_tuple__159)) __PYX_ERR(0, 269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__159);
  __Pyx_GIVEREF(__pyx_tuple__159);
  __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__159, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_receive_batch, 269, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 269, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":273
 *         "SingletonElementConsumerSet.receive_batch is not implemented")
 * 
 *   def flush(self):             # <<<<<<<<<<<<<<
 *     # SingletonElementConsumerSet has no buffer to flush
 *     pass
 */
  __pyx_tuple__160 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__160)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__160);
  __Pyx_GIVEREF(__pyx_tuple__160);
  __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__160, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_flush, 273, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(0, 273, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":277
 *     pass
 * 
 *   def try_split(self, fraction_of_remainder):             # <<<<<<<<<<<<<<
 *     # type: (...) -> Optional[Any]
 *     return self.consumer.try_split(fraction_of_remainder)
 */
  __pyx_tuple__161 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_fraction_of_remainder); if (unlikely(!__pyx_tuple__161)) __PYX_ERR(0, 277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__161);
  __Pyx_GIVEREF(__pyx_tuple__161);
  __pyx_codeobj__17 = (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_worker_opera_2, __pyx_n_s_try_split, 277, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) __PYX_ERR(0, 277, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":281
 *     return self.consumer.try_split(fraction_of_remainder)
 * 
 *   def current_element_progress(self):             # <<<<<<<<<<<<<<
 *     return self.consumer.current_element_progress()
 * 
 */
  __pyx_tuple__162 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__162)) __PYX_ERR(0, 281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__162);
  __Pyx_GIVEREF(__pyx_tuple__162);
  __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__162, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_current_element_progress, 281, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(0, 281, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__163 = 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__163)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__163);
  __Pyx_GIVEREF(__pyx_tuple__163);
  __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 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_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(2, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_SingletonElementConsumerSet, (type(self), 0x98fe48c, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_SingletonElementConsumerSet__set_state(self, __pyx_state)
 */
  __pyx_tuple__164 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__164)) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__164);
  __Pyx_GIVEREF(__pyx_tuple__164);
  __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(2, 16, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":346
 *     self._batched_elements: List[Any] = []
 * 
 *   def receive(self, windowed_value):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 * 
 */
  __pyx_tuple__165 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_windowed_value); if (unlikely(!__pyx_tuple__165)) __PYX_ERR(0, 346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__165);
  __Pyx_GIVEREF(__pyx_tuple__165);
  __pyx_codeobj__21 = (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_apache_beam_runners_worker_opera_2, __pyx_n_s_receive, 346, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(0, 346, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":364
 *     self.update_counters_finish()
 * 
 *   def receive_batch(self, windowed_batch):             # <<<<<<<<<<<<<<
 *     if self.element_consumers:
 *       for wv in windowed_batch.as_windowed_values(
 */
  __pyx_tuple__166 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_windowed_batch); if (unlikely(!__pyx_tuple__166)) __PYX_ERR(0, 364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__166);
  __Pyx_GIVEREF(__pyx_tuple__166);
  __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_worker_opera_2, __pyx_n_s_receive_batch, 364, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 364, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":395
 *     self.update_counters_batch(windowed_batch)
 * 
 *   def flush(self):             # <<<<<<<<<<<<<<
 *     if not self.has_batch_consumers or not self._batched_elements:
 *       return
 */
  __pyx_tuple__167 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__167)) __PYX_ERR(0, 395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__167);
  __Pyx_GIVEREF(__pyx_tuple__167);
  __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_apache_beam_runners_worker_opera_2, __pyx_n_s_flush, 395, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(0, 395, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__168 = 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__168)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__168);
  __Pyx_GIVEREF(__pyx_tuple__168);
  __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 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_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(2, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_GeneralPurposeConsumerSet, (type(self), 0x331df85, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_GeneralPurposeConsumerSet__set_state(self, __pyx_state)
 */
  __pyx_tuple__169 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__169)) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__169);
  __Pyx_GIVEREF(__pyx_tuple__169);
  __pyx_codeobj__25 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__25)) __PYX_ERR(2, 16, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":464
 *     self.data_sampler: Optional[DataSampler] = None
 * 
 *   def setup(self, data_sampler=None):             # <<<<<<<<<<<<<<
 *     # type: (Optional[DataSampler]) -> None
 * 
 */
  __pyx_tuple__170 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_data_sampler, __pyx_n_s_transform_id, __pyx_n_s_get_output_sampler, __pyx_n_s_get_output_sampler, __pyx_n_s_i, __pyx_n_s_coder); if (unlikely(!__pyx_tuple__170)) __PYX_ERR(0, 464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__170);
  __Pyx_GIVEREF(__pyx_tuple__170);
  __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 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_worker_opera_2, __pyx_n_s_setup, 464, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 464, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":500
 *     self.setup_done = True
 * 
 *   def start(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 * 
 */
  __pyx_tuple__171 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__171)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__171);
  __Pyx_GIVEREF(__pyx_tuple__171);
  __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__171, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_start, 500, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 500, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":514
 *         receiver.execution_context = self.execution_context
 * 
 *   def get_batching_preference(self):             # <<<<<<<<<<<<<<
 *     # By default operations don't support batching, require Receiver to unbatch
 *     return common.BatchingPreference.BATCH_FORBIDDEN
 */
  __pyx_tuple__172 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__172)) __PYX_ERR(0, 514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__172);
  __Pyx_GIVEREF(__pyx_tuple__172);
  __pyx_codeobj__31 = (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_worker_opera_2, __pyx_n_s_get_batching_preference, 514, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(0, 514, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":518
 *     return common.BatchingPreference.BATCH_FORBIDDEN
 * 
 *   def get_input_batch_converter(self) -> Optional[BatchConverter]:             # <<<<<<<<<<<<<<
 *     """Returns a batch type converter if this operation can accept a batch,
 *     otherwise None."""
 */
  __pyx_tuple__173 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__173)) __PYX_ERR(0, 518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__173);
  __Pyx_GIVEREF(__pyx_tuple__173);
  __pyx_codeobj__32 = (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_worker_opera_2, __pyx_n_s_get_input_batch_converter, 518, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(0, 518, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":523
 *     return None
 * 
 *   def get_output_batch_converter(self) -> Optional[BatchConverter]:             # <<<<<<<<<<<<<<
 *     """Returns a batch type converter if this operation can produce a batch,
 *     otherwise None."""
 */
  __pyx_tuple__174 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__174)) __PYX_ERR(0, 523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__174);
  __Pyx_GIVEREF(__pyx_tuple__174);
  __pyx_codeobj__33 = (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_worker_opera_2, __pyx_n_s_get_output_batch_converter, 523, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 523, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":528
 *     return None
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 * 
 */
  __pyx_tuple__175 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_o); if (unlikely(!__pyx_tuple__175)) __PYX_ERR(0, 528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__175);
  __Pyx_GIVEREF(__pyx_tuple__175);
  __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__175, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_process, 528, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 528, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":534
 *     pass
 * 
 *   def process_batch(self, batch: WindowedBatch):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_tuple__176 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_batch); if (unlikely(!__pyx_tuple__176)) __PYX_ERR(0, 534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__176);
  __Pyx_GIVEREF(__pyx_tuple__176);
  __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_worker_opera_2, __pyx_n_s_process_batch, 534, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 534, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":537
 *     pass
 * 
 *   def finalize_bundle(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     pass
 */
  __pyx_tuple__177 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__177)) __PYX_ERR(0, 537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__177);
  __Pyx_GIVEREF(__pyx_tuple__177);
  __pyx_codeobj__36 = (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_worker_opera_2, __pyx_n_s_finalize_bundle, 537, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 537, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":541
 *     pass
 * 
 *   def needs_finalization(self):             # <<<<<<<<<<<<<<
 *     return False
 * 
 */
  __pyx_tuple__178 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__178)) __PYX_ERR(0, 541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__178);
  __Pyx_GIVEREF(__pyx_tuple__178);
  __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_worker_opera_2, __pyx_n_s_needs_finalization, 541, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 541, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":544
 *     return False
 * 
 *   def try_split(self, fraction_of_remainder):             # <<<<<<<<<<<<<<
 *     # type: (...) -> Optional[Any]
 *     return None
 */
  __pyx_tuple__179 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_fraction_of_remainder); if (unlikely(!__pyx_tuple__179)) __PYX_ERR(0, 544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__179);
  __Pyx_GIVEREF(__pyx_tuple__179);
  __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_worker_opera_2, __pyx_n_s_try_split, 544, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 544, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":548
 *     return None
 * 
 *   def current_element_progress(self):             # <<<<<<<<<<<<<<
 *     return None
 * 
 */
  __pyx_tuple__180 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__180)) __PYX_ERR(0, 548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__180);
  __Pyx_GIVEREF(__pyx_tuple__180);
  __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__180, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_current_element_progress, 548, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 548, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":551
 *     return None
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 * 
 */
  __pyx_tuple__181 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__181)) __PYX_ERR(0, 551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__181);
  __Pyx_GIVEREF(__pyx_tuple__181);
  __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__181, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_finish, 551, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 551, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":558
 *       _cast_to_receiver(receiver).flush()
 * 
 *   def teardown(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 * 
 */
  __pyx_tuple__182 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__182)) __PYX_ERR(0, 558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__182);
  __Pyx_GIVEREF(__pyx_tuple__182);
  __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__182, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_teardown, 558, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 558, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":566
 *     pass
 * 
 *   def reset(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     self.metrics_container.reset()
 */
  __pyx_tuple__183 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__183)) __PYX_ERR(0, 566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__183);
  __Pyx_GIVEREF(__pyx_tuple__183);
  __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__183, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_reset, 566, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 566, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":570
 *     self.metrics_container.reset()
 * 
 *   def output(self, windowed_value, output_index=0):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue, int) -> None
 *     _cast_to_receiver(self.receivers[output_index]).receive(windowed_value)
 */
  __pyx_tuple__184 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_windowed_value, __pyx_n_s_output_index); if (unlikely(!__pyx_tuple__184)) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__184);
  __Pyx_GIVEREF(__pyx_tuple__184);
  __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__184, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_output, 570, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 570, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":574
 *     _cast_to_receiver(self.receivers[output_index]).receive(windowed_value)
 * 
 *   def add_receiver(self, operation, output_index=0):             # <<<<<<<<<<<<<<
 *     # type: (Operation, int) -> None
 * 
 */
  __pyx_tuple__185 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_operation, __pyx_n_s_output_index); if (unlikely(!__pyx_tuple__185)) __PYX_ERR(0, 574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__185);
  __Pyx_GIVEREF(__pyx_tuple__185);
  __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(3, 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_worker_opera_2, __pyx_n_s_add_receiver, 574, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 574, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":580
 *     self.consumers[output_index].append(operation)
 * 
 *   def monitoring_infos(self, transform_id, tag_to_pcollection_id):             # <<<<<<<<<<<<<<
 *     # type: (str, Dict[str, str]) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo]
 * 
 */
  __pyx_tuple__186 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_transform_id, __pyx_n_s_tag_to_pcollection_id); if (unlikely(!__pyx_tuple__186)) __PYX_ERR(0, 580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__186);
  __Pyx_GIVEREF(__pyx_tuple__186);
  __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__186, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_monitoring_infos, 580, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 580, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":590
 *     return all_monitoring_infos
 * 
 *   def pcollection_count_monitoring_infos(self, tag_to_pcollection_id):             # <<<<<<<<<<<<<<
 *     # type: (Dict[str, str]) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo]
 * 
 */
  __pyx_tuple__187 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_tag_to_pcollection_id); if (unlikely(!__pyx_tuple__187)) __PYX_ERR(0, 590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__187);
  __Pyx_GIVEREF(__pyx_tuple__187);
  __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__187, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_pcollection_count_monitoring_inf, 590, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 590, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":624
 *     return all_monitoring_infos
 * 
 *   def user_monitoring_infos(self, transform_id):             # <<<<<<<<<<<<<<
 *     # type: (str) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo]
 * 
 */
  __pyx_tuple__188 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_transform_id); if (unlikely(!__pyx_tuple__188)) __PYX_ERR(0, 624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__188);
  __Pyx_GIVEREF(__pyx_tuple__188);
  __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__188, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_user_monitoring_infos, 624, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(0, 624, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":630
 *     return self.metrics_container.to_runner_api_monitoring_infos(transform_id)
 * 
 *   def execution_time_monitoring_infos(self, transform_id):             # <<<<<<<<<<<<<<
 *     # type: (str) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo]
 *     total_time_spent_msecs = (
 */
  __pyx_tuple__189 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_transform_id); if (unlikely(!__pyx_tuple__189)) __PYX_ERR(0, 630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__189);
  __Pyx_GIVEREF(__pyx_tuple__189);
  __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_worker_opera_2, __pyx_n_s_execution_time_monitoring_infos, 630, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 630, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":669
 *     return self.str_internal()
 * 
 *   def str_internal(self, is_recursive=False):             # <<<<<<<<<<<<<<
 *     """Internal helper for __str__ that supports recursion.
 * 
 */
  __pyx_tuple__190 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_is_recursive, __pyx_n_s_printable_name, __pyx_n_s_printable_fields, __pyx_n_s_receiver); if (unlikely(!__pyx_tuple__190)) __PYX_ERR(0, 669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__190);
  __Pyx_GIVEREF(__pyx_tuple__190);
  __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 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_worker_opera_2, __pyx_n_s_str_internal, 669, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(0, 669, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":697
 *     return '<%s %s>' % (printable_name, ', '.join(printable_fields))
 * 
 *   def _get_runtime_performance_hints(self):             # <<<<<<<<<<<<<<
 *     # type: () -> Optional[Dict[Optional[str], Tuple[Optional[str], Any]]]
 * 
 */
  __pyx_tuple__191 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__191)) __PYX_ERR(0, 697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__191);
  __Pyx_GIVEREF(__pyx_tuple__191);
  __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_worker_opera_2, __pyx_n_s_get_runtime_performance_hints, 697, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 697, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__192 = 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__192)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__192);
  __Pyx_GIVEREF(__pyx_tuple__192);
  __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 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_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(2, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Operation, (type(self), 0xb6b9d28, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Operation__set_state(self, __pyx_state)
 */
  __pyx_tuple__193 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__193)) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__193);
  __Pyx_GIVEREF(__pyx_tuple__193);
  __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(2, 16, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":706
 * 
 * class ReadOperation(Operation):
 *   def start(self):             # <<<<<<<<<<<<<<
 *     with self.scoped_start_state:
 *       super(ReadOperation, self).start()
 */
  __pyx_tuple__194 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__194)) __PYX_ERR(0, 706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__194);
  __Pyx_GIVEREF(__pyx_tuple__194);
  __pyx_codeobj__57 = (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_worker_opera_2, __pyx_n_s_start, 706, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(0, 706, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__195 = 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__195)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__195);
  __Pyx_GIVEREF(__pyx_tuple__195);
  __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 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_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(2, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_ReadOperation, (type(self), 0xb6b9d28, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ReadOperation__set_state(self, __pyx_state)
 */
  __pyx_tuple__196 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__196)) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__196);
  __Pyx_GIVEREF(__pyx_tuple__196);
  __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__59)) __PYX_ERR(2, 16, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":743
 *     ]
 * 
 *   def process(self, unused_impulse):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:
 */
  __pyx_tuple__197 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_unused_impulse); if (unlikely(!__pyx_tuple__197)) __PYX_ERR(0, 743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__197);
  __Pyx_GIVEREF(__pyx_tuple__197);
  __pyx_codeobj__60 = (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_worker_opera_2, __pyx_n_s_process, 743, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 743, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__198 = 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__198)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__198);
  __Pyx_GIVEREF(__pyx_tuple__198);
  __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 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_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(2, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_ImpulseReadOperation, (type(self), 0x216a25a, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ImpulseReadOperation__set_state(self, __pyx_state)
 */
  __pyx_tuple__199 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__199)) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__199);
  __Pyx_GIVEREF(__pyx_tuple__199);
  __pyx_codeobj__63 = (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_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(2, 16, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":757
 * class InMemoryWriteOperation(Operation):
 *   """A write operation that will write to an in-memory sink."""
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:
 */
  __pyx_tuple__200 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_o); if (unlikely(!__pyx_tuple__200)) __PYX_ERR(0, 757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__200);
  __Pyx_GIVEREF(__pyx_tuple__200);
  __pyx_codeobj__64 = (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_worker_opera_2, __pyx_n_s_process, 757, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(0, 757, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":767
 * 
 * class _TaggedReceivers(dict):
 *   def __init__(self, counter_factory, step_name):             # <<<<<<<<<<<<<<
 *     self._counter_factory = counter_factory
 *     self._step_name = step_name
 */
  __pyx_tuple__201 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_counter_factory, __pyx_n_s_step_name); if (unlikely(!__pyx_tuple__201)) __PYX_ERR(0, 767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__201);
  __Pyx_GIVEREF(__pyx_tuple__201);
  __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 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_apache_beam_runners_worker_opera_2, __pyx_n_s_init, 767, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(0, 767, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":771
 *     self._step_name = step_name
 * 
 *   def __missing__(self, tag):             # <<<<<<<<<<<<<<
 *     self[tag] = receiver = ConsumerSet.create(
 *         self._counter_factory, self._step_name, tag, [], None, None, None)
 */
  __pyx_tuple__202 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_receiver); if (unlikely(!__pyx_tuple__202)) __PYX_ERR(0, 771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__202);
  __Pyx_GIVEREF(__pyx_tuple__202);
  __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 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_apache_beam_runners_worker_opera_2, __pyx_n_s_missing, 771, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(0, 771, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":776
 *     return receiver
 * 
 *   def total_output_bytes(self):             # <<<<<<<<<<<<<<
 *     # type: () -> int
 *     total = 0
 */
  __pyx_tuple__203 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_total, __pyx_n_s_receiver, __pyx_n_s_elements, __pyx_n_s_mean); if (unlikely(!__pyx_tuple__203)) __PYX_ERR(0, 776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__203);
  __Pyx_GIVEREF(__pyx_tuple__203);
  __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 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_worker_opera_2, __pyx_n_s_total_output_bytes, 776, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 776, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":819
 *     self.fn, _, _, _, _ = (pickler.loads(self.spec.serialized_fn))
 * 
 *   def _read_side_inputs(self, tags_and_types):             # <<<<<<<<<<<<<<
 *     # type: (...) -> Iterator[apache_sideinputs.SideInputMap]
 * 
 */
  __pyx_tuple__204 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_tags_and_types, __pyx_n_s_i, __pyx_n_s_side_tag, __pyx_n_s_view_class, __pyx_n_s_view_options, __pyx_n_s_sources, __pyx_n_s_si, __pyx_n_s_si_counter, __pyx_n_s_element_counter, __pyx_n_s_iterator_fn); if (unlikely(!__pyx_tuple__204)) __PYX_ERR(0, 819, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__204);
  __Pyx_GIVEREF(__pyx_tuple__204);
  __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(2, 0, 11, 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_worker_opera_2, __pyx_n_s_read_side_inputs, 819, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(0, 819, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":875
 *           view_class, view_options, sideinputs.EmulatedIterable(iterator_fn))
 * 
 *   def setup(self, data_sampler=None):             # <<<<<<<<<<<<<<
 *     # type: (Optional[DataSampler]) -> None
 *     with self.scoped_start_state:
 */
  __pyx_tuple__205 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_data_sampler, __pyx_n_s_fn_2, __pyx_n_s_args, __pyx_n_s_kwargs, __pyx_n_s_tags_and_types, __pyx_n_s_window_fn, __pyx_n_s_state, __pyx_n_s_index, __pyx_n_s_tag, __pyx_n_s_spec); if (unlikely(!__pyx_tuple__205)) __PYX_ERR(0, 875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__205);
  __Pyx_GIVEREF(__pyx_tuple__205);
  __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(2, 0, 11, 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_apache_beam_runners_worker_opera_2, __pyx_n_s_setup, 875, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(0, 875, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":929
 *       self.dofn_runner.setup()
 * 
 *   def start(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     with self.scoped_start_state:
 */
  __pyx_tuple__206 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__206)) __PYX_ERR(0, 929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__206);
  __Pyx_GIVEREF(__pyx_tuple__206);
  __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_apache_beam_runners_worker_opera_2, __pyx_n_s_start, 929, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(0, 929, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":936
 *       self.dofn_runner.start()
 * 
 *   def get_batching_preference(self):             # <<<<<<<<<<<<<<
 *     if self.fn._process_batch_defined:
 *       if self.fn._process_defined:
 */
  __pyx_tuple__207 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__207)) __PYX_ERR(0, 936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__207);
  __Pyx_GIVEREF(__pyx_tuple__207);
  __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_worker_opera_2, __pyx_n_s_get_batching_preference, 936, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(0, 936, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":945
 *       return common.BatchingPreference.BATCH_FORBIDDEN
 * 
 *   def get_input_batch_converter(self) -> Optional[BatchConverter]:             # <<<<<<<<<<<<<<
 *     return getattr(self.fn, 'input_batch_converter', None)
 * 
 */
  __pyx_tuple__208 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__208)) __PYX_ERR(0, 945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__208);
  __Pyx_GIVEREF(__pyx_tuple__208);
  __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_worker_opera_2, __pyx_n_s_get_input_batch_converter, 945, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(0, 945, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":948
 *     return getattr(self.fn, 'input_batch_converter', None)
 * 
 *   def get_output_batch_converter(self) -> Optional[BatchConverter]:             # <<<<<<<<<<<<<<
 *     return getattr(self.fn, 'output_batch_converter', None)
 * 
 */
  __pyx_tuple__209 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__209)) __PYX_ERR(0, 948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__209);
  __Pyx_GIVEREF(__pyx_tuple__209);
  __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_worker_opera_2, __pyx_n_s_get_output_batch_converter, 948, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(0, 948, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":951
 *     return getattr(self.fn, 'output_batch_converter', None)
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:
 */
  __pyx_tuple__210 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_o); if (unlikely(!__pyx_tuple__210)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__210);
  __Pyx_GIVEREF(__pyx_tuple__210);
  __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__210, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_process, 951, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(0, 951, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":961
 *               (self, delayed_application))
 * 
 *   def process_batch(self, windowed_batch: WindowedBatch) -> None:             # <<<<<<<<<<<<<<
 *     self.dofn_runner.process_batch(windowed_batch)
 * 
 */
  __pyx_tuple__211 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_windowed_batch); if (unlikely(!__pyx_tuple__211)) __PYX_ERR(0, 961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__211);
  __Pyx_GIVEREF(__pyx_tuple__211);
  __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_worker_opera_2, __pyx_n_s_process_batch, 961, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) __PYX_ERR(0, 961, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":964
 *     self.dofn_runner.process_batch(windowed_batch)
 * 
 *   def finalize_bundle(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     self.dofn_runner.finalize()
 */
  __pyx_tuple__212 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__212)) __PYX_ERR(0, 964, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__212);
  __Pyx_GIVEREF(__pyx_tuple__212);
  __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_worker_opera_2, __pyx_n_s_finalize_bundle, 964, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(0, 964, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":968
 *     self.dofn_runner.finalize()
 * 
 *   def needs_finalization(self):             # <<<<<<<<<<<<<<
 *     # type: () -> bool
 *     return self.dofn_runner.bundle_finalizer_param.has_callbacks()
 */
  __pyx_tuple__213 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__213)) __PYX_ERR(0, 968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__213);
  __Pyx_GIVEREF(__pyx_tuple__213);
  __pyx_codeobj__77 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_worker_opera_2, __pyx_n_s_needs_finalization, 968, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__77)) __PYX_ERR(0, 968, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":972
 *     return self.dofn_runner.bundle_finalizer_param.has_callbacks()
 * 
 *   def add_timer_info(self, timer_family_id, timer_info):             # <<<<<<<<<<<<<<
 *     self.user_state_context.add_timer_info(timer_family_id, timer_info)
 * 
 */
  __pyx_tuple__214 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_timer_family_id, __pyx_n_s_timer_info); if (unlikely(!__pyx_tuple__214)) __PYX_ERR(0, 972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__214);
  __Pyx_GIVEREF(__pyx_tuple__214);
  __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 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_worker_opera_2, __pyx_n_s_add_timer_info, 972, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(0, 972, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":975
 *     self.user_state_context.add_timer_info(timer_family_id, timer_info)
 * 
 *   def process_timer(self, tag, timer_data):             # <<<<<<<<<<<<<<
 *     timer_spec = self.timer_specs[tag]
 *     self.dofn_runner.process_user_timer(
 */
  __pyx_tuple__215 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_timer_data, __pyx_n_s_timer_spec); if (unlikely(!__pyx_tuple__215)) __PYX_ERR(0, 975, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__215);
  __Pyx_GIVEREF(__pyx_tuple__215);
  __pyx_codeobj__79 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 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_worker_opera_2, __pyx_n_s_process_timer, 975, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__79)) __PYX_ERR(0, 975, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":985
 *         timer_data.dynamic_timer_tag)
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     super(DoOperation, self).finish()
 */
  __pyx_tuple__216 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__216)) __PYX_ERR(0, 985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__216);
  __Pyx_GIVEREF(__pyx_tuple__216);
  __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_worker_opera_2, __pyx_n_s_finish, 985, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 985, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":993
 *         self.user_state_context.commit()
 * 
 *   def teardown(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     with self.scoped_finish_state:
 */
  __pyx_tuple__217 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__217)) __PYX_ERR(0, 993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__217);
  __Pyx_GIVEREF(__pyx_tuple__217);
  __pyx_codeobj__81 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_apache_beam_runners_worker_opera_2, __pyx_n_s_teardown, 993, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__81)) __PYX_ERR(0, 993, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":1000
 *       self.user_state_context.reset()
 * 
 *   def reset(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     super(DoOperation, self).reset()
 */
  __pyx_tuple__218 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_side_input_map); if (unlikely(!__pyx_tuple__218)) __PYX_ERR(0, 1000, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__218);
  __Pyx_GIVEREF(__pyx_tuple__218);
  __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(1, 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_apache_beam_runners_worker_opera_2, __pyx_n_s_reset, 1000, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(0, 1000, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":1009
 *     self.dofn_runner.bundle_finalizer_param.reset()
 * 
 *   def pcollection_count_monitoring_infos(self, tag_to_pcollection_id):             # <<<<<<<<<<<<<<
 *     # type: (Dict[str, str]) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo]
 * 
 */
  __pyx_tuple__219 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_tag_to_pcollection_id); if (unlikely(!__pyx_tuple__219)) __PYX_ERR(0, 1009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__219);
  __Pyx_GIVEREF(__pyx_tuple__219);
  __pyx_codeobj__83 = (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_worker_opera_2, __pyx_n_s_pcollection_count_monitoring_inf, 1009, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) __PYX_ERR(0, 1009, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":1036
 *     return infos
 * 
 *   def _get_runtime_performance_hints(self):             # <<<<<<<<<<<<<<
 *     fns = pickler.loads(self.spec.serialized_fn)
 *     if fns and hasattr(fns[0], '_runtime_output_constraints'):
 */
  __pyx_tuple__220 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_fns); if (unlikely(!__pyx_tuple__220)) __PYX_ERR(0, 1036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__220);
  __Pyx_GIVEREF(__pyx_tuple__220);
  __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 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_worker_opera_2, __pyx_n_s_get_runtime_performance_hints, 1036, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(0, 1036, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__221 = 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__221)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__221);
  __Pyx_GIVEREF(__pyx_tuple__221);
  __pyx_codeobj__85 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 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_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__85)) __PYX_ERR(2, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DoOperation, (type(self), 0x521836b, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DoOperation__set_state(self, __pyx_state)
 */
  __pyx_tuple__222 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__222)) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__222);
  __Pyx_GIVEREF(__pyx_tuple__222);
  __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(2, 16, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":1048
 *     super(SdfTruncateSizedRestrictions, self).__init__(*args, **kwargs)
 * 
 *   def current_element_progress(self):             # <<<<<<<<<<<<<<
 *     # type: () -> Optional[iobase.RestrictionProgress]
 *     return self.receivers[0].current_element_progress()
 */
  __pyx_tuple__223 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__223)) __PYX_ERR(0, 1048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__223);
  __Pyx_GIVEREF(__pyx_tuple__223);
  __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__223, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_current_element_progress, 1048, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(0, 1048, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":1052
 *     return self.receivers[0].current_element_progress()
 * 
 *   def try_split(             # <<<<<<<<<<<<<<
 *       self, fraction_of_remainder
 *   ):  # type: (...) -> Optional[Tuple[Iterable[SdfSplitResultsPrimary], Iterable[SdfSplitResultsResidual]]]
 */
  __pyx_tuple__224 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_fraction_of_remainder); if (unlikely(!__pyx_tuple__224)) __PYX_ERR(0, 1052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__224);
  __Pyx_GIVEREF(__pyx_tuple__224);
  __pyx_codeobj__88 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_worker_opera_2, __pyx_n_s_try_split, 1052, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__88)) __PYX_ERR(0, 1052, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__225 = 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__225)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__225);
  __Pyx_GIVEREF(__pyx_tuple__225);
  __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 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_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(2, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_SdfTruncateSizedRestrictions, (type(self), 0x521836b, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_SdfTruncateSizedRestrictions__set_state(self, __pyx_state)
 */
  __pyx_tuple__226 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__226)) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__226);
  __Pyx_GIVEREF(__pyx_tuple__226);
  __pyx_codeobj__90 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__90)) __PYX_ERR(2, 16, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":1064
 *     self.element_start_output_bytes = None  # type: Optional[int]
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     assert self.tagged_receivers is not None
 */
  __pyx_tuple__227 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_o); if (unlikely(!__pyx_tuple__227)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__227);
  __Pyx_GIVEREF(__pyx_tuple__227);
  __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_worker_opera_2, __pyx_n_s_process, 1064, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) __PYX_ERR(0, 1064, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":1087
 *           self.element_start_output_bytes = None
 * 
 *   def try_split(self, fraction_of_remainder):             # <<<<<<<<<<<<<<
 *     # type: (...) -> Optional[Tuple[Iterable[SdfSplitResultsPrimary], Iterable[SdfSplitResultsResidual]]]
 *     split = self.dofn_runner.try_split(fraction_of_remainder)
 */
  __pyx_tuple__228 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_fraction_of_remainder, __pyx_n_s_split, __pyx_n_s_primaries, __pyx_n_s_residuals, __pyx_n_s_primary, __pyx_n_s_residual); if (unlikely(!__pyx_tuple__228)) __PYX_ERR(0, 1087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__228);
  __Pyx_GIVEREF(__pyx_tuple__228);
  __pyx_codeobj__92 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 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_worker_opera_2, __pyx_n_s_try_split, 1087, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__92)) __PYX_ERR(0, 1087, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":1096
 *     return None
 * 
 *   def current_element_progress(self):             # <<<<<<<<<<<<<<
 *     # type: () -> Optional[iobase.RestrictionProgress]
 *     with self.lock:
 */
  __pyx_tuple__229 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_progress); if (unlikely(!__pyx_tuple__229)) __PYX_ERR(0, 1096, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__229);
  __Pyx_GIVEREF(__pyx_tuple__229);
  __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 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_worker_opera_2, __pyx_n_s_current_element_progress, 1096, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) __PYX_ERR(0, 1096, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":1108
 *       return None
 * 
 *   def monitoring_infos(self, transform_id, tag_to_pcollection_id):             # <<<<<<<<<<<<<<
 *     # type: (str, Dict[str, str]) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo]
 * 
 */
  __pyx_tuple__230 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_transform_id, __pyx_n_s_tag_to_pcollection_id); if (unlikely(!__pyx_tuple__230)) __PYX_ERR(0, 1108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__230);
  __Pyx_GIVEREF(__pyx_tuple__230);
  __pyx_codeobj__94 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 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_worker_opera_2, __pyx_n_s_monitoring_infos, 1108, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__94)) __PYX_ERR(0, 1108, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__231 = 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__231)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__231);
  __Pyx_GIVEREF(__pyx_tuple__231);
  __pyx_codeobj__95 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 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_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__95)) __PYX_ERR(2, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_SdfProcessSizedElements, (type(self), 0x8c483fa, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_SdfProcessSizedElements__set_state(self, __pyx_state)
 */
  __pyx_tuple__232 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__232)) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__232);
  __Pyx_GIVEREF(__pyx_tuple__232);
  __pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) __PYX_ERR(2, 16, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":1153
 *         PhasedCombineFnExecutor(self.spec.phase, fn, args, kwargs))
 * 
 *   def setup(self, data_sampler=None):             # <<<<<<<<<<<<<<
 *     # type: (Optional[DataSampler]) -> None
 *     with self.scoped_start_state:
 */
  __pyx_tuple__233 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_data_sampler); if (unlikely(!__pyx_tuple__233)) __PYX_ERR(0, 1153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__233);
  __Pyx_GIVEREF(__pyx_tuple__233);
  __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__233, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_setup, 1153, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__98)) __PYX_ERR(0, 1153, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":1160
 *       self.phased_combine_fn.combine_fn.setup()
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:
 */
  __pyx_tuple__234 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_o); if (unlikely(!__pyx_tuple__234)) __PYX_ERR(0, 1160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__234);
  __Pyx_GIVEREF(__pyx_tuple__234);
  __pyx_codeobj__99 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_apache_beam_runners_worker_opera_2, __pyx_n_s_process, 1160, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__99)) __PYX_ERR(0, 1160, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":1168
 *       self.output(o.with_value((key, self.phased_combine_fn.apply(values))))
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     _LOGGER.debug('Finishing %s', self)
 */
  __pyx_tuple__235 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__235)) __PYX_ERR(0, 1168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__235);
  __Pyx_GIVEREF(__pyx_tuple__235);
  __pyx_codeobj__100 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_apache_beam_runners_worker_opera_2, __pyx_n_s_finish, 1168, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__100)) __PYX_ERR(0, 1168, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":1173
 *     super(CombineOperation, self).finish()
 * 
 *   def teardown(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     with self.scoped_finish_state:
 */
  __pyx_tuple__236 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__236)) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__236);
  __Pyx_GIVEREF(__pyx_tuple__236);
  __pyx_codeobj__101 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_worker_opera_2, __pyx_n_s_teardown, 1173, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__101)) __PYX_ERR(0, 1173, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__237 = 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__237)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__237);
  __Pyx_GIVEREF(__pyx_tuple__237);
  __pyx_codeobj__102 = (PyObject*)__Pyx_PyCode_New(1, 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_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__102)) __PYX_ERR(2, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_CombineOperation, (type(self), 0xc1cd107, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CombineOperation__set_state(self, __pyx_state)
 */
  __pyx_tuple__238 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__238)) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__238);
  __Pyx_GIVEREF(__pyx_tuple__238);
  __pyx_codeobj__103 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__103)) __PYX_ERR(2, 16, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":1181
 * 
 * 
 * def create_pgbk_op(step_name, spec, counter_factory, state_sampler):             # <<<<<<<<<<<<<<
 *   if spec.combine_fn:
 *     return PGBKCVOperation(step_name, spec, counter_factory, state_sampler)
 */
  __pyx_tuple__239 = PyTuple_Pack(4, __pyx_n_s_step_name, __pyx_n_s_spec, __pyx_n_s_counter_factory, __pyx_n_s_state_sampler); if (unlikely(!__pyx_tuple__239)) __PYX_ERR(0, 1181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__239);
  __Pyx_GIVEREF(__pyx_tuple__239);
  __pyx_codeobj__104 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 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_apache_beam_runners_worker_opera_2, __pyx_n_s_create_pgbk_op, 1181, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__104)) __PYX_ERR(0, 1181, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":1195
 *   values in this bundle, memory permitting.
 *   """
 *   def __init__(self, name_context, spec, counter_factory, state_sampler):             # <<<<<<<<<<<<<<
 *     super(PGBKOperation,
 *           self).__init__(name_context, spec, counter_factory, state_sampler)
 */
  __pyx_tuple__240 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_name_context, __pyx_n_s_spec, __pyx_n_s_counter_factory, __pyx_n_s_state_sampler); if (unlikely(!__pyx_tuple__240)) __PYX_ERR(0, 1195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__240);
  __Pyx_GIVEREF(__pyx_tuple__240);
  __pyx_codeobj__105 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 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_worker_opera_2, __pyx_n_s_init, 1195, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__105)) __PYX_ERR(0, 1195, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":1204
 *     self.max_size = 10 * 1000
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:
 */
  __pyx_tuple__241 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_o, __pyx_n_s_key); if (unlikely(!__pyx_tuple__241)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__241);
  __Pyx_GIVEREF(__pyx_tuple__241);
  __pyx_codeobj__106 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 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_worker_opera_2, __pyx_n_s_process, 1204, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__106)) __PYX_ERR(0, 1204, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":1214
 *         self.flush(9 * self.max_size // 10)
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     self.flush(0)
 */
  __pyx_tuple__242 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__242)) __PYX_ERR(0, 1214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__242);
  __Pyx_GIVEREF(__pyx_tuple__242);
  __pyx_codeobj__107 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_worker_opera_2, __pyx_n_s_finish, 1214, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__107)) __PYX_ERR(0, 1214, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":1219
 *     super().finish()
 * 
 *   def flush(self, target):             # <<<<<<<<<<<<<<
 *     # type: (int) -> None
 *     limit = self.size - target
 */
  __pyx_tuple__243 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_target, __pyx_n_s_limit, __pyx_n_s_ix, __pyx_n_s_kw, __pyx_n_s_vs, __pyx_n_s_key, __pyx_n_s_windows, __pyx_n_s_output_value, __pyx_n_s_windowed_value, __pyx_n_s_v); if (unlikely(!__pyx_tuple__243)) __PYX_ERR(0, 1219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__243);
  __Pyx_GIVEREF(__pyx_tuple__243);
  __pyx_codeobj__108 = (PyObject*)__Pyx_PyCode_New(2, 0, 11, 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_worker_opera_2, __pyx_n_s_flush, 1219, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__108)) __PYX_ERR(0, 1219, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":1272
 *     self.table = {}
 * 
 *   def setup(self, data_sampler=None):             # <<<<<<<<<<<<<<
 *     # type: (Optional[DataSampler]) -> None
 *     with self.scoped_start_state:
 */
  __pyx_tuple__244 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_data_sampler); if (unlikely(!__pyx_tuple__244)) __PYX_ERR(0, 1272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__244);
  __Pyx_GIVEREF(__pyx_tuple__244);
  __pyx_codeobj__109 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_apache_beam_runners_worker_opera_2, __pyx_n_s_setup, 1272, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__109)) __PYX_ERR(0, 1272, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":1279
 *       self.combine_fn.setup()
 * 
 *   def process(self, wkv):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:
 */
  __pyx_tuple__245 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_wkv); if (unlikely(!__pyx_tuple__245)) __PYX_ERR(0, 1279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__245);
  __Pyx_GIVEREF(__pyx_tuple__245);
  __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__245, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_process, 1279, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__110)) __PYX_ERR(0, 1279, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":1314
 *         entry[1] = self.timestamp_combiner.combine(entry[1], wkv.timestamp)
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     for wkey, value in self.table.items():
 */
  __pyx_tuple__246 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__246)) __PYX_ERR(0, 1314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__246);
  __Pyx_GIVEREF(__pyx_tuple__246);
  __pyx_codeobj__111 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_worker_opera_2, __pyx_n_s_finish, 1314, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__111)) __PYX_ERR(0, 1314, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":1321
 *     self.key_count = 0
 * 
 *   def teardown(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     with self.scoped_finish_state:
 */
  __pyx_tuple__247 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__247)) __PYX_ERR(0, 1321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__247);
  __Pyx_GIVEREF(__pyx_tuple__247);
  __pyx_codeobj__112 = (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_worker_opera_2, __pyx_n_s_teardown, 1321, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__112)) __PYX_ERR(0, 1321, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":1328
 *       self.combine_fn.teardown()
 * 
 *   def output_key(self, wkey, accumulator, timestamp):             # <<<<<<<<<<<<<<
 *     if self.combine_fn_compact is None:
 *       value = accumulator
 */
  __pyx_tuple__248 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_wkey, __pyx_n_s_accumulator, __pyx_n_s_timestamp); if (unlikely(!__pyx_tuple__248)) __PYX_ERR(0, 1328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__248);
  __Pyx_GIVEREF(__pyx_tuple__248);
  __pyx_codeobj__113 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 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_worker_opera_2, __pyx_n_s_output_key, 1328, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__113)) __PYX_ERR(0, 1328, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__249 = 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__249)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__249);
  __Pyx_GIVEREF(__pyx_tuple__249);
  __pyx_codeobj__114 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__249, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__114)) __PYX_ERR(2, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_PGBKCVOperation, (type(self), 0xf08ce62, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_PGBKCVOperation__set_state(self, __pyx_state)
 */
  __pyx_tuple__250 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__250)) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__250);
  __Pyx_GIVEREF(__pyx_tuple__250);
  __pyx_codeobj__115 = (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_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__115)) __PYX_ERR(2, 16, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":1349
 *   with all the items.
 *   """
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:
 */
  __pyx_tuple__251 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_o); if (unlikely(!__pyx_tuple__251)) __PYX_ERR(0, 1349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__251);
  __Pyx_GIVEREF(__pyx_tuple__251);
  __pyx_codeobj__116 = (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_worker_opera_2, __pyx_n_s_process, 1349, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__116)) __PYX_ERR(0, 1349, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__252 = 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__252)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__252);
  __Pyx_GIVEREF(__pyx_tuple__252);
  __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__252, __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(2, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_FlattenOperation, (type(self), 0xb6b9d28, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_FlattenOperation__set_state(self, __pyx_state)
 */
  __pyx_tuple__253 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__253)) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__253);
  __Pyx_GIVEREF(__pyx_tuple__253);
  __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__253, __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(2, 16, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":1357
 * 
 * 
 * def create_operation(             # <<<<<<<<<<<<<<
 *     name_context,
 *     spec,
 */
  __pyx_tuple__254 = PyTuple_Pack(17, __pyx_n_s_name_context, __pyx_n_s_spec, __pyx_n_s_counter_factory, __pyx_n_s_step_name, __pyx_n_s_state_sampler, __pyx_n_s_test_shuffle_source, __pyx_n_s_test_shuffle_sink, __pyx_n_s_is_streaming, __pyx_n_s_op, __pyx_n_s_NativeReadOperation, __pyx_n_s_NativeWriteOperation, __pyx_n_s_GroupedShuffleReadOperation, __pyx_n_s_UngroupedShuffleReadOperation, __pyx_n_s_ShuffleWriteOperation, __pyx_n_s_BatchGroupAlsoByWindowsOperation, __pyx_n_s_StreamingGroupAlsoByWindowsOpera, __pyx_n_s_ReifyTimestampAndWindowsOperatio); if (unlikely(!__pyx_tuple__254)) __PYX_ERR(0, 1357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__254);
  __Pyx_GIVEREF(__pyx_tuple__254);
  __pyx_codeobj__119 = (PyObject*)__Pyx_PyCode_New(8, 0, 17, 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_apache_beam_runners_worker_opera_2, __pyx_n_s_create_operation, 1357, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__119)) __PYX_ERR(0, 1357, __pyx_L1_error)
  __pyx_tuple__255 = PyTuple_Pack(5, ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__255)) __PYX_ERR(0, 1357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__255);
  __Pyx_GIVEREF(__pyx_tuple__255);

  /* "apache_beam/runners/worker/operations.py":1441
 * 
 * 
 * class SimpleMapTaskExecutor(object):             # <<<<<<<<<<<<<<
 *   """An executor for map tasks.
 * 
 */
  __pyx_tuple__256 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__256)) __PYX_ERR(0, 1441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__256);
  __Pyx_GIVEREF(__pyx_tuple__256);

  /* "apache_beam/runners/worker/operations.py":1447
 *    task.
 *   """
 *   def __init__(             # <<<<<<<<<<<<<<
 *       self,
 *       map_task,
 */
  __pyx_tuple__257 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_map_task, __pyx_n_s_counter_factory, __pyx_n_s_state_sampler, __pyx_n_s_test_shuffle_source, __pyx_n_s_test_shuffle_sink); if (unlikely(!__pyx_tuple__257)) __PYX_ERR(0, 1447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__257);
  __Pyx_GIVEREF(__pyx_tuple__257);
  __pyx_codeobj__120 = (PyObject*)__Pyx_PyCode_New(6, 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_worker_opera_2, __pyx_n_s_init, 1447, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__120)) __PYX_ERR(0, 1447, __pyx_L1_error)
  __pyx_tuple__258 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__258)) __PYX_ERR(0, 1447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__258);
  __Pyx_GIVEREF(__pyx_tuple__258);

  /* "apache_beam/runners/worker/operations.py":1475
 *     self._test_shuffle_sink = test_shuffle_sink
 * 
 *   def operations(self):             # <<<<<<<<<<<<<<
 *     # type: () -> List[Operation]
 *     return self._ops[:]
 */
  __pyx_tuple__259 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__259)) __PYX_ERR(0, 1475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__259);
  __Pyx_GIVEREF(__pyx_tuple__259);
  __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_apache_beam_runners_worker_opera_2, __pyx_n_s_operations, 1475, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) __PYX_ERR(0, 1475, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":1479
 *     return self._ops[:]
 * 
 *   def execute(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 * 
 */
  __pyx_tuple__260 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_name_context, __pyx_n_s_spec, __pyx_n_s_op, __pyx_n_s_producer, __pyx_n_s_output_index, __pyx_n_s_ix); if (unlikely(!__pyx_tuple__260)) __PYX_ERR(0, 1479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__260);
  __Pyx_GIVEREF(__pyx_tuple__260);
  __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 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_apache_beam_runners_worker_opera_2, __pyx_n_s_execute, 1479, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) __PYX_ERR(0, 1479, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":1524
 * 
 * 
 * class InefficientExecutionWarning(RuntimeWarning):             # <<<<<<<<<<<<<<
 *   """warning to indicate an inefficiency in a Beam pipeline."""
 * 
 */
  __pyx_tuple__261 = PyTuple_Pack(1, __pyx_builtin_RuntimeWarning); if (unlikely(!__pyx_tuple__261)) __PYX_ERR(0, 1524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__261);
  __Pyx_GIVEREF(__pyx_tuple__261);

  /* "(tree fragment)":1
 * def __pyx_unpickle_ConsumerSet(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __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(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__262);
  __Pyx_GIVEREF(__pyx_tuple__262);
  __pyx_codeobj__124 = (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_ConsumerSet, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__124)) __PYX_ERR(2, 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(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__263);
  __Pyx_GIVEREF(__pyx_tuple__263);
  __pyx_codeobj__126 = (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_SingletonElementC, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__126)) __PYX_ERR(2, 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(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__264);
  __Pyx_GIVEREF(__pyx_tuple__264);
  __pyx_codeobj__128 = (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_GeneralPurposeCon, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__128)) __PYX_ERR(2, 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(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__265);
  __Pyx_GIVEREF(__pyx_tuple__265);
  __pyx_codeobj__130 = (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_Operation, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__130)) __PYX_ERR(2, 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(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__266);
  __Pyx_GIVEREF(__pyx_tuple__266);
  __pyx_codeobj__132 = (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_ReadOperation, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__132)) __PYX_ERR(2, 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(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__267);
  __Pyx_GIVEREF(__pyx_tuple__267);
  __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__267, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_ImpulseReadOperat, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__133)) __PYX_ERR(2, 1, __pyx_L1_error)
  __pyx_tuple__268 = 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__268)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__268);
  __Pyx_GIVEREF(__pyx_tuple__268);
  __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__268, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DoOperation, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__135)) __PYX_ERR(2, 1, __pyx_L1_error)
  __pyx_tuple__269 = 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__269)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__269);
  __Pyx_GIVEREF(__pyx_tuple__269);
  __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__269, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_SdfTruncateSizedR, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__137)) __PYX_ERR(2, 1, __pyx_L1_error)
  __pyx_tuple__270 = 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__270)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__270);
  __Pyx_GIVEREF(__pyx_tuple__270);
  __pyx_codeobj__138 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__270, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_SdfProcessSizedEl, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__138)) __PYX_ERR(2, 1, __pyx_L1_error)
  __pyx_tuple__271 = 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__271)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__271);
  __Pyx_GIVEREF(__pyx_tuple__271);
  __pyx_codeobj__140 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__271, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_CombineOperation, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__140)) __PYX_ERR(2, 1, __pyx_L1_error)
  __pyx_tuple__272 = 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__272)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__272);
  __Pyx_GIVEREF(__pyx_tuple__272);
  __pyx_codeobj__142 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__272, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_PGBKCVOperation, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__142)) __PYX_ERR(2, 1, __pyx_L1_error)
  __pyx_tuple__273 = 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__273)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__273);
  __Pyx_GIVEREF(__pyx_tuple__273);
  __pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__273, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_FlattenOperation, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) __PYX_ERR(2, 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)

  __pyx_umethod_PyDict_Type_get.type = (PyObject*)&PyDict_Type;
  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_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_9 = PyInt_FromLong(9); if (unlikely(!__pyx_int_9)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_4096 = PyInt_FromLong(4096); if (unlikely(!__pyx_int_4096)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_10000 = PyInt_FromLong(10000L); if (unlikely(!__pyx_int_10000)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_13052437 = PyInt_FromLong(13052437L); if (unlikely(!__pyx_int_13052437)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_15694960 = PyInt_FromLong(15694960L); if (unlikely(!__pyx_int_15694960)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_35037786 = PyInt_FromLong(35037786L); if (unlikely(!__pyx_int_35037786)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_44220925 = PyInt_FromLong(44220925L); if (unlikely(!__pyx_int_44220925)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_53600133 = PyInt_FromLong(53600133L); if (unlikely(!__pyx_int_53600133)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_54202627 = PyInt_FromLong(54202627L); if (unlikely(!__pyx_int_54202627)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_86082411 = PyInt_FromLong(86082411L); if (unlikely(!__pyx_int_86082411)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_86866479 = PyInt_FromLong(86866479L); if (unlikely(!__pyx_int_86866479)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_106916135 = PyInt_FromLong(106916135L); if (unlikely(!__pyx_int_106916135)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_113750372 = PyInt_FromLong(113750372L); if (unlikely(!__pyx_int_113750372)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_129208062 = PyInt_FromLong(129208062L); if (unlikely(!__pyx_int_129208062)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_136289111 = PyInt_FromLong(136289111L); if (unlikely(!__pyx_int_136289111)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_138733249 = PyInt_FromLong(138733249L); if (unlikely(!__pyx_int_138733249)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_147096570 = PyInt_FromLong(147096570L); if (unlikely(!__pyx_int_147096570)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_155424975 = PyInt_FromLong(155424975L); if (unlikely(!__pyx_int_155424975)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_157929342 = PyInt_FromLong(157929342L); if (unlikely(!__pyx_int_157929342)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_160425100 = PyInt_FromLong(160425100L); if (unlikely(!__pyx_int_160425100)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_178449558 = PyInt_FromLong(178449558L); if (unlikely(!__pyx_int_178449558)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_191601960 = PyInt_FromLong(191601960L); if (unlikely(!__pyx_int_191601960)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_191837459 = PyInt_FromLong(191837459L); if (unlikely(!__pyx_int_191837459)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_196990909 = PyInt_FromLong(196990909L); if (unlikely(!__pyx_int_196990909)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_203215111 = PyInt_FromLong(203215111L); if (unlikely(!__pyx_int_203215111)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_210856725 = PyInt_FromLong(210856725L); if (unlikely(!__pyx_int_210856725)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_232423418 = PyInt_FromLong(232423418L); if (unlikely(!__pyx_int_232423418)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_241484073 = PyInt_FromLong(241484073L); if (unlikely(!__pyx_int_241484073)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_252235362 = PyInt_FromLong(252235362L); if (unlikely(!__pyx_int_252235362)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_267513676 = PyInt_FromLong(267513676L); if (unlikely(!__pyx_int_267513676)) __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_6worker_10operations__globally_windowed_value = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)Py_None); Py_INCREF(Py_None);
  __pyx_v_11apache_beam_7runners_6worker_10operations__global_window_type = ((PyTypeObject*)Py_None); Py_INCREF(Py_None);
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(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_globally_windowed_value, (void *)&__pyx_v_11apache_beam_7runners_6worker_10operations__globally_windowed_value, "struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_global_window_type, (void *)&__pyx_v_11apache_beam_7runners_6worker_10operations__global_window_type, "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
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  __pyx_t_1 = PyImport_ImportModule("apache_beam.runners.common"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_11apache_beam_7runners_6common_Receiver = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.runners.common", "Receiver", sizeof(struct __pyx_obj_11apache_beam_7runners_6common_Receiver), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_7runners_6common_Receiver),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_11apache_beam_7runners_6common_Receiver) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_vtabptr_11apache_beam_7runners_6common_Receiver = (struct __pyx_vtabstruct_11apache_beam_7runners_6common_Receiver*)__Pyx_GetVtable(__pyx_ptype_11apache_beam_7runners_6common_Receiver->tp_dict); if (unlikely(!__pyx_vtabptr_11apache_beam_7runners_6common_Receiver)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_ConsumerSet = &__pyx_vtable_11apache_beam_7runners_6worker_10operations_ConsumerSet;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_ConsumerSet.__pyx_base = *__pyx_vtabptr_11apache_beam_7runners_6common_Receiver;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_ConsumerSet.update_counters_start = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_11ConsumerSet_update_counters_start;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_ConsumerSet.update_counters_finish = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_11ConsumerSet_update_counters_finish;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_ConsumerSet.update_counters_batch = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_11ConsumerSet_update_counters_batch;
  __pyx_type_11apache_beam_7runners_6worker_10operations_ConsumerSet.tp_base = __pyx_ptype_11apache_beam_7runners_6common_Receiver;
  if (PyType_Ready(&__pyx_type_11apache_beam_7runners_6worker_10operations_ConsumerSet) < 0) __PYX_ERR(0, 112, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_7runners_6worker_10operations_ConsumerSet.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_7runners_6worker_10operations_ConsumerSet.tp_dictoffset && __pyx_type_11apache_beam_7runners_6worker_10operations_ConsumerSet.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_7runners_6worker_10operations_ConsumerSet.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_7runners_6worker_10operations_ConsumerSet.tp_dict, __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_ConsumerSet) < 0) __PYX_ERR(0, 112, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ConsumerSet, (PyObject *)&__pyx_type_11apache_beam_7runners_6worker_10operations_ConsumerSet) < 0) __PYX_ERR(0, 112, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_7runners_6worker_10operations_ConsumerSet) < 0) __PYX_ERR(0, 112, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet = &__pyx_type_11apache_beam_7runners_6worker_10operations_ConsumerSet;
  __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet = &__pyx_vtable_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet.__pyx_base = *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_ConsumerSet;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet.__pyx_base.__pyx_base.receive = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6common_Receiver *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_receive;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet.__pyx_base.__pyx_base.receive_batch = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6common_Receiver *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_receive_batch;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet.__pyx_base.__pyx_base.flush = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6common_Receiver *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_flush;
  __pyx_type_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet.tp_base = __pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet;
  if (PyType_Ready(&__pyx_type_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet) < 0) __PYX_ERR(0, 241, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet.tp_dictoffset && __pyx_type_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet.tp_dict, __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet) < 0) __PYX_ERR(0, 241, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SingletonElementConsumerSet, (PyObject *)&__pyx_type_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet) < 0) __PYX_ERR(0, 241, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet) < 0) __PYX_ERR(0, 241, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet = &__pyx_type_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet;
  __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet = &__pyx_vtable_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet.__pyx_base = *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_ConsumerSet;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet.__pyx_base.__pyx_base.receive = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6common_Receiver *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_receive;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet.__pyx_base.__pyx_base.receive_batch = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6common_Receiver *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_receive_batch;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet.__pyx_base.__pyx_base.flush = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6common_Receiver *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_flush;
  __pyx_type_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet.tp_base = __pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet;
  if (PyType_Ready(&__pyx_type_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet) < 0) __PYX_ERR(0, 285, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet.tp_dictoffset && __pyx_type_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet.tp_dict, __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet) < 0) __PYX_ERR(0, 285, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_GeneralPurposeConsumerSet, (PyObject *)&__pyx_type_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet) < 0) __PYX_ERR(0, 285, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet) < 0) __PYX_ERR(0, 285, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet = &__pyx_type_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet;
  __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_Operation = &__pyx_vtable_11apache_beam_7runners_6worker_10operations_Operation;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_Operation.start = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_start;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_Operation.process = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_process;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_Operation.finish = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_finish;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_Operation.teardown = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_teardown;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_Operation.output = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_7runners_6worker_10operations_9Operation_output *__pyx_optional_args))__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_output;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_Operation.execution_time_monitoring_infos = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_execution_time_monitoring_infos;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_Operation.user_monitoring_infos = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_user_monitoring_infos;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_Operation.pcollection_count_monitoring_infos = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_pcollection_count_monitoring_infos;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_Operation.monitoring_infos = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_monitoring_infos;
  if (PyType_Ready(&__pyx_type_11apache_beam_7runners_6worker_10operations_Operation) < 0) __PYX_ERR(0, 414, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_7runners_6worker_10operations_Operation.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_7runners_6worker_10operations_Operation.tp_dictoffset && __pyx_type_11apache_beam_7runners_6worker_10operations_Operation.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_7runners_6worker_10operations_Operation.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_11apache_beam_7runners_6worker_10operations_Operation, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 414, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_11apache_beam_7runners_6worker_10operations_9Operation___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_11apache_beam_7runners_6worker_10operations_9Operation___init__.doc = __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation___init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_11apache_beam_7runners_6worker_10operations_9Operation___init__;
    }
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_11apache_beam_7runners_6worker_10operations_Operation, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 414, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_11apache_beam_7runners_6worker_10operations_9Operation_42__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_11apache_beam_7runners_6worker_10operations_9Operation_42__str__.doc = __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_42__str__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_11apache_beam_7runners_6worker_10operations_9Operation_42__str__;
    }
  }
  #endif
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_7runners_6worker_10operations_Operation.tp_dict, __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_Operation) < 0) __PYX_ERR(0, 414, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Operation, (PyObject *)&__pyx_type_11apache_beam_7runners_6worker_10operations_Operation) < 0) __PYX_ERR(0, 414, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_7runners_6worker_10operations_Operation) < 0) __PYX_ERR(0, 414, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation = &__pyx_type_11apache_beam_7runners_6worker_10operations_Operation;
  __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_ReadOperation = &__pyx_vtable_11apache_beam_7runners_6worker_10operations_ReadOperation;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_ReadOperation.__pyx_base = *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_Operation;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_ReadOperation.__pyx_base.start = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_13ReadOperation_start;
  __pyx_type_11apache_beam_7runners_6worker_10operations_ReadOperation.tp_base = __pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation;
  if (PyType_Ready(&__pyx_type_11apache_beam_7runners_6worker_10operations_ReadOperation) < 0) __PYX_ERR(0, 705, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_7runners_6worker_10operations_ReadOperation.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_7runners_6worker_10operations_ReadOperation.tp_dictoffset && __pyx_type_11apache_beam_7runners_6worker_10operations_ReadOperation.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_7runners_6worker_10operations_ReadOperation.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_7runners_6worker_10operations_ReadOperation.tp_dict, __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_ReadOperation) < 0) __PYX_ERR(0, 705, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ReadOperation, (PyObject *)&__pyx_type_11apache_beam_7runners_6worker_10operations_ReadOperation) < 0) __PYX_ERR(0, 705, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_7runners_6worker_10operations_ReadOperation) < 0) __PYX_ERR(0, 705, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation = &__pyx_type_11apache_beam_7runners_6worker_10operations_ReadOperation;
  __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation = &__pyx_vtable_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation.__pyx_base = *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_Operation;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation.__pyx_base.process = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_process;
  __pyx_type_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation.tp_base = __pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation;
  if (PyType_Ready(&__pyx_type_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation) < 0) __PYX_ERR(0, 719, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation.tp_dictoffset && __pyx_type_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation.tp_dict, __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation) < 0) __PYX_ERR(0, 719, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ImpulseReadOperation, (PyObject *)&__pyx_type_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation) < 0) __PYX_ERR(0, 719, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation) < 0) __PYX_ERR(0, 719, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation = &__pyx_type_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation;
  __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_DoOperation = &__pyx_vtable_11apache_beam_7runners_6worker_10operations_DoOperation;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_DoOperation.__pyx_base = *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_Operation;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_DoOperation.__pyx_base.start = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_start;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_DoOperation.__pyx_base.process = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_process;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_DoOperation.__pyx_base.finish = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_finish;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_DoOperation.__pyx_base.teardown = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_teardown;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_DoOperation.__pyx_base.pcollection_count_monitoring_infos = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_pcollection_count_monitoring_infos;
  __pyx_type_11apache_beam_7runners_6worker_10operations_DoOperation.tp_base = __pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation;
  if (PyType_Ready(&__pyx_type_11apache_beam_7runners_6worker_10operations_DoOperation) < 0) __PYX_ERR(0, 797, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_7runners_6worker_10operations_DoOperation.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_7runners_6worker_10operations_DoOperation.tp_dictoffset && __pyx_type_11apache_beam_7runners_6worker_10operations_DoOperation.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_7runners_6worker_10operations_DoOperation.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_7runners_6worker_10operations_DoOperation.tp_dict, __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_DoOperation) < 0) __PYX_ERR(0, 797, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DoOperation, (PyObject *)&__pyx_type_11apache_beam_7runners_6worker_10operations_DoOperation) < 0) __PYX_ERR(0, 797, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_7runners_6worker_10operations_DoOperation) < 0) __PYX_ERR(0, 797, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation = &__pyx_type_11apache_beam_7runners_6worker_10operations_DoOperation;
  __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements = &__pyx_vtable_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements.__pyx_base = *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_DoOperation;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements.__pyx_base.__pyx_base.process = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_process;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements.__pyx_base.__pyx_base.monitoring_infos = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_monitoring_infos;
  __pyx_type_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements.tp_base = __pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation;
  if (PyType_Ready(&__pyx_type_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements) < 0) __PYX_ERR(0, 1058, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements.tp_dictoffset && __pyx_type_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements.tp_dict, __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements) < 0) __PYX_ERR(0, 1058, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SdfProcessSizedElements, (PyObject *)&__pyx_type_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements) < 0) __PYX_ERR(0, 1058, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements) < 0) __PYX_ERR(0, 1058, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements = &__pyx_type_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements;
  __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions = &__pyx_vtable_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions.__pyx_base = *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_DoOperation;
  __pyx_type_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions.tp_base = __pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation;
  if (PyType_Ready(&__pyx_type_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions) < 0) __PYX_ERR(0, 1044, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions.tp_dictoffset && __pyx_type_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions.tp_dict, __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions) < 0) __PYX_ERR(0, 1044, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SdfTruncateSizedRestrictions, (PyObject *)&__pyx_type_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions) < 0) __PYX_ERR(0, 1044, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions) < 0) __PYX_ERR(0, 1044, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions = &__pyx_type_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions;
  __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_CombineOperation = &__pyx_vtable_11apache_beam_7runners_6worker_10operations_CombineOperation;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_CombineOperation.__pyx_base = *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_Operation;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_CombineOperation.__pyx_base.process = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_16CombineOperation_process;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_CombineOperation.__pyx_base.finish = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_16CombineOperation_finish;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_CombineOperation.__pyx_base.teardown = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_16CombineOperation_teardown;
  __pyx_type_11apache_beam_7runners_6worker_10operations_CombineOperation.tp_base = __pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation;
  if (PyType_Ready(&__pyx_type_11apache_beam_7runners_6worker_10operations_CombineOperation) < 0) __PYX_ERR(0, 1141, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_7runners_6worker_10operations_CombineOperation.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_7runners_6worker_10operations_CombineOperation.tp_dictoffset && __pyx_type_11apache_beam_7runners_6worker_10operations_CombineOperation.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_7runners_6worker_10operations_CombineOperation.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_7runners_6worker_10operations_CombineOperation.tp_dict, __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_CombineOperation) < 0) __PYX_ERR(0, 1141, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CombineOperation, (PyObject *)&__pyx_type_11apache_beam_7runners_6worker_10operations_CombineOperation) < 0) __PYX_ERR(0, 1141, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_7runners_6worker_10operations_CombineOperation) < 0) __PYX_ERR(0, 1141, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation = &__pyx_type_11apache_beam_7runners_6worker_10operations_CombineOperation;
  __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_PGBKCVOperation = &__pyx_vtable_11apache_beam_7runners_6worker_10operations_PGBKCVOperation;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_PGBKCVOperation.__pyx_base = *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_Operation;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_PGBKCVOperation.__pyx_base.process = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_process;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_PGBKCVOperation.__pyx_base.finish = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_finish;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_PGBKCVOperation.__pyx_base.teardown = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_teardown;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_PGBKCVOperation.output_key = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_output_key;
  __pyx_type_11apache_beam_7runners_6worker_10operations_PGBKCVOperation.tp_base = __pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation;
  if (PyType_Ready(&__pyx_type_11apache_beam_7runners_6worker_10operations_PGBKCVOperation) < 0) __PYX_ERR(0, 1234, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_7runners_6worker_10operations_PGBKCVOperation.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_7runners_6worker_10operations_PGBKCVOperation.tp_dictoffset && __pyx_type_11apache_beam_7runners_6worker_10operations_PGBKCVOperation.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_7runners_6worker_10operations_PGBKCVOperation.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_7runners_6worker_10operations_PGBKCVOperation.tp_dict, __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_PGBKCVOperation) < 0) __PYX_ERR(0, 1234, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PGBKCVOperation, (PyObject *)&__pyx_type_11apache_beam_7runners_6worker_10operations_PGBKCVOperation) < 0) __PYX_ERR(0, 1234, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_7runners_6worker_10operations_PGBKCVOperation) < 0) __PYX_ERR(0, 1234, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation = &__pyx_type_11apache_beam_7runners_6worker_10operations_PGBKCVOperation;
  __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_FlattenOperation = &__pyx_vtable_11apache_beam_7runners_6worker_10operations_FlattenOperation;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_FlattenOperation.__pyx_base = *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_Operation;
  __pyx_vtable_11apache_beam_7runners_6worker_10operations_FlattenOperation.__pyx_base.process = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_16FlattenOperation_process;
  __pyx_type_11apache_beam_7runners_6worker_10operations_FlattenOperation.tp_base = __pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation;
  if (PyType_Ready(&__pyx_type_11apache_beam_7runners_6worker_10operations_FlattenOperation) < 0) __PYX_ERR(0, 1343, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_7runners_6worker_10operations_FlattenOperation.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_7runners_6worker_10operations_FlattenOperation.tp_dictoffset && __pyx_type_11apache_beam_7runners_6worker_10operations_FlattenOperation.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_7runners_6worker_10operations_FlattenOperation.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_7runners_6worker_10operations_FlattenOperation.tp_dict, __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_FlattenOperation) < 0) __PYX_ERR(0, 1343, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FlattenOperation, (PyObject *)&__pyx_type_11apache_beam_7runners_6worker_10operations_FlattenOperation) < 0) __PYX_ERR(0, 1343, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_7runners_6worker_10operations_FlattenOperation) < 0) __PYX_ERR(0, 1343, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6worker_10operations_FlattenOperation = &__pyx_type_11apache_beam_7runners_6worker_10operations_FlattenOperation;
  if (PyType_Ready(&__pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup) < 0) __PYX_ERR(0, 464, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup.tp_dictoffset && __pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup = &__pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup;
  if (PyType_Ready(&__pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs) < 0) __PYX_ERR(0, 819, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs.tp_dictoffset && __pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs = &__pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_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(4, 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(4, 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(4, 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(4, 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(4, 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(4, 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(4, 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(4, 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(4, 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(5, 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(5, 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(5, 33, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("apache_beam.runners.common"); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_11apache_beam_7runners_6common_MethodWrapper = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.runners.common", "MethodWrapper", sizeof(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper) __PYX_ERR(6, 36, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6common_DoFnSignature = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.runners.common", "DoFnSignature", sizeof(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature) __PYX_ERR(6, 55, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.runners.common", "DoFnInvoker", sizeof(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker) __PYX_ERR(6, 72, __pyx_L1_error)
  __pyx_vtabptr_11apache_beam_7runners_6common_DoFnInvoker = (struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnInvoker*)__Pyx_GetVtable(__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker->tp_dict); if (unlikely(!__pyx_vtabptr_11apache_beam_7runners_6common_DoFnInvoker)) __PYX_ERR(6, 72, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.runners.common", "SimpleInvoker", sizeof(struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker) __PYX_ERR(6, 88, __pyx_L1_error)
  __pyx_vtabptr_11apache_beam_7runners_6common_SimpleInvoker = (struct __pyx_vtabstruct_11apache_beam_7runners_6common_SimpleInvoker*)__Pyx_GetVtable(__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker->tp_dict); if (unlikely(!__pyx_vtabptr_11apache_beam_7runners_6common_SimpleInvoker)) __PYX_ERR(6, 88, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.runners.common", "PerWindowInvoker", sizeof(struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker) __PYX_ERR(6, 93, __pyx_L1_error)
  __pyx_vtabptr_11apache_beam_7runners_6common_PerWindowInvoker = (struct __pyx_vtabstruct_11apache_beam_7runners_6common_PerWindowInvoker*)__Pyx_GetVtable(__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker->tp_dict); if (unlikely(!__pyx_vtabptr_11apache_beam_7runners_6common_PerWindowInvoker)) __PYX_ERR(6, 93, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6common_DoFnRunner = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.runners.common", "DoFnRunner", sizeof(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner) __PYX_ERR(6, 118, __pyx_L1_error)
  __pyx_vtabptr_11apache_beam_7runners_6common_DoFnRunner = (struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnRunner*)__Pyx_GetVtable(__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner->tp_dict); if (unlikely(!__pyx_vtabptr_11apache_beam_7runners_6common_DoFnRunner)) __PYX_ERR(6, 118, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6common_OutputHandler = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.runners.common", "OutputHandler", sizeof(struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_11apache_beam_7runners_6common_OutputHandler) __PYX_ERR(6, 129, __pyx_L1_error)
  __pyx_vtabptr_11apache_beam_7runners_6common_OutputHandler = (struct __pyx_vtabstruct_11apache_beam_7runners_6common_OutputHandler*)__Pyx_GetVtable(__pyx_ptype_11apache_beam_7runners_6common_OutputHandler->tp_dict); if (unlikely(!__pyx_vtabptr_11apache_beam_7runners_6common_OutputHandler)) __PYX_ERR(6, 129, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6common__OutputHandler = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.runners.common", "_OutputHandler", sizeof(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_11apache_beam_7runners_6common__OutputHandler) __PYX_ERR(6, 141, __pyx_L1_error)
  __pyx_vtabptr_11apache_beam_7runners_6common__OutputHandler = (struct __pyx_vtabstruct_11apache_beam_7runners_6common__OutputHandler*)__Pyx_GetVtable(__pyx_ptype_11apache_beam_7runners_6common__OutputHandler->tp_dict); if (unlikely(!__pyx_vtabptr_11apache_beam_7runners_6common__OutputHandler)) __PYX_ERR(6, 141, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6common_DoFnContext = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.runners.common", "DoFnContext", sizeof(struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_11apache_beam_7runners_6common_DoFnContext) __PYX_ERR(6, 171, __pyx_L1_error)
  __pyx_vtabptr_11apache_beam_7runners_6common_DoFnContext = (struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnContext*)__Pyx_GetVtable(__pyx_ptype_11apache_beam_7runners_6common_DoFnContext->tp_dict); if (unlikely(!__pyx_vtabptr_11apache_beam_7runners_6common_DoFnContext)) __PYX_ERR(6, 171, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6common__ReceiverAdapter = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.runners.common", "_ReceiverAdapter", sizeof(struct __pyx_obj_11apache_beam_7runners_6common__ReceiverAdapter), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_7runners_6common__ReceiverAdapter),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_11apache_beam_7runners_6common__ReceiverAdapter) __PYX_ERR(6, 178, __pyx_L1_error)
  __pyx_vtabptr_11apache_beam_7runners_6common__ReceiverAdapter = (struct __pyx_vtabstruct_11apache_beam_7runners_6common__ReceiverAdapter*)__Pyx_GetVtable(__pyx_ptype_11apache_beam_7runners_6common__ReceiverAdapter->tp_dict); if (unlikely(!__pyx_vtabptr_11apache_beam_7runners_6common__ReceiverAdapter)) __PYX_ERR(6, 178, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("apache_beam.utils.counters"); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_11apache_beam_5utils_8counters_Counter = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.utils.counters", "Counter", sizeof(struct __pyx_obj_11apache_beam_5utils_8counters_Counter), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_5utils_8counters_Counter),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_11apache_beam_5utils_8counters_Counter) __PYX_ERR(7, 21, __pyx_L1_error)
  __pyx_vtabptr_11apache_beam_5utils_8counters_Counter = (struct __pyx_vtabstruct_11apache_beam_5utils_8counters_Counter*)__Pyx_GetVtable(__pyx_ptype_11apache_beam_5utils_8counters_Counter->tp_dict); if (unlikely(!__pyx_vtabptr_11apache_beam_5utils_8counters_Counter)) __PYX_ERR(7, 21, __pyx_L1_error)
  __pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.utils.counters", "AccumulatorCombineFnCounter", sizeof(struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter) __PYX_ERR(7, 29, __pyx_L1_error)
  __pyx_vtabptr_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter = (struct __pyx_vtabstruct_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter*)__Pyx_GetVtable(__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter->tp_dict); if (unlikely(!__pyx_vtabptr_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter)) __PYX_ERR(7, 29, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType_0_29_36(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", 
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(PyTypeObject),
  #else
  sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(PyHeapTypeObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(8, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType_0_29_36(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(PyBoolObject),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_7cpython_4bool_bool) __PYX_ERR(9, 8, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType_0_29_36(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(PyComplexObject),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_7cpython_7complex_complex) __PYX_ERR(10, 15, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("datetime"); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_7cpython_8datetime_date = __Pyx_ImportType_0_29_36(__pyx_t_1, "datetime", "date", sizeof(PyDateTime_Date), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(PyDateTime_Date),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_7cpython_8datetime_date) __PYX_ERR(3, 9, __pyx_L1_error)
  __pyx_ptype_7cpython_8datetime_time = __Pyx_ImportType_0_29_36(__pyx_t_1, "datetime", "time", sizeof(PyDateTime_Time), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(PyDateTime_Time),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_7cpython_8datetime_time) __PYX_ERR(3, 12, __pyx_L1_error)
  __pyx_ptype_7cpython_8datetime_datetime = __Pyx_ImportType_0_29_36(__pyx_t_1, "datetime", "datetime", sizeof(PyDateTime_DateTime), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(PyDateTime_DateTime),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_7cpython_8datetime_datetime) __PYX_ERR(3, 15, __pyx_L1_error)
  __pyx_ptype_7cpython_8datetime_timedelta = __Pyx_ImportType_0_29_36(__pyx_t_1, "datetime", "timedelta", sizeof(PyDateTime_Delta), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(PyDateTime_Delta),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_7cpython_8datetime_timedelta) __PYX_ERR(3, 18, __pyx_L1_error)
  __pyx_ptype_7cpython_8datetime_tzinfo = __Pyx_ImportType_0_29_36(__pyx_t_1, "datetime", "tzinfo", sizeof(PyDateTime_TZInfo), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(PyDateTime_TZInfo),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_7cpython_8datetime_tzinfo) __PYX_ERR(3, 21, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("apache_beam.metrics.cells"); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_11apache_beam_7metrics_5cells_MetricCell = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.metrics.cells", "MetricCell", sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell) __PYX_ERR(11, 23, __pyx_L1_error)
  __pyx_vtabptr_11apache_beam_7metrics_5cells_MetricCell = (struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell*)__Pyx_GetVtable(__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell->tp_dict); if (unlikely(!__pyx_vtabptr_11apache_beam_7metrics_5cells_MetricCell)) __PYX_ERR(11, 23, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7metrics_5cells_CounterCell = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.metrics.cells", "CounterCell", sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell) __PYX_ERR(11, 29, __pyx_L1_error)
  __pyx_vtabptr_11apache_beam_7metrics_5cells_CounterCell = (struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_CounterCell*)__Pyx_GetVtable(__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell->tp_dict); if (unlikely(!__pyx_vtabptr_11apache_beam_7metrics_5cells_CounterCell)) __PYX_ERR(11, 29, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.metrics.cells", "DistributionCell", sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell) __PYX_ERR(11, 36, __pyx_L1_error)
  __pyx_vtabptr_11apache_beam_7metrics_5cells_DistributionCell = (struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_DistributionCell*)__Pyx_GetVtable(__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell->tp_dict); if (unlikely(!__pyx_vtabptr_11apache_beam_7metrics_5cells_DistributionCell)) __PYX_ERR(11, 36, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.metrics.cells", "GaugeCell", sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell) __PYX_ERR(11, 43, __pyx_L1_error)
  __pyx_vtabptr_11apache_beam_7metrics_5cells_GaugeCell = (struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_GaugeCell*)__Pyx_GetVtable(__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell->tp_dict); if (unlikely(!__pyx_vtabptr_11apache_beam_7metrics_5cells_GaugeCell)) __PYX_ERR(11, 43, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7metrics_5cells_DistributionData = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.metrics.cells", "DistributionData", sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData) __PYX_ERR(11, 47, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("apache_beam.metrics.execution"); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.metrics.execution", "_TypedMetricName", sizeof(struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName) __PYX_ERR(12, 26, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7metrics_9execution_MetricUpdater = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.metrics.execution", "MetricUpdater", sizeof(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_11apache_beam_7metrics_9execution_MetricUpdater) __PYX_ERR(12, 36, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.metrics.execution", "MetricsContainer", sizeof(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer) __PYX_ERR(12, 42, __pyx_L1_error)
  __pyx_vtabptr_11apache_beam_7metrics_9execution_MetricsContainer = (struct __pyx_vtabstruct_11apache_beam_7metrics_9execution_MetricsContainer*)__Pyx_GetVtable(__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer->tp_dict); if (unlikely(!__pyx_vtabptr_11apache_beam_7metrics_9execution_MetricsContainer)) __PYX_ERR(12, 42, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("apache_beam.runners.worker.statesampler_fast"); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.runners.worker.statesampler_fast", "StateSampler", sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler) __PYX_ERR(13, 25, __pyx_L1_error)
  __pyx_vtabptr_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler = (struct __pyx_vtabstruct_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler*)__Pyx_GetVtable(__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler->tp_dict); if (unlikely(!__pyx_vtabptr_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler)) __PYX_ERR(13, 25, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.runners.worker.statesampler_fast", "ScopedState", sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState) __PYX_ERR(13, 52, __pyx_L1_error)
  __pyx_vtabptr_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState = (struct __pyx_vtabstruct_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState*)__Pyx_GetVtable(__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState->tp_dict); if (unlikely(!__pyx_vtabptr_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState)) __PYX_ERR(13, 52, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("apache_beam.runners.worker.opcounters"); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.runners.worker.opcounters", "TransformIOCounter", sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter) __PYX_ERR(14, 25, __pyx_L1_error)
  __pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter = (struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter*)__Pyx_GetVtable(__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter->tp_dict); if (unlikely(!__pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter)) __PYX_ERR(14, 25, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.runners.worker.opcounters", "NoOpTransformIOCounter", sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter) __PYX_ERR(14, 38, __pyx_L1_error)
  __pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter = (struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter*)__Pyx_GetVtable(__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter->tp_dict); if (unlikely(!__pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter)) __PYX_ERR(14, 38, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.runners.worker.opcounters", "SideInputReadCounter", sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter) __PYX_ERR(14, 42, __pyx_L1_error)
  __pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter = (struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter*)__Pyx_GetVtable(__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter->tp_dict); if (unlikely(!__pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter)) __PYX_ERR(14, 42, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SumAccumulator = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.runners.worker.opcounters", "SumAccumulator", sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SumAccumulator) __PYX_ERR(14, 47, __pyx_L1_error)
  __pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_SumAccumulator = (struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_SumAccumulator*)__Pyx_GetVtable(__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SumAccumulator->tp_dict); if (unlikely(!__pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_SumAccumulator)) __PYX_ERR(14, 47, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.runners.worker.opcounters", "OperationCounters", sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters) __PYX_ERR(14, 53, __pyx_L1_error)
  __pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_OperationCounters = (struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_OperationCounters*)__Pyx_GetVtable(__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters->tp_dict); if (unlikely(!__pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_OperationCounters)) __PYX_ERR(14, 53, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_variable_import_code(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_t_1 = PyImport_ImportModule("apache_beam.runners.common"); 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, "TaggedOutput", (void **)&__pyx_vp_11apache_beam_7runners_6common_TaggedOutput, "PyTypeObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportVoidPtr_0_29_36(__pyx_t_1, "TimestampedValue", (void **)&__pyx_vp_11apache_beam_7runners_6common_TimestampedValue, "PyTypeObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("apache_beam.metrics.execution"); 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, "get_current_tracker", (void **)&__pyx_vp_11apache_beam_7metrics_9execution_get_current_tracker, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportVoidPtr_0_29_36(__pyx_t_1, "_DEFAULT", (void **)&__pyx_vp_11apache_beam_7metrics_9execution__DEFAULT, "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 initoperations(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC initoperations(void)
#else
__Pyx_PyMODINIT_FUNC PyInit_operations(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_operations(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
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_operations(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;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module 'operations' has already been imported. Re-initialisation is not supported.");
    return -1;
  }
  #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_operations(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("operations", __pyx_methods, __pyx_k_Worker_operations_executor, 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__worker__operations) {
    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.worker.operations")) {
      if (unlikely(PyDict_SetItemString(modules, "apache_beam.runners.worker.operations", __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_operations(void)", __pyx_f[0], 1, 0, __PYX_ERR(0, 1, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":26
 * # pylint: disable=super-with-arguments
 * 
 * import collections             # <<<<<<<<<<<<<<
 * import logging
 * import threading
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_collections, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_collections, __pyx_t_1) < 0) __PYX_ERR(0, 26, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":27
 * 
 * import collections
 * import logging             # <<<<<<<<<<<<<<
 * import threading
 * import warnings
 */
  __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/worker/operations.py":28
 * import collections
 * import logging
 * import threading             # <<<<<<<<<<<<<<
 * import warnings
 * from typing import TYPE_CHECKING
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_threading, 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_threading, __pyx_t_1) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":29
 * import logging
 * import threading
 * import warnings             # <<<<<<<<<<<<<<
 * from typing import TYPE_CHECKING
 * from typing import Any
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_warnings, 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_warnings, __pyx_t_1) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":30
 * import threading
 * import warnings
 * from typing import TYPE_CHECKING             # <<<<<<<<<<<<<<
 * from typing import Any
 * from typing import DefaultDict
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_TYPE_CHECKING);
  __Pyx_GIVEREF(__pyx_n_s_TYPE_CHECKING);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_TYPE_CHECKING);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_typing, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30, __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_TYPE_CHECKING); 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_TYPE_CHECKING, __pyx_t_1) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":31
 * import warnings
 * from typing import TYPE_CHECKING
 * from typing import Any             # <<<<<<<<<<<<<<
 * from typing import DefaultDict
 * from typing import Dict
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_Any);
  __Pyx_GIVEREF(__pyx_n_s_Any);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Any);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_typing, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __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_Any); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Any, __pyx_t_2) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":32
 * from typing import TYPE_CHECKING
 * from typing import Any
 * from typing import DefaultDict             # <<<<<<<<<<<<<<
 * from typing import Dict
 * from typing import FrozenSet
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_DefaultDict);
  __Pyx_GIVEREF(__pyx_n_s_DefaultDict);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_DefaultDict);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_typing, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32, __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_DefaultDict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DefaultDict, __pyx_t_1) < 0) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":33
 * from typing import Any
 * from typing import DefaultDict
 * from typing import Dict             # <<<<<<<<<<<<<<
 * from typing import FrozenSet
 * from typing import Hashable
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __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, 33, __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, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Dict, __pyx_t_2) < 0) __PYX_ERR(0, 33, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":34
 * from typing import DefaultDict
 * from typing import Dict
 * from typing import FrozenSet             # <<<<<<<<<<<<<<
 * from typing import Hashable
 * from typing import Iterable
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_FrozenSet);
  __Pyx_GIVEREF(__pyx_n_s_FrozenSet);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_FrozenSet);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_typing, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __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_FrozenSet); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_FrozenSet, __pyx_t_1) < 0) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":35
 * from typing import Dict
 * from typing import FrozenSet
 * from typing import Hashable             # <<<<<<<<<<<<<<
 * from typing import Iterable
 * from typing import Iterator
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_Hashable);
  __Pyx_GIVEREF(__pyx_n_s_Hashable);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Hashable);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_typing, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __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_Hashable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Hashable, __pyx_t_2) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":36
 * from typing import FrozenSet
 * from typing import Hashable
 * from typing import Iterable             # <<<<<<<<<<<<<<
 * from typing import Iterator
 * from typing import List
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __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, 36, __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, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Iterable, __pyx_t_1) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":37
 * from typing import Hashable
 * from typing import Iterable
 * from typing import Iterator             # <<<<<<<<<<<<<<
 * from typing import List
 * from typing import Mapping
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_Iterator);
  __Pyx_GIVEREF(__pyx_n_s_Iterator);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Iterator);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_typing, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __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_Iterator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Iterator, __pyx_t_2) < 0) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":38
 * from typing import Iterable
 * from typing import Iterator
 * from typing import List             # <<<<<<<<<<<<<<
 * from typing import Mapping
 * from typing import NamedTuple
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_List);
  __Pyx_GIVEREF(__pyx_n_s_List);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_List);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_typing, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __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_List); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_List, __pyx_t_1) < 0) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":39
 * from typing import Iterator
 * from typing import List
 * from typing import Mapping             # <<<<<<<<<<<<<<
 * from typing import NamedTuple
 * from typing import Optional
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_Mapping);
  __Pyx_GIVEREF(__pyx_n_s_Mapping);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Mapping);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_typing, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __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_Mapping); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Mapping, __pyx_t_2) < 0) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":40
 * from typing import List
 * from typing import Mapping
 * from typing import NamedTuple             # <<<<<<<<<<<<<<
 * from typing import Optional
 * from typing import Tuple
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_NamedTuple);
  __Pyx_GIVEREF(__pyx_n_s_NamedTuple);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_NamedTuple);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_typing, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __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_NamedTuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NamedTuple, __pyx_t_1) < 0) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":41
 * from typing import Mapping
 * from typing import NamedTuple
 * from typing import Optional             # <<<<<<<<<<<<<<
 * from typing import Tuple
 * 
 */
  __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_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, 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_Optional); 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_Optional, __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/worker/operations.py":42
 * from typing import NamedTuple
 * from typing import Optional
 * from typing import Tuple             # <<<<<<<<<<<<<<
 * 
 * from apache_beam import coders
 */
  __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_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, 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_Tuple); 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_Tuple, __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/worker/operations.py":44
 * from typing import Tuple
 * 
 * from apache_beam import coders             # <<<<<<<<<<<<<<
 * from apache_beam.internal import pickler
 * from apache_beam.io import iobase
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_coders);
  __Pyx_GIVEREF(__pyx_n_s_coders);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_coders);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __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_coders); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_coders, __pyx_t_2) < 0) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":45
 * 
 * from apache_beam import coders
 * from apache_beam.internal import pickler             # <<<<<<<<<<<<<<
 * from apache_beam.io import iobase
 * from apache_beam.metrics import monitoring_infos
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_pickler);
  __Pyx_GIVEREF(__pyx_n_s_pickler);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_pickler);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_internal, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __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_pickler); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pickler, __pyx_t_1) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":46
 * from apache_beam import coders
 * from apache_beam.internal import pickler
 * from apache_beam.io import iobase             # <<<<<<<<<<<<<<
 * from apache_beam.metrics import monitoring_infos
 * from apache_beam.metrics.cells import DistributionData
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_iobase);
  __Pyx_GIVEREF(__pyx_n_s_iobase);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_iobase);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_io, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __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_iobase); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_iobase, __pyx_t_2) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":47
 * from apache_beam.internal import pickler
 * from apache_beam.io import iobase
 * from apache_beam.metrics import monitoring_infos             # <<<<<<<<<<<<<<
 * from apache_beam.metrics.cells import DistributionData
 * from apache_beam.metrics.execution import MetricsContainer
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_monitoring_infos);
  __Pyx_GIVEREF(__pyx_n_s_monitoring_infos);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_monitoring_infos);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_metrics, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __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_monitoring_infos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_monitoring_infos, __pyx_t_1) < 0) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":48
 * from apache_beam.io import iobase
 * from apache_beam.metrics import monitoring_infos
 * from apache_beam.metrics.cells import DistributionData             # <<<<<<<<<<<<<<
 * from apache_beam.metrics.execution import MetricsContainer
 * from apache_beam.portability.api import metrics_pb2
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_DistributionData);
  __Pyx_GIVEREF(__pyx_n_s_DistributionData);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_DistributionData);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_metrics_cells, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __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_DistributionData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DistributionData, __pyx_t_2) < 0) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":49
 * from apache_beam.metrics import monitoring_infos
 * from apache_beam.metrics.cells import DistributionData
 * from apache_beam.metrics.execution import MetricsContainer             # <<<<<<<<<<<<<<
 * from apache_beam.portability.api import metrics_pb2
 * from apache_beam.runners import common
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_MetricsContainer);
  __Pyx_GIVEREF(__pyx_n_s_MetricsContainer);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_MetricsContainer);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_metrics_execution, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __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_MetricsContainer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MetricsContainer, __pyx_t_1) < 0) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":50
 * from apache_beam.metrics.cells import DistributionData
 * from apache_beam.metrics.execution import MetricsContainer
 * from apache_beam.portability.api import metrics_pb2             # <<<<<<<<<<<<<<
 * from apache_beam.runners import common
 * from apache_beam.runners.common import Receiver
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_metrics_pb2);
  __Pyx_GIVEREF(__pyx_n_s_metrics_pb2);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_metrics_pb2);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_portability_api, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __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_metrics_pb2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_metrics_pb2, __pyx_t_2) < 0) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":51
 * from apache_beam.metrics.execution import MetricsContainer
 * from apache_beam.portability.api import metrics_pb2
 * from apache_beam.runners import common             # <<<<<<<<<<<<<<
 * from apache_beam.runners.common import Receiver
 * from apache_beam.runners.worker import opcounters
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_common);
  __Pyx_GIVEREF(__pyx_n_s_common);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_common);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_runners, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __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_common); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_common, __pyx_t_1) < 0) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":52
 * from apache_beam.portability.api import metrics_pb2
 * from apache_beam.runners import common
 * from apache_beam.runners.common import Receiver             # <<<<<<<<<<<<<<
 * from apache_beam.runners.worker import opcounters
 * from apache_beam.runners.worker import operation_specs
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_Receiver);
  __Pyx_GIVEREF(__pyx_n_s_Receiver);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Receiver);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_runners_common, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":53
 * from apache_beam.runners import common
 * from apache_beam.runners.common import Receiver
 * from apache_beam.runners.worker import opcounters             # <<<<<<<<<<<<<<
 * from apache_beam.runners.worker import operation_specs
 * from apache_beam.runners.worker import sideinputs
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_opcounters);
  __Pyx_GIVEREF(__pyx_n_s_opcounters);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_opcounters);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_runners_worker, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 53, __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_opcounters); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_opcounters, __pyx_t_1) < 0) __PYX_ERR(0, 53, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":54
 * from apache_beam.runners.common import Receiver
 * from apache_beam.runners.worker import opcounters
 * from apache_beam.runners.worker import operation_specs             # <<<<<<<<<<<<<<
 * from apache_beam.runners.worker import sideinputs
 * from apache_beam.runners.worker.data_sampler import DataSampler
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 54, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_operation_specs);
  __Pyx_GIVEREF(__pyx_n_s_operation_specs);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_operation_specs);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_runners_worker, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 54, __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_operation_specs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 54, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_operation_specs, __pyx_t_2) < 0) __PYX_ERR(0, 54, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":55
 * from apache_beam.runners.worker import opcounters
 * from apache_beam.runners.worker import operation_specs
 * from apache_beam.runners.worker import sideinputs             # <<<<<<<<<<<<<<
 * from apache_beam.runners.worker.data_sampler import DataSampler
 * from apache_beam.transforms import sideinputs as apache_sideinputs
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_sideinputs);
  __Pyx_GIVEREF(__pyx_n_s_sideinputs);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_sideinputs);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_runners_worker, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __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_sideinputs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sideinputs, __pyx_t_1) < 0) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":56
 * from apache_beam.runners.worker import operation_specs
 * from apache_beam.runners.worker import sideinputs
 * from apache_beam.runners.worker.data_sampler import DataSampler             # <<<<<<<<<<<<<<
 * from apache_beam.transforms import sideinputs as apache_sideinputs
 * from apache_beam.transforms import combiners
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_DataSampler);
  __Pyx_GIVEREF(__pyx_n_s_DataSampler);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_DataSampler);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_runners_worker_data, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __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_DataSampler); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DataSampler, __pyx_t_2) < 0) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":57
 * from apache_beam.runners.worker import sideinputs
 * from apache_beam.runners.worker.data_sampler import DataSampler
 * from apache_beam.transforms import sideinputs as apache_sideinputs             # <<<<<<<<<<<<<<
 * from apache_beam.transforms import combiners
 * from apache_beam.transforms import core
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_sideinputs);
  __Pyx_GIVEREF(__pyx_n_s_sideinputs);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_sideinputs);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_transforms, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __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_sideinputs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_apache_sideinputs, __pyx_t_1) < 0) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":58
 * from apache_beam.runners.worker.data_sampler import DataSampler
 * from apache_beam.transforms import sideinputs as apache_sideinputs
 * from apache_beam.transforms import combiners             # <<<<<<<<<<<<<<
 * 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, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_combiners);
  __Pyx_GIVEREF(__pyx_n_s_combiners);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_combiners);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_transforms, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 58, __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_combiners); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_combiners, __pyx_t_2) < 0) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":59
 * from apache_beam.transforms import sideinputs as apache_sideinputs
 * from apache_beam.transforms import combiners
 * from apache_beam.transforms import core             # <<<<<<<<<<<<<<
 * from apache_beam.transforms import userstate
 * from apache_beam.transforms import window
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 59, __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, 59, __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, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_core, __pyx_t_1) < 0) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":60
 * from apache_beam.transforms import combiners
 * from apache_beam.transforms import core
 * from apache_beam.transforms import userstate             # <<<<<<<<<<<<<<
 * from apache_beam.transforms import window
 * from apache_beam.transforms.combiners import PhasedCombineFnExecutor
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __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, 60, __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, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_userstate, __pyx_t_2) < 0) __PYX_ERR(0, 60, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":61
 * from apache_beam.transforms import core
 * from apache_beam.transforms import userstate
 * from apache_beam.transforms import window             # <<<<<<<<<<<<<<
 * from apache_beam.transforms.combiners import PhasedCombineFnExecutor
 * from apache_beam.transforms.combiners import curry_combine_fn
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_window);
  __Pyx_GIVEREF(__pyx_n_s_window);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_window);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_transforms, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_window); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_window, __pyx_t_1) < 0) __PYX_ERR(0, 61, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":62
 * from apache_beam.transforms import userstate
 * from apache_beam.transforms import window
 * from apache_beam.transforms.combiners import PhasedCombineFnExecutor             # <<<<<<<<<<<<<<
 * from apache_beam.transforms.combiners import curry_combine_fn
 * from apache_beam.transforms.window import GlobalWindows
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_PhasedCombineFnExecutor);
  __Pyx_GIVEREF(__pyx_n_s_PhasedCombineFnExecutor);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PhasedCombineFnExecutor);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_transforms_combiners, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __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_PhasedCombineFnExecutor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PhasedCombineFnExecutor, __pyx_t_2) < 0) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":63
 * from apache_beam.transforms import window
 * from apache_beam.transforms.combiners import PhasedCombineFnExecutor
 * from apache_beam.transforms.combiners import curry_combine_fn             # <<<<<<<<<<<<<<
 * from apache_beam.transforms.window import GlobalWindows
 * from apache_beam.typehints.batch import BatchConverter
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_curry_combine_fn);
  __Pyx_GIVEREF(__pyx_n_s_curry_combine_fn);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_curry_combine_fn);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_transforms_combiners, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 63, __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_curry_combine_fn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_curry_combine_fn, __pyx_t_1) < 0) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":64
 * from apache_beam.transforms.combiners import PhasedCombineFnExecutor
 * from apache_beam.transforms.combiners import curry_combine_fn
 * from apache_beam.transforms.window import GlobalWindows             # <<<<<<<<<<<<<<
 * from apache_beam.typehints.batch import BatchConverter
 * from apache_beam.utils.windowed_value import WindowedBatch
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __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, 64, __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, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_GlobalWindows, __pyx_t_2) < 0) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":65
 * from apache_beam.transforms.combiners import curry_combine_fn
 * from apache_beam.transforms.window import GlobalWindows
 * from apache_beam.typehints.batch import BatchConverter             # <<<<<<<<<<<<<<
 * from apache_beam.utils.windowed_value import WindowedBatch
 * from apache_beam.utils.windowed_value import WindowedValue
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_BatchConverter);
  __Pyx_GIVEREF(__pyx_n_s_BatchConverter);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_BatchConverter);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_typehints_batch, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __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_BatchConverter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BatchConverter, __pyx_t_1) < 0) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":66
 * from apache_beam.transforms.window import GlobalWindows
 * from apache_beam.typehints.batch import BatchConverter
 * from apache_beam.utils.windowed_value import WindowedBatch             # <<<<<<<<<<<<<<
 * from apache_beam.utils.windowed_value import WindowedValue
 * 
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_WindowedBatch);
  __Pyx_GIVEREF(__pyx_n_s_WindowedBatch);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_WindowedBatch);
  __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, 66, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":67
 * from apache_beam.typehints.batch import BatchConverter
 * from apache_beam.utils.windowed_value import WindowedBatch
 * from apache_beam.utils.windowed_value import WindowedValue             # <<<<<<<<<<<<<<
 * 
 * if TYPE_CHECKING:
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_WindowedValue);
  __Pyx_GIVEREF(__pyx_n_s_WindowedValue);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_WindowedValue);
  __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, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":69
 * from apache_beam.utils.windowed_value import WindowedValue
 * 
 * if TYPE_CHECKING:             # <<<<<<<<<<<<<<
 *   from apache_beam.runners.sdf_utils import SplitResultPrimary
 *   from apache_beam.runners.sdf_utils import SplitResultResidual
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_TYPE_CHECKING); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __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, 69, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "apache_beam/runners/worker/operations.py":70
 * 
 * if TYPE_CHECKING:
 *   from apache_beam.runners.sdf_utils import SplitResultPrimary             # <<<<<<<<<<<<<<
 *   from apache_beam.runners.sdf_utils import SplitResultResidual
 *   from apache_beam.runners.worker.bundle_processor import ExecutionContext
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __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, 70, __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, 70, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_SplitResultPrimary, __pyx_t_2) < 0) __PYX_ERR(0, 70, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/runners/worker/operations.py":71
 * if TYPE_CHECKING:
 *   from apache_beam.runners.sdf_utils import SplitResultPrimary
 *   from apache_beam.runners.sdf_utils import SplitResultResidual             # <<<<<<<<<<<<<<
 *   from apache_beam.runners.worker.bundle_processor import ExecutionContext
 *   from apache_beam.runners.worker.data_sampler import OutputSampler
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __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, 71, __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, 71, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_SplitResultResidual, __pyx_t_1) < 0) __PYX_ERR(0, 71, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/runners/worker/operations.py":72
 *   from apache_beam.runners.sdf_utils import SplitResultPrimary
 *   from apache_beam.runners.sdf_utils import SplitResultResidual
 *   from apache_beam.runners.worker.bundle_processor import ExecutionContext             # <<<<<<<<<<<<<<
 *   from apache_beam.runners.worker.data_sampler import OutputSampler
 *   from apache_beam.runners.worker.statesampler import StateSampler
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_ExecutionContext);
    __Pyx_GIVEREF(__pyx_n_s_ExecutionContext);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_ExecutionContext);
    __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_runners_worker_bundl, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __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_ExecutionContext); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_ExecutionContext, __pyx_t_2) < 0) __PYX_ERR(0, 72, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/runners/worker/operations.py":73
 *   from apache_beam.runners.sdf_utils import SplitResultResidual
 *   from apache_beam.runners.worker.bundle_processor import ExecutionContext
 *   from apache_beam.runners.worker.data_sampler import OutputSampler             # <<<<<<<<<<<<<<
 *   from apache_beam.runners.worker.statesampler import StateSampler
 *   from apache_beam.transforms.userstate import TimerSpec
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_OutputSampler);
    __Pyx_GIVEREF(__pyx_n_s_OutputSampler);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_OutputSampler);
    __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_runners_worker_data, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __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_OutputSampler); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_OutputSampler, __pyx_t_1) < 0) __PYX_ERR(0, 73, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/runners/worker/operations.py":74
 *   from apache_beam.runners.worker.bundle_processor import ExecutionContext
 *   from apache_beam.runners.worker.data_sampler import OutputSampler
 *   from apache_beam.runners.worker.statesampler import StateSampler             # <<<<<<<<<<<<<<
 *   from apache_beam.transforms.userstate import TimerSpec
 * 
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 74, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_StateSampler);
    __Pyx_GIVEREF(__pyx_n_s_StateSampler);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_StateSampler);
    __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_runners_worker_state, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __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_StateSampler); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 74, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_StateSampler, __pyx_t_2) < 0) __PYX_ERR(0, 74, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/runners/worker/operations.py":75
 *   from apache_beam.runners.worker.data_sampler import OutputSampler
 *   from apache_beam.runners.worker.statesampler import StateSampler
 *   from apache_beam.transforms.userstate import TimerSpec             # <<<<<<<<<<<<<<
 * 
 * # Allow some "pure mode" declarations.
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 75, __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_userstate, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 75, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_TimerSpec); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 75, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_TimerSpec, __pyx_t_1) < 0) __PYX_ERR(0, 75, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/runners/worker/operations.py":69
 * from apache_beam.utils.windowed_value import WindowedValue
 * 
 * if TYPE_CHECKING:             # <<<<<<<<<<<<<<
 *   from apache_beam.runners.sdf_utils import SplitResultPrimary
 *   from apache_beam.runners.sdf_utils import SplitResultResidual
 */
  }

  /* "apache_beam/runners/worker/operations.py":78
 * 
 * # Allow some "pure mode" declarations.
 * try:             # <<<<<<<<<<<<<<
 *   import cython
 * except ImportError:
 */
  {
    (void)__pyx_t_4; (void)__pyx_t_5; (void)__pyx_t_6; /* mark used */
    /*try:*/ {

      /* "apache_beam/runners/worker/operations.py":79
 * # Allow some "pure mode" declarations.
 * try:
 *   import cython             # <<<<<<<<<<<<<<
 * except ImportError:
 * 
 */
    }
  }

  /* "apache_beam/runners/worker/operations.py":87
 *   globals()['cython'] = FakeCython()
 * 
 * _globally_windowed_value = GlobalWindows.windowed_value(None)             # <<<<<<<<<<<<<<
 * _global_window_type = type(_globally_windowed_value.windows[0])
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_GlobalWindows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_windowed_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 87, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__145, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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, 87, __pyx_L1_error)
  __Pyx_XGOTREF(((PyObject *)__pyx_v_11apache_beam_7runners_6worker_10operations__globally_windowed_value));
  __Pyx_DECREF_SET(__pyx_v_11apache_beam_7runners_6worker_10operations__globally_windowed_value, ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_t_2));
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":88
 * 
 * _globally_windowed_value = GlobalWindows.windowed_value(None)
 * _global_window_type = type(_globally_windowed_value.windows[0])             # <<<<<<<<<<<<<<
 * 
 * _LOGGER = logging.getLogger(__name__)
 */
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_11apache_beam_7runners_6worker_10operations__globally_windowed_value->windows, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_t_2)));
  __Pyx_XGOTREF(((PyObject *)__pyx_v_11apache_beam_7runners_6worker_10operations__global_window_type));
  __Pyx_DECREF_SET(__pyx_v_11apache_beam_7runners_6worker_10operations__global_window_type, ((PyTypeObject*)((PyObject *)Py_TYPE(__pyx_t_2))));
  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_t_2)));
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":90
 * _global_window_type = type(_globally_windowed_value.windows[0])
 * 
 * _LOGGER = logging.getLogger(__name__)             # <<<<<<<<<<<<<<
 * 
 * SdfSplitResultsPrimary = Tuple['DoOperation', 'SplitResultPrimary']
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_logging); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __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, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_LOGGER, __pyx_t_7) < 0) __PYX_ERR(0, 90, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "apache_beam/runners/worker/operations.py":92
 * _LOGGER = logging.getLogger(__name__)
 * 
 * SdfSplitResultsPrimary = Tuple['DoOperation', 'SplitResultPrimary']             # <<<<<<<<<<<<<<
 * SdfSplitResultsResidual = Tuple['DoOperation', 'SplitResultResidual']
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_Tuple); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 92, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_tuple__146); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SdfSplitResultsPrimary, __pyx_t_2) < 0) __PYX_ERR(0, 92, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":93
 * 
 * SdfSplitResultsPrimary = Tuple['DoOperation', 'SplitResultPrimary']
 * SdfSplitResultsResidual = Tuple['DoOperation', 'SplitResultResidual']             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Tuple); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_tuple__147); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SdfSplitResultsResidual, __pyx_t_7) < 0) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "apache_beam/runners/worker/operations.py":97
 * 
 * # TODO(BEAM-9324) Remove these workarounds once upgraded to Cython 3
 * def _cast_to_operation(value):             # <<<<<<<<<<<<<<
 *   if cython.compiled:
 *     return cython.cast(Operation, value)
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_1_cast_to_operation, 0, __pyx_n_s_cast_to_operation, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj_)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cast_to_operation, __pyx_t_7) < 0) __PYX_ERR(0, 97, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "apache_beam/runners/worker/operations.py":105
 * 
 * # TODO(BEAM-9324) Remove these workarounds once upgraded to Cython 3
 * def _cast_to_receiver(value):             # <<<<<<<<<<<<<<
 *   if cython.compiled:
 *     return cython.cast(Receiver, value)
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_3_cast_to_receiver, 0, __pyx_n_s_cast_to_receiver, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__2)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cast_to_receiver, __pyx_t_7) < 0) __PYX_ERR(0, 105, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "apache_beam/runners/worker/operations.py":121
 *   """
 *   @staticmethod
 *   def create(counter_factory,             # <<<<<<<<<<<<<<
 *              step_name,  # type: str
 *              output_index,
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_1create, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ConsumerSet_create, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__3)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet->tp_dict, __pyx_n_s_create, __pyx_t_7) < 0) __PYX_ERR(0, 121, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet);

  /* "apache_beam/runners/worker/operations.py":120
 *   ConsumerSet are attached to the outputting Operation.
 *   """
 *   @staticmethod             # <<<<<<<<<<<<<<
 *   def create(counter_factory,
 *              step_name,  # type: str
 */
  __Pyx_GetNameInClass(__pyx_t_7, (PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet, __pyx_n_s_create); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet->tp_dict, __pyx_n_s_create, __pyx_t_2) < 0) __PYX_ERR(0, 121, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet);

  /* "apache_beam/runners/worker/operations.py":185
 *     self.execution_context = None  # type: Optional[ExecutionContext]
 * 
 *   def try_split(self, fraction_of_remainder):             # <<<<<<<<<<<<<<
 *     # type: (...) -> Optional[Any]
 *     # TODO(SDF): Consider supporting splitting each consumer individually.
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5try_split, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ConsumerSet_try_split, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet->tp_dict, __pyx_n_s_try_split, __pyx_t_2) < 0) __PYX_ERR(0, 185, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet);

  /* "apache_beam/runners/worker/operations.py":194
 *     return None
 * 
 *   def current_element_progress(self):             # <<<<<<<<<<<<<<
 *     # type: () -> Optional[iobase.RestrictionProgress]
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_7current_element_progress, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ConsumerSet_current_element_prog, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__5)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet->tp_dict, __pyx_n_s_current_element_progress, __pyx_t_2) < 0) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet);

  /* "apache_beam/runners/worker/operations.py":206
 *     return None
 * 
 *   def update_counters_start(self, windowed_value):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     self.opcounter.update_from(windowed_value)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9update_counters_start, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ConsumerSet_update_counters_star, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__6)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet->tp_dict, __pyx_n_s_update_counters_start, __pyx_t_2) < 0) __PYX_ERR(0, 206, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet);

  /* "apache_beam/runners/worker/operations.py":224
 *         self.element_sampler.has_element = True
 * 
 *   def update_counters_finish(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     self.opcounter.update_collect()
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_11update_counters_finish, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ConsumerSet_update_counters_fini, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet->tp_dict, __pyx_n_s_update_counters_finish, __pyx_t_2) < 0) __PYX_ERR(0, 224, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet);

  /* "apache_beam/runners/worker/operations.py":228
 *     self.opcounter.update_collect()
 * 
 *   def update_counters_batch(self, windowed_batch):             # <<<<<<<<<<<<<<
 *     # type: (WindowedBatch) -> None
 *     self.opcounter.update_from_batch(windowed_batch)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_13update_counters_batch, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ConsumerSet_update_counters_batc, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__8)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet->tp_dict, __pyx_n_s_update_counters_batch, __pyx_t_2) < 0) __PYX_ERR(0, 228, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ConsumerSet___reduce_cython, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__11)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_ConsumerSet, (type(self), 0x94398cf, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ConsumerSet__set_state(self, __pyx_state)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_19__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ConsumerSet___setstate_cython, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__12)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet);

  /* "apache_beam/runners/worker/operations.py":263
 *     self.consumer = consumer
 * 
 *   def receive(self, windowed_value):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     self.update_counters_start(windowed_value)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_3receive, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SingletonElementConsumerSet_rece_2, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__13)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet->tp_dict, __pyx_n_s_receive, __pyx_t_2) < 0) __PYX_ERR(0, 263, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet);

  /* "apache_beam/runners/worker/operations.py":269
 *     self.update_counters_finish()
 * 
 *   def receive_batch(self, windowed_batch):             # <<<<<<<<<<<<<<
 *     raise AssertionError(
 *         "SingletonElementConsumerSet.receive_batch is not implemented")
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_5receive_batch, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SingletonElementConsumerSet_rece_3, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__14)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet->tp_dict, __pyx_n_s_receive_batch, __pyx_t_2) < 0) __PYX_ERR(0, 269, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet);

  /* "apache_beam/runners/worker/operations.py":273
 *         "SingletonElementConsumerSet.receive_batch is not implemented")
 * 
 *   def flush(self):             # <<<<<<<<<<<<<<
 *     # SingletonElementConsumerSet has no buffer to flush
 *     pass
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_7flush, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SingletonElementConsumerSet_flus, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__16)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet->tp_dict, __pyx_n_s_flush, __pyx_t_2) < 0) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet);

  /* "apache_beam/runners/worker/operations.py":277
 *     pass
 * 
 *   def try_split(self, fraction_of_remainder):             # <<<<<<<<<<<<<<
 *     # type: (...) -> Optional[Any]
 *     return self.consumer.try_split(fraction_of_remainder)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_9try_split, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SingletonElementConsumerSet_try, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__17)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet->tp_dict, __pyx_n_s_try_split, __pyx_t_2) < 0) __PYX_ERR(0, 277, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet);

  /* "apache_beam/runners/worker/operations.py":281
 *     return self.consumer.try_split(fraction_of_remainder)
 * 
 *   def current_element_progress(self):             # <<<<<<<<<<<<<<
 *     return self.consumer.current_element_progress()
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_11current_element_progress, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SingletonElementConsumerSet_curr, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__18)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet->tp_dict, __pyx_n_s_current_element_progress, __pyx_t_2) < 0) __PYX_ERR(0, 281, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SingletonElementConsumerSet___re, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__19)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_SingletonElementConsumerSet, (type(self), 0x98fe48c, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_SingletonElementConsumerSet__set_state(self, __pyx_state)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SingletonElementConsumerSet___se, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__20)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet);

  /* "apache_beam/runners/worker/operations.py":288
 *   """ConsumerSet implementation that handles all combinations of possible edges.
 *   """
 *   MAX_BATCH_SIZE = 4096             # <<<<<<<<<<<<<<
 * 
 *   def __init__(self,
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet->tp_dict, __pyx_n_s_MAX_BATCH_SIZE, __pyx_int_4096) < 0) __PYX_ERR(0, 288, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet);

  /* "apache_beam/runners/worker/operations.py":346
 *     self._batched_elements: List[Any] = []
 * 
 *   def receive(self, windowed_value):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_3receive, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GeneralPurposeConsumerSet_receiv, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__21)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet->tp_dict, __pyx_n_s_receive, __pyx_t_2) < 0) __PYX_ERR(0, 346, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet);

  /* "apache_beam/runners/worker/operations.py":364
 *     self.update_counters_finish()
 * 
 *   def receive_batch(self, windowed_batch):             # <<<<<<<<<<<<<<
 *     if self.element_consumers:
 *       for wv in windowed_batch.as_windowed_values(
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_5receive_batch, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GeneralPurposeConsumerSet_receiv_2, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__22)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet->tp_dict, __pyx_n_s_receive_batch, __pyx_t_2) < 0) __PYX_ERR(0, 364, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet);

  /* "apache_beam/runners/worker/operations.py":395
 *     self.update_counters_batch(windowed_batch)
 * 
 *   def flush(self):             # <<<<<<<<<<<<<<
 *     if not self.has_batch_consumers or not self._batched_elements:
 *       return
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_7flush, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GeneralPurposeConsumerSet_flush, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__23)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet->tp_dict, __pyx_n_s_flush, __pyx_t_2) < 0) __PYX_ERR(0, 395, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GeneralPurposeConsumerSet___redu, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__24)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_GeneralPurposeConsumerSet, (type(self), 0x331df85, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_GeneralPurposeConsumerSet__set_state(self, __pyx_state)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GeneralPurposeConsumerSet___sets, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__25)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet);

  /* "apache_beam/runners/worker/operations.py":464
 *     self.data_sampler: Optional[DataSampler] = None
 * 
 *   def setup(self, data_sampler=None):             # <<<<<<<<<<<<<<
 *     # type: (Optional[DataSampler]) -> None
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_3setup, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Operation_setup, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__26)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation->tp_dict, __pyx_n_s_setup, __pyx_t_2) < 0) __PYX_ERR(0, 464, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation);

  /* "apache_beam/runners/worker/operations.py":500
 *     self.setup_done = True
 * 
 *   def start(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_5start, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Operation_start, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation->tp_dict, __pyx_n_s_start, __pyx_t_2) < 0) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation);

  /* "apache_beam/runners/worker/operations.py":514
 *         receiver.execution_context = self.execution_context
 * 
 *   def get_batching_preference(self):             # <<<<<<<<<<<<<<
 *     # By default operations don't support batching, require Receiver to unbatch
 *     return common.BatchingPreference.BATCH_FORBIDDEN
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_7get_batching_preference, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Operation_get_batching_preferenc, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation->tp_dict, __pyx_n_s_get_batching_preference, __pyx_t_2) < 0) __PYX_ERR(0, 514, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation);

  /* "apache_beam/runners/worker/operations.py":518
 *     return common.BatchingPreference.BATCH_FORBIDDEN
 * 
 *   def get_input_batch_converter(self) -> Optional[BatchConverter]:             # <<<<<<<<<<<<<<
 *     """Returns a batch type converter if this operation can accept a batch,
 *     otherwise None."""
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_Optional); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BatchConverter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_return, __pyx_t_8) < 0) __PYX_ERR(0, 518, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_9get_input_batch_converter, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Operation_get_input_batch_conver, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__32)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation->tp_dict, __pyx_n_s_get_input_batch_converter, __pyx_t_8) < 0) __PYX_ERR(0, 518, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation);

  /* "apache_beam/runners/worker/operations.py":523
 *     return None
 * 
 *   def get_output_batch_converter(self) -> Optional[BatchConverter]:             # <<<<<<<<<<<<<<
 *     """Returns a batch type converter if this operation can produce a batch,
 *     otherwise None."""
 */
  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Optional); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BatchConverter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_return, __pyx_t_7) < 0) __PYX_ERR(0, 523, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_11get_output_batch_converter, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Operation_get_output_batch_conve, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_7, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation->tp_dict, __pyx_n_s_get_output_batch_converter, __pyx_t_7) < 0) __PYX_ERR(0, 523, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation);

  /* "apache_beam/runners/worker/operations.py":528
 *     return None
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_13process, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Operation_process, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__34)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation->tp_dict, __pyx_n_s_process, __pyx_t_7) < 0) __PYX_ERR(0, 528, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation);

  /* "apache_beam/runners/worker/operations.py":534
 *     pass
 * 
 *   def process_batch(self, batch: WindowedBatch):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_batch, __pyx_n_u_WindowedBatch) < 0) __PYX_ERR(0, 534, __pyx_L1_error)
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_15process_batch, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Operation_process_batch, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_7);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation->tp_dict, __pyx_n_s_process_batch, __pyx_t_8) < 0) __PYX_ERR(0, 534, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation);

  /* "apache_beam/runners/worker/operations.py":537
 *     pass
 * 
 *   def finalize_bundle(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     pass
 */
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_17finalize_bundle, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Operation_finalize_bundle, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__36)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation->tp_dict, __pyx_n_s_finalize_bundle, __pyx_t_8) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation);

  /* "apache_beam/runners/worker/operations.py":541
 *     pass
 * 
 *   def needs_finalization(self):             # <<<<<<<<<<<<<<
 *     return False
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_19needs_finalization, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Operation_needs_finalization, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation->tp_dict, __pyx_n_s_needs_finalization, __pyx_t_8) < 0) __PYX_ERR(0, 541, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation);

  /* "apache_beam/runners/worker/operations.py":544
 *     return False
 * 
 *   def try_split(self, fraction_of_remainder):             # <<<<<<<<<<<<<<
 *     # type: (...) -> Optional[Any]
 *     return None
 */
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_21try_split, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Operation_try_split, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__38)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation->tp_dict, __pyx_n_s_try_split, __pyx_t_8) < 0) __PYX_ERR(0, 544, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation);

  /* "apache_beam/runners/worker/operations.py":548
 *     return None
 * 
 *   def current_element_progress(self):             # <<<<<<<<<<<<<<
 *     return None
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_23current_element_progress, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Operation_current_element_progre, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation->tp_dict, __pyx_n_s_current_element_progress, __pyx_t_8) < 0) __PYX_ERR(0, 548, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation);

  /* "apache_beam/runners/worker/operations.py":551
 *     return None
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_25finish, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Operation_finish, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation->tp_dict, __pyx_n_s_finish, __pyx_t_8) < 0) __PYX_ERR(0, 551, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation);

  /* "apache_beam/runners/worker/operations.py":558
 *       _cast_to_receiver(receiver).flush()
 * 
 *   def teardown(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_27teardown, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Operation_teardown, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__41)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation->tp_dict, __pyx_n_s_teardown, __pyx_t_8) < 0) __PYX_ERR(0, 558, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation);

  /* "apache_beam/runners/worker/operations.py":566
 *     pass
 * 
 *   def reset(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     self.metrics_container.reset()
 */
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_29reset, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Operation_reset, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__42)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation->tp_dict, __pyx_n_s_reset, __pyx_t_8) < 0) __PYX_ERR(0, 566, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation);

  /* "apache_beam/runners/worker/operations.py":570
 *     self.metrics_container.reset()
 * 
 *   def output(self, windowed_value, output_index=0):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue, int) -> None
 *     _cast_to_receiver(self.receivers[output_index]).receive(windowed_value)
 */
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_31output, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Operation_output, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation->tp_dict, __pyx_n_s_output, __pyx_t_8) < 0) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation);

  /* "apache_beam/runners/worker/operations.py":574
 *     _cast_to_receiver(self.receivers[output_index]).receive(windowed_value)
 * 
 *   def add_receiver(self, operation, output_index=0):             # <<<<<<<<<<<<<<
 *     # type: (Operation, int) -> None
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_33add_receiver, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Operation_add_receiver, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation->tp_dict, __pyx_n_s_add_receiver, __pyx_t_8) < 0) __PYX_ERR(0, 574, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation);

  /* "apache_beam/runners/worker/operations.py":580
 *     self.consumers[output_index].append(operation)
 * 
 *   def monitoring_infos(self, transform_id, tag_to_pcollection_id):             # <<<<<<<<<<<<<<
 *     # type: (str, Dict[str, str]) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo]
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_35monitoring_infos, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Operation_monitoring_infos, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation->tp_dict, __pyx_n_s_monitoring_infos, __pyx_t_8) < 0) __PYX_ERR(0, 580, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation);

  /* "apache_beam/runners/worker/operations.py":590
 *     return all_monitoring_infos
 * 
 *   def pcollection_count_monitoring_infos(self, tag_to_pcollection_id):             # <<<<<<<<<<<<<<
 *     # type: (Dict[str, str]) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo]
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_37pcollection_count_monitoring_infos, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Operation_pcollection_count_moni, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation->tp_dict, __pyx_n_s_pcollection_count_monitoring_inf, __pyx_t_8) < 0) __PYX_ERR(0, 590, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation);

  /* "apache_beam/runners/worker/operations.py":624
 *     return all_monitoring_infos
 * 
 *   def user_monitoring_infos(self, transform_id):             # <<<<<<<<<<<<<<
 *     # type: (str) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo]
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_39user_monitoring_infos, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Operation_user_monitoring_infos, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__47)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation->tp_dict, __pyx_n_s_user_monitoring_infos, __pyx_t_8) < 0) __PYX_ERR(0, 624, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation);

  /* "apache_beam/runners/worker/operations.py":630
 *     return self.metrics_container.to_runner_api_monitoring_infos(transform_id)
 * 
 *   def execution_time_monitoring_infos(self, transform_id):             # <<<<<<<<<<<<<<
 *     # type: (str) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo]
 *     total_time_spent_msecs = (
 */
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_41execution_time_monitoring_infos, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Operation_execution_time_monitor, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__48)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation->tp_dict, __pyx_n_s_execution_time_monitoring_infos, __pyx_t_8) < 0) __PYX_ERR(0, 630, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation);

  /* "apache_beam/runners/worker/operations.py":669
 *     return self.str_internal()
 * 
 *   def str_internal(self, is_recursive=False):             # <<<<<<<<<<<<<<
 *     """Internal helper for __str__ that supports recursion.
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_45str_internal, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Operation_str_internal, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__49)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation->tp_dict, __pyx_n_s_str_internal, __pyx_t_8) < 0) __PYX_ERR(0, 669, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation);

  /* "apache_beam/runners/worker/operations.py":697
 *     return '<%s %s>' % (printable_name, ', '.join(printable_fields))
 * 
 *   def _get_runtime_performance_hints(self):             # <<<<<<<<<<<<<<
 *     # type: () -> Optional[Dict[Optional[str], Tuple[Optional[str], Any]]]
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_47_get_runtime_performance_hints, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Operation__get_runtime_performan, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__54)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation->tp_dict, __pyx_n_s_get_runtime_performance_hints, __pyx_t_8) < 0) __PYX_ERR(0, 697, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_49__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Operation___reduce_cython, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__55)); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Operation, (type(self), 0xb6b9d28, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Operation__set_state(self, __pyx_state)
 */
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_51__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Operation___setstate_cython, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__56)); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_8) < 0) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation);

  /* "apache_beam/runners/worker/operations.py":706
 * 
 * class ReadOperation(Operation):
 *   def start(self):             # <<<<<<<<<<<<<<
 *     with self.scoped_start_state:
 *       super(ReadOperation, self).start()
 */
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_13ReadOperation_1start, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ReadOperation_start, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__57)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation->tp_dict, __pyx_n_s_start, __pyx_t_8) < 0) __PYX_ERR(0, 706, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_13ReadOperation_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ReadOperation___reduce_cython, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_ReadOperation, (type(self), 0xb6b9d28, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ReadOperation__set_state(self, __pyx_state)
 */
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_13ReadOperation_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ReadOperation___setstate_cython, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__59)); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_8) < 0) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation);

  /* "apache_beam/runners/worker/operations.py":743
 *     ]
 * 
 *   def process(self, unused_impulse):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:
 */
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_3process, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ImpulseReadOperation_process, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation->tp_dict, __pyx_n_s_process, __pyx_t_8) < 0) __PYX_ERR(0, 743, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ImpulseReadOperation___reduce_cy, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__62)); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_ImpulseReadOperation, (type(self), 0x216a25a, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ImpulseReadOperation__set_state(self, __pyx_state)
 */
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ImpulseReadOperation___setstate, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__63)); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_8) < 0) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation);

  /* "apache_beam/runners/worker/operations.py":755
 * 
 * 
 * class InMemoryWriteOperation(Operation):             # <<<<<<<<<<<<<<
 *   """A write operation that will write to an in-memory sink."""
 *   def process(self, o):
 */
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation));
  PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation));
  __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_8, __pyx_n_s_InMemoryWriteOperation, __pyx_n_s_InMemoryWriteOperation, (PyObject *) NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_kp_s_A_write_operation_that_will_writ); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "apache_beam/runners/worker/operations.py":757
 * class InMemoryWriteOperation(Operation):
 *   """A write operation that will write to an in-memory sink."""
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_22InMemoryWriteOperation_1process, 0, __pyx_n_s_InMemoryWriteOperation_process, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__64)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_process, __pyx_t_2) < 0) __PYX_ERR(0, 757, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":755
 * 
 * 
 * class InMemoryWriteOperation(Operation):             # <<<<<<<<<<<<<<
 *   """A write operation that will write to an in-memory sink."""
 *   def process(self, o):
 */
  __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_InMemoryWriteOperation, __pyx_t_8, __pyx_t_1, NULL, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_InMemoryWriteOperation, __pyx_t_2) < 0) __PYX_ERR(0, 755, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "apache_beam/runners/worker/operations.py":766
 * 
 * 
 * class _TaggedReceivers(dict):             # <<<<<<<<<<<<<<
 *   def __init__(self, counter_factory, step_name):
 *     self._counter_factory = counter_factory
 */
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_INCREF(((PyObject *)(&PyDict_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyDict_Type)));
  PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)(&PyDict_Type)));
  __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_8, __pyx_n_s_TaggedReceivers, __pyx_n_s_TaggedReceivers, (PyObject *) NULL, __pyx_n_s_apache_beam_runners_worker_opera, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "apache_beam/runners/worker/operations.py":767
 * 
 * class _TaggedReceivers(dict):
 *   def __init__(self, counter_factory, step_name):             # <<<<<<<<<<<<<<
 *     self._counter_factory = counter_factory
 *     self._step_name = step_name
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_1__init__, 0, __pyx_n_s_TaggedReceivers___init, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__65)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init, __pyx_t_2) < 0) __PYX_ERR(0, 767, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":771
 *     self._step_name = step_name
 * 
 *   def __missing__(self, tag):             # <<<<<<<<<<<<<<
 *     self[tag] = receiver = ConsumerSet.create(
 *         self._counter_factory, self._step_name, tag, [], None, None, None)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_3__missing__, 0, __pyx_n_s_TaggedReceivers___missing, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_missing, __pyx_t_2) < 0) __PYX_ERR(0, 771, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":776
 *     return receiver
 * 
 *   def total_output_bytes(self):             # <<<<<<<<<<<<<<
 *     # type: () -> int
 *     total = 0
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_5total_output_bytes, 0, __pyx_n_s_TaggedReceivers_total_output_by, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_total_output_bytes, __pyx_t_2) < 0) __PYX_ERR(0, 776, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":766
 * 
 * 
 * class _TaggedReceivers(dict):             # <<<<<<<<<<<<<<
 *   def __init__(self, counter_factory, step_name):
 *     self._counter_factory = counter_factory
 */
  __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_TaggedReceivers, __pyx_t_8, __pyx_t_1, NULL, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TaggedReceivers, __pyx_t_2) < 0) __PYX_ERR(0, 766, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "apache_beam/runners/worker/operations.py":787
 * 
 * 
 * OpInputInfo = NamedTuple(             # <<<<<<<<<<<<<<
 *     'OpInputInfo',
 *     [
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_NamedTuple); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "apache_beam/runners/worker/operations.py":790
 *     'OpInputInfo',
 *     [
 *         ('transform_id', str),             # <<<<<<<<<<<<<<
 *         ('main_input_tag', str),
 *         ('main_input_coder', coders.WindowedValueCoder),
 */
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_n_u_transform_id);
  __Pyx_GIVEREF(__pyx_n_u_transform_id);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_n_u_transform_id);
  __Pyx_INCREF(((PyObject *)(&PyUnicode_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyUnicode_Type)));
  PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)(&PyUnicode_Type)));

  /* "apache_beam/runners/worker/operations.py":791
 *     [
 *         ('transform_id', str),
 *         ('main_input_tag', str),             # <<<<<<<<<<<<<<
 *         ('main_input_coder', coders.WindowedValueCoder),
 *         ('outputs', Iterable[str]),
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_u_main_input_tag);
  __Pyx_GIVEREF(__pyx_n_u_main_input_tag);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_main_input_tag);
  __Pyx_INCREF(((PyObject *)(&PyUnicode_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyUnicode_Type)));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)(&PyUnicode_Type)));

  /* "apache_beam/runners/worker/operations.py":792
 *         ('transform_id', str),
 *         ('main_input_tag', str),
 *         ('main_input_coder', coders.WindowedValueCoder),             # <<<<<<<<<<<<<<
 *         ('outputs', Iterable[str]),
 *     ])
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_coders); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_WindowedValueCoder); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_u_main_input_coder);
  __Pyx_GIVEREF(__pyx_n_u_main_input_coder);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_main_input_coder);
  __Pyx_GIVEREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_9);
  __pyx_t_9 = 0;

  /* "apache_beam/runners/worker/operations.py":793
 *         ('main_input_tag', str),
 *         ('main_input_coder', coders.WindowedValueCoder),
 *         ('outputs', Iterable[str]),             # <<<<<<<<<<<<<<
 *     ])
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_Iterable); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_9, ((PyObject *)(&PyUnicode_Type))); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_INCREF(__pyx_n_u_outputs);
  __Pyx_GIVEREF(__pyx_n_u_outputs);
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_n_u_outputs);
  __Pyx_GIVEREF(__pyx_t_10);
  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_10);
  __pyx_t_10 = 0;

  /* "apache_beam/runners/worker/operations.py":789
 * OpInputInfo = NamedTuple(
 *     'OpInputInfo',
 *     [             # <<<<<<<<<<<<<<
 *         ('transform_id', str),
 *         ('main_input_tag', str),
 */
  __pyx_t_10 = PyList_New(4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_GIVEREF(__pyx_t_7);
  PyList_SET_ITEM(__pyx_t_10, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_1);
  PyList_SET_ITEM(__pyx_t_10, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyList_SET_ITEM(__pyx_t_10, 2, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_9);
  PyList_SET_ITEM(__pyx_t_10, 3, __pyx_t_9);
  __pyx_t_7 = 0;
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_9 = 0;

  /* "apache_beam/runners/worker/operations.py":787
 * 
 * 
 * OpInputInfo = NamedTuple(             # <<<<<<<<<<<<<<
 *     'OpInputInfo',
 *     [
 */
  __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_INCREF(__pyx_n_u_OpInputInfo);
  __Pyx_GIVEREF(__pyx_n_u_OpInputInfo);
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_n_u_OpInputInfo);
  __Pyx_GIVEREF(__pyx_t_10);
  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_10);
  __pyx_t_10 = 0;
  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_OpInputInfo, __pyx_t_10) < 0) __PYX_ERR(0, 787, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "apache_beam/runners/worker/operations.py":819
 *     self.fn, _, _, _, _ = (pickler.loads(self.spec.serialized_fn))
 * 
 *   def _read_side_inputs(self, tags_and_types):             # <<<<<<<<<<<<<<
 *     # type: (...) -> Iterator[apache_sideinputs.SideInputMap]
 * 
 */
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_3_read_side_inputs, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoOperation__read_side_inputs, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 819, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation->tp_dict, __pyx_n_s_read_side_inputs, __pyx_t_10) < 0) __PYX_ERR(0, 819, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation);

  /* "apache_beam/runners/worker/operations.py":875
 *           view_class, view_options, sideinputs.EmulatedIterable(iterator_fn))
 * 
 *   def setup(self, data_sampler=None):             # <<<<<<<<<<<<<<
 *     # type: (Optional[DataSampler]) -> None
 *     with self.scoped_start_state:
 */
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_6setup, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoOperation_setup, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation->tp_dict, __pyx_n_s_setup, __pyx_t_10) < 0) __PYX_ERR(0, 875, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation);

  /* "apache_beam/runners/worker/operations.py":929
 *       self.dofn_runner.setup()
 * 
 *   def start(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     with self.scoped_start_state:
 */
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_8start, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoOperation_start, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__70)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation->tp_dict, __pyx_n_s_start, __pyx_t_10) < 0) __PYX_ERR(0, 929, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation);

  /* "apache_beam/runners/worker/operations.py":936
 *       self.dofn_runner.start()
 * 
 *   def get_batching_preference(self):             # <<<<<<<<<<<<<<
 *     if self.fn._process_batch_defined:
 *       if self.fn._process_defined:
 */
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_10get_batching_preference, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoOperation_get_batching_prefere, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__71)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation->tp_dict, __pyx_n_s_get_batching_preference, __pyx_t_10) < 0) __PYX_ERR(0, 936, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation);

  /* "apache_beam/runners/worker/operations.py":945
 *       return common.BatchingPreference.BATCH_FORBIDDEN
 * 
 *   def get_input_batch_converter(self) -> Optional[BatchConverter]:             # <<<<<<<<<<<<<<
 *     return getattr(self.fn, 'input_batch_converter', None)
 * 
 */
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_Optional); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_BatchConverter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_9, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_return, __pyx_t_2) < 0) __PYX_ERR(0, 945, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_12get_input_batch_converter, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoOperation_get_input_batch_conv, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__72)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation->tp_dict, __pyx_n_s_get_input_batch_converter, __pyx_t_2) < 0) __PYX_ERR(0, 945, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation);

  /* "apache_beam/runners/worker/operations.py":948
 *     return getattr(self.fn, 'input_batch_converter', None)
 * 
 *   def get_output_batch_converter(self) -> Optional[BatchConverter]:             # <<<<<<<<<<<<<<
 *     return getattr(self.fn, 'output_batch_converter', None)
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Optional); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_BatchConverter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_10, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_return, __pyx_t_9) < 0) __PYX_ERR(0, 948, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_14get_output_batch_converter, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoOperation_get_output_batch_con, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__73)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_9, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation->tp_dict, __pyx_n_s_get_output_batch_converter, __pyx_t_9) < 0) __PYX_ERR(0, 948, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation);

  /* "apache_beam/runners/worker/operations.py":951
 *     return getattr(self.fn, 'output_batch_converter', None)
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:
 */
  __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_16process, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoOperation_process, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__74)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation->tp_dict, __pyx_n_s_process, __pyx_t_9) < 0) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation);

  /* "apache_beam/runners/worker/operations.py":961
 *               (self, delayed_application))
 * 
 *   def process_batch(self, windowed_batch: WindowedBatch) -> None:             # <<<<<<<<<<<<<<
 *     self.dofn_runner.process_batch(windowed_batch)
 * 
 */
  __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_windowed_batch, __pyx_n_u_WindowedBatch) < 0) __PYX_ERR(0, 961, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_return, Py_None) < 0) __PYX_ERR(0, 961, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_18process_batch, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoOperation_process_batch, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__75)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_9);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation->tp_dict, __pyx_n_s_process_batch, __pyx_t_2) < 0) __PYX_ERR(0, 961, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation);

  /* "apache_beam/runners/worker/operations.py":964
 *     self.dofn_runner.process_batch(windowed_batch)
 * 
 *   def finalize_bundle(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     self.dofn_runner.finalize()
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_20finalize_bundle, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoOperation_finalize_bundle, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__76)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 964, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation->tp_dict, __pyx_n_s_finalize_bundle, __pyx_t_2) < 0) __PYX_ERR(0, 964, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation);

  /* "apache_beam/runners/worker/operations.py":968
 *     self.dofn_runner.finalize()
 * 
 *   def needs_finalization(self):             # <<<<<<<<<<<<<<
 *     # type: () -> bool
 *     return self.dofn_runner.bundle_finalizer_param.has_callbacks()
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_22needs_finalization, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoOperation_needs_finalization, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__77)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation->tp_dict, __pyx_n_s_needs_finalization, __pyx_t_2) < 0) __PYX_ERR(0, 968, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation);

  /* "apache_beam/runners/worker/operations.py":972
 *     return self.dofn_runner.bundle_finalizer_param.has_callbacks()
 * 
 *   def add_timer_info(self, timer_family_id, timer_info):             # <<<<<<<<<<<<<<
 *     self.user_state_context.add_timer_info(timer_family_id, timer_info)
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_24add_timer_info, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoOperation_add_timer_info, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__78)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation->tp_dict, __pyx_n_s_add_timer_info, __pyx_t_2) < 0) __PYX_ERR(0, 972, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation);

  /* "apache_beam/runners/worker/operations.py":975
 *     self.user_state_context.add_timer_info(timer_family_id, timer_info)
 * 
 *   def process_timer(self, tag, timer_data):             # <<<<<<<<<<<<<<
 *     timer_spec = self.timer_specs[tag]
 *     self.dofn_runner.process_user_timer(
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_26process_timer, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoOperation_process_timer, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__79)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 975, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation->tp_dict, __pyx_n_s_process_timer, __pyx_t_2) < 0) __PYX_ERR(0, 975, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation);

  /* "apache_beam/runners/worker/operations.py":985
 *         timer_data.dynamic_timer_tag)
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     super(DoOperation, self).finish()
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_28finish, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoOperation_finish, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation->tp_dict, __pyx_n_s_finish, __pyx_t_2) < 0) __PYX_ERR(0, 985, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation);

  /* "apache_beam/runners/worker/operations.py":993
 *         self.user_state_context.commit()
 * 
 *   def teardown(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     with self.scoped_finish_state:
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_30teardown, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoOperation_teardown, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__81)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation->tp_dict, __pyx_n_s_teardown, __pyx_t_2) < 0) __PYX_ERR(0, 993, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation);

  /* "apache_beam/runners/worker/operations.py":1000
 *       self.user_state_context.reset()
 * 
 *   def reset(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     super(DoOperation, self).reset()
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_32reset, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoOperation_reset, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1000, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation->tp_dict, __pyx_n_s_reset, __pyx_t_2) < 0) __PYX_ERR(0, 1000, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation);

  /* "apache_beam/runners/worker/operations.py":1009
 *     self.dofn_runner.bundle_finalizer_param.reset()
 * 
 *   def pcollection_count_monitoring_infos(self, tag_to_pcollection_id):             # <<<<<<<<<<<<<<
 *     # type: (Dict[str, str]) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo]
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_34pcollection_count_monitoring_infos, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoOperation_pcollection_count_mo, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__83)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation->tp_dict, __pyx_n_s_pcollection_count_monitoring_inf, __pyx_t_2) < 0) __PYX_ERR(0, 1009, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation);

  /* "apache_beam/runners/worker/operations.py":1036
 *     return infos
 * 
 *   def _get_runtime_performance_hints(self):             # <<<<<<<<<<<<<<
 *     fns = pickler.loads(self.spec.serialized_fn)
 *     if fns and hasattr(fns[0], '_runtime_output_constraints'):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_36_get_runtime_performance_hints, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoOperation__get_runtime_perform, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__84)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation->tp_dict, __pyx_n_s_get_runtime_performance_hints, __pyx_t_2) < 0) __PYX_ERR(0, 1036, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_38__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoOperation___reduce_cython, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__85)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DoOperation, (type(self), 0x521836b, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DoOperation__set_state(self, __pyx_state)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_40__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoOperation___setstate_cython, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__86)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation);

  /* "apache_beam/runners/worker/operations.py":1048
 *     super(SdfTruncateSizedRestrictions, self).__init__(*args, **kwargs)
 * 
 *   def current_element_progress(self):             # <<<<<<<<<<<<<<
 *     # type: () -> Optional[iobase.RestrictionProgress]
 *     return self.receivers[0].current_element_progress()
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_3current_element_progress, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdfTruncateSizedRestrictions_cur, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__87)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions->tp_dict, __pyx_n_s_current_element_progress, __pyx_t_2) < 0) __PYX_ERR(0, 1048, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions);

  /* "apache_beam/runners/worker/operations.py":1052
 *     return self.receivers[0].current_element_progress()
 * 
 *   def try_split(             # <<<<<<<<<<<<<<
 *       self, fraction_of_remainder
 *   ):  # type: (...) -> Optional[Tuple[Iterable[SdfSplitResultsPrimary], Iterable[SdfSplitResultsResidual]]]
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_5try_split, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdfTruncateSizedRestrictions_try, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__88)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions->tp_dict, __pyx_n_s_try_split, __pyx_t_2) < 0) __PYX_ERR(0, 1052, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdfTruncateSizedRestrictions___r, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__89)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_SdfTruncateSizedRestrictions, (type(self), 0x521836b, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_SdfTruncateSizedRestrictions__set_state(self, __pyx_state)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdfTruncateSizedRestrictions___s, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__90)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions);

  /* "apache_beam/runners/worker/operations.py":1064
 *     self.element_start_output_bytes = None  # type: Optional[int]
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     assert self.tagged_receivers is not None
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_3process, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdfProcessSizedElements_process, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__91)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements->tp_dict, __pyx_n_s_process, __pyx_t_2) < 0) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements);

  /* "apache_beam/runners/worker/operations.py":1087
 *           self.element_start_output_bytes = None
 * 
 *   def try_split(self, fraction_of_remainder):             # <<<<<<<<<<<<<<
 *     # type: (...) -> Optional[Tuple[Iterable[SdfSplitResultsPrimary], Iterable[SdfSplitResultsResidual]]]
 *     split = self.dofn_runner.try_split(fraction_of_remainder)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_5try_split, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdfProcessSizedElements_try_spli, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__92)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements->tp_dict, __pyx_n_s_try_split, __pyx_t_2) < 0) __PYX_ERR(0, 1087, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements);

  /* "apache_beam/runners/worker/operations.py":1096
 *     return None
 * 
 *   def current_element_progress(self):             # <<<<<<<<<<<<<<
 *     # type: () -> Optional[iobase.RestrictionProgress]
 *     with self.lock:
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_7current_element_progress, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdfProcessSizedElements_current, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__93)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1096, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements->tp_dict, __pyx_n_s_current_element_progress, __pyx_t_2) < 0) __PYX_ERR(0, 1096, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements);

  /* "apache_beam/runners/worker/operations.py":1108
 *       return None
 * 
 *   def monitoring_infos(self, transform_id, tag_to_pcollection_id):             # <<<<<<<<<<<<<<
 *     # type: (str, Dict[str, str]) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo]
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_9monitoring_infos, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdfProcessSizedElements_monitori, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__94)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements->tp_dict, __pyx_n_s_monitoring_infos, __pyx_t_2) < 0) __PYX_ERR(0, 1108, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdfProcessSizedElements___reduce, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__95)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_SdfProcessSizedElements, (type(self), 0x8c483fa, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_SdfProcessSizedElements__set_state(self, __pyx_state)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdfProcessSizedElements___setsta, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__96)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements);

  /* "apache_beam/runners/worker/operations.py":1153
 *         PhasedCombineFnExecutor(self.spec.phase, fn, args, kwargs))
 * 
 *   def setup(self, data_sampler=None):             # <<<<<<<<<<<<<<
 *     # type: (Optional[DataSampler]) -> None
 *     with self.scoped_start_state:
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_16CombineOperation_3setup, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CombineOperation_setup, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__98)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation->tp_dict, __pyx_n_s_setup, __pyx_t_2) < 0) __PYX_ERR(0, 1153, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation);

  /* "apache_beam/runners/worker/operations.py":1160
 *       self.phased_combine_fn.combine_fn.setup()
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_16CombineOperation_5process, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CombineOperation_process, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__99)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation->tp_dict, __pyx_n_s_process, __pyx_t_2) < 0) __PYX_ERR(0, 1160, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation);

  /* "apache_beam/runners/worker/operations.py":1168
 *       self.output(o.with_value((key, self.phased_combine_fn.apply(values))))
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     _LOGGER.debug('Finishing %s', self)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_16CombineOperation_7finish, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CombineOperation_finish, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__100)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation->tp_dict, __pyx_n_s_finish, __pyx_t_2) < 0) __PYX_ERR(0, 1168, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation);

  /* "apache_beam/runners/worker/operations.py":1173
 *     super(CombineOperation, self).finish()
 * 
 *   def teardown(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     with self.scoped_finish_state:
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_16CombineOperation_9teardown, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CombineOperation_teardown, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__101)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation->tp_dict, __pyx_n_s_teardown, __pyx_t_2) < 0) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_16CombineOperation_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CombineOperation___reduce_cython, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__102)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_CombineOperation, (type(self), 0xc1cd107, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CombineOperation__set_state(self, __pyx_state)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_16CombineOperation_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CombineOperation___setstate_cyth, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__103)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation);

  /* "apache_beam/runners/worker/operations.py":1181
 * 
 * 
 * def create_pgbk_op(step_name, spec, counter_factory, state_sampler):             # <<<<<<<<<<<<<<
 *   if spec.combine_fn:
 *     return PGBKCVOperation(step_name, spec, counter_factory, state_sampler)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_5create_pgbk_op, 0, __pyx_n_s_create_pgbk_op, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__104)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_create_pgbk_op, __pyx_t_2) < 0) __PYX_ERR(0, 1181, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":1188
 * 
 * 
 * class PGBKOperation(Operation):             # <<<<<<<<<<<<<<
 *   """Partial group-by-key operation.
 * 
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation));
  __pyx_t_9 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = __Pyx_Py3MetaclassPrepare(__pyx_t_9, __pyx_t_2, __pyx_n_s_PGBKOperation, __pyx_n_s_PGBKOperation, (PyObject *) NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_kp_s_Partial_group_by_key_operation_T); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);

  /* "apache_beam/runners/worker/operations.py":1195
 *   values in this bundle, memory permitting.
 *   """
 *   def __init__(self, name_context, spec, counter_factory, state_sampler):             # <<<<<<<<<<<<<<
 *     super(PGBKOperation,
 *           self).__init__(name_context, spec, counter_factory, state_sampler)
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_13PGBKOperation_1__init__, 0, __pyx_n_s_PGBKOperation___init, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__105)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 1195, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":1204
 *     self.max_size = 10 * 1000
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_13PGBKOperation_3process, 0, __pyx_n_s_PGBKOperation_process, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__106)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_n_s_process, __pyx_t_1) < 0) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":1214
 *         self.flush(9 * self.max_size // 10)
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     self.flush(0)
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_13PGBKOperation_5finish, 0, __pyx_n_s_PGBKOperation_finish, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__107)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_t_1);
  PyList_Append(__pyx_t_10, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_n_s_finish, __pyx_t_1) < 0) __PYX_ERR(0, 1214, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":1219
 *     super().finish()
 * 
 *   def flush(self, target):             # <<<<<<<<<<<<<<
 *     # type: (int) -> None
 *     limit = self.size - target
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_13PGBKOperation_7flush, 0, __pyx_n_s_PGBKOperation_flush, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__108)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_n_s_flush, __pyx_t_1) < 0) __PYX_ERR(0, 1219, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":1188
 * 
 * 
 * class PGBKOperation(Operation):             # <<<<<<<<<<<<<<
 *   """Partial group-by-key operation.
 * 
 */
  __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_9, __pyx_n_s_PGBKOperation, __pyx_t_2, __pyx_t_8, NULL, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_CyFunction_InitClassCell(__pyx_t_10, __pyx_t_1) < 0) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PGBKOperation, __pyx_t_1) < 0) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":1272
 *     self.table = {}
 * 
 *   def setup(self, data_sampler=None):             # <<<<<<<<<<<<<<
 *     # type: (Optional[DataSampler]) -> None
 *     with self.scoped_start_state:
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_3setup, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PGBKCVOperation_setup, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__109)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation->tp_dict, __pyx_n_s_setup, __pyx_t_2) < 0) __PYX_ERR(0, 1272, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation);

  /* "apache_beam/runners/worker/operations.py":1279
 *       self.combine_fn.setup()
 * 
 *   def process(self, wkv):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_5process, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PGBKCVOperation_process, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__110)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation->tp_dict, __pyx_n_s_process, __pyx_t_2) < 0) __PYX_ERR(0, 1279, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation);

  /* "apache_beam/runners/worker/operations.py":1314
 *         entry[1] = self.timestamp_combiner.combine(entry[1], wkv.timestamp)
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     for wkey, value in self.table.items():
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_7finish, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PGBKCVOperation_finish, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__111)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation->tp_dict, __pyx_n_s_finish, __pyx_t_2) < 0) __PYX_ERR(0, 1314, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation);

  /* "apache_beam/runners/worker/operations.py":1321
 *     self.key_count = 0
 * 
 *   def teardown(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 *     with self.scoped_finish_state:
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_9teardown, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PGBKCVOperation_teardown, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__112)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation->tp_dict, __pyx_n_s_teardown, __pyx_t_2) < 0) __PYX_ERR(0, 1321, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation);

  /* "apache_beam/runners/worker/operations.py":1328
 *       self.combine_fn.teardown()
 * 
 *   def output_key(self, wkey, accumulator, timestamp):             # <<<<<<<<<<<<<<
 *     if self.combine_fn_compact is None:
 *       value = accumulator
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_11output_key, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PGBKCVOperation_output_key, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__113)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation->tp_dict, __pyx_n_s_output_key, __pyx_t_2) < 0) __PYX_ERR(0, 1328, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PGBKCVOperation___reduce_cython, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__114)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_PGBKCVOperation, (type(self), 0xf08ce62, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_PGBKCVOperation__set_state(self, __pyx_state)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PGBKCVOperation___setstate_cytho, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__115)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation);

  /* "apache_beam/runners/worker/operations.py":1349
 *   with all the items.
 *   """
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     # type: (WindowedValue) -> None
 *     with self.scoped_process_state:
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_16FlattenOperation_1process, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FlattenOperation_process, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__116)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_FlattenOperation->tp_dict, __pyx_n_s_process, __pyx_t_2) < 0) __PYX_ERR(0, 1349, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_FlattenOperation);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_16FlattenOperation_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FlattenOperation___reduce_cython, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__117)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_FlattenOperation->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_FlattenOperation);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_FlattenOperation, (type(self), 0xb6b9d28, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_FlattenOperation__set_state(self, __pyx_state)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_16FlattenOperation_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FlattenOperation___setstate_cyth, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__118)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_FlattenOperation->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_FlattenOperation);

  /* "apache_beam/runners/worker/operations.py":1357
 * 
 * 
 * def create_operation(             # <<<<<<<<<<<<<<
 *     name_context,
 *     spec,
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_7create_operation, 0, __pyx_n_s_create_operation, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__119)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__255);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_create_operation, __pyx_t_2) < 0) __PYX_ERR(0, 1357, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":1441
 * 
 * 
 * class SimpleMapTaskExecutor(object):             # <<<<<<<<<<<<<<
 *   """An executor for map tasks.
 * 
 */
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__256); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_tuple__256, __pyx_n_s_SimpleMapTaskExecutor, __pyx_n_s_SimpleMapTaskExecutor, (PyObject *) NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_kp_s_An_executor_for_map_tasks_Stores); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);

  /* "apache_beam/runners/worker/operations.py":1447
 *    task.
 *   """
 *   def __init__(             # <<<<<<<<<<<<<<
 *       self,
 *       map_task,
 */
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_1__init__, 0, __pyx_n_s_SimpleMapTaskExecutor___init, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__120)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__258);
  if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_n_s_init, __pyx_t_8) < 0) __PYX_ERR(0, 1447, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "apache_beam/runners/worker/operations.py":1475
 *     self._test_shuffle_sink = test_shuffle_sink
 * 
 *   def operations(self):             # <<<<<<<<<<<<<<
 *     # type: () -> List[Operation]
 *     return self._ops[:]
 */
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_3operations, 0, __pyx_n_s_SimpleMapTaskExecutor_operations, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__121)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_n_s_operations, __pyx_t_8) < 0) __PYX_ERR(0, 1475, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "apache_beam/runners/worker/operations.py":1479
 *     return self._ops[:]
 * 
 *   def execute(self):             # <<<<<<<<<<<<<<
 *     # type: () -> None
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_5execute, 0, __pyx_n_s_SimpleMapTaskExecutor_execute, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__123)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_n_s_execute, __pyx_t_8) < 0) __PYX_ERR(0, 1479, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "apache_beam/runners/worker/operations.py":1441
 * 
 * 
 * class SimpleMapTaskExecutor(object):             # <<<<<<<<<<<<<<
 *   """An executor for map tasks.
 * 
 */
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_SimpleMapTaskExecutor, __pyx_tuple__256, __pyx_t_9, NULL, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SimpleMapTaskExecutor, __pyx_t_8) < 0) __PYX_ERR(0, 1441, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":1524
 * 
 * 
 * class InefficientExecutionWarning(RuntimeWarning):             # <<<<<<<<<<<<<<
 *   """warning to indicate an inefficiency in a Beam pipeline."""
 * 
 */
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__261); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_tuple__261, __pyx_n_s_InefficientExecutionWarning, __pyx_n_s_InefficientExecutionWarning, (PyObject *) NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_kp_s_warning_to_indicate_an_inefficie); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_InefficientExecutionWarning, __pyx_tuple__261, __pyx_t_9, NULL, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_InefficientExecutionWarning, __pyx_t_8) < 0) __PYX_ERR(0, 1524, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":1529
 * 
 * # Don't ignore InefficientExecutionWarning, but only log them once
 * warnings.simplefilter('once', InefficientExecutionWarning)             # <<<<<<<<<<<<<<
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_warnings); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_simplefilter); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_InefficientExecutionWarning); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_INCREF(__pyx_n_u_once);
  __Pyx_GIVEREF(__pyx_n_u_once);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_n_u_once);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_ConsumerSet(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9__pyx_unpickle_ConsumerSet, 0, __pyx_n_s_pyx_unpickle_ConsumerSet, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__124)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_ConsumerSet, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_ConsumerSet__set_state(<ConsumerSet> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_ConsumerSet__set_state(ConsumerSet __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.coder = __pyx_state[0]; __pyx_result.consumers = __pyx_state[1]; __pyx_result.element_sampler = __pyx_state[2]; __pyx_result.execution_context = __pyx_state[3]; __pyx_result.opcounter = __pyx_state[4]; __pyx_result.output_index = __pyx_state[5]; __pyx_result.output_sampler = __pyx_state[6]; __pyx_result.step_name = __pyx_state[7]
 *     if len(__pyx_state) > 8 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11__pyx_unpickle_SingletonElementConsumerSet, 0, __pyx_n_s_pyx_unpickle_SingletonElementC, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__126)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_SingletonElementC, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_GeneralPurposeConsumerSet(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_13__pyx_unpickle_GeneralPurposeConsumerSet, 0, __pyx_n_s_pyx_unpickle_GeneralPurposeCon, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__128)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_GeneralPurposeCon, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_GeneralPurposeConsumerSet__set_state(<GeneralPurposeConsumerSet> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_GeneralPurposeConsumerSet__set_state(GeneralPurposeConsumerSet __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._batched_elements = __pyx_state[0]; __pyx_result.coder = __pyx_state[1]; __pyx_result.consumers = __pyx_state[2]; __pyx_result.element_consumers = __pyx_state[3]; __pyx_result.element_sampler = __pyx_state[4]; __pyx_result.execution_context = __pyx_state[5]; __pyx_result.has_batch_consumers = __pyx_state[6]; __pyx_result.opcounter = __pyx_state[7]; __pyx_result.other_batch_consumers = __pyx_state[8]; __pyx_result.output_index = __pyx_state[9]; __pyx_result.output_sampler = __pyx_state[10]; __pyx_result.passthrough_batch_consumers = __pyx_state[11]; __pyx_result.producer_batch_converter = __pyx_state[12]; __pyx_result.step_name = __pyx_state[13]
 *     if len(__pyx_state) > 14 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_15__pyx_unpickle_Operation, 0, __pyx_n_s_pyx_unpickle_Operation, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__130)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Operation, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_ReadOperation(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_17__pyx_unpickle_ReadOperation, 0, __pyx_n_s_pyx_unpickle_ReadOperation, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__132)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_ReadOperation, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_ReadOperation__set_state(<ReadOperation> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_ReadOperation__set_state(ReadOperation __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.spec = __pyx_state[13]; __pyx_result.state_sampler = __pyx_state[14]; __pyx_result.step_name = __pyx_state[15]
 *     if len(__pyx_state) > 16 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_19__pyx_unpickle_ImpulseReadOperation, 0, __pyx_n_s_pyx_unpickle_ImpulseReadOperat, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__133)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_ImpulseReadOperat, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_DoOperation(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_21__pyx_unpickle_DoOperation, 0, __pyx_n_s_pyx_unpickle_DoOperation, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__135)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_DoOperation, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_DoOperation__set_state(<DoOperation> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DoOperation__set_state(DoOperation __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.dofn_runner = __pyx_state[4]; __pyx_result.execution_context = __pyx_state[5]; __pyx_result.fn = __pyx_state[6]; __pyx_result.input_info = __pyx_state[7]; __pyx_result.metrics_container = __pyx_state[8]; __pyx_result.name_context = __pyx_state[9]; __pyx_result.operation_name = __pyx_state[10]; __pyx_result.receivers = __pyx_state[11]; __pyx_result.scoped_finish_state = __pyx_state[12]; __pyx_result.scoped_process_state = __pyx_state[13]; __pyx_result.scoped_start_state = __pyx_state[14]; __pyx_result.setup_done = __pyx_state[15]; __pyx_result.side_input_maps = __pyx_state[16]; __pyx_result.spec = __pyx_state[17]; __pyx_result.state_sampler = __pyx_state[18]; __pyx_result.step_name = __pyx_state[19]; __pyx_result.tagged_receivers = __pyx_state[20]; __pyx_result.timer_inputs = __pyx_state[21]; __pyx_result.timer_specs = __pyx_state[22]; __pyx_result.user_state_context = __pyx_state[23]
 *     if len(__pyx_state) > 24 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_23__pyx_unpickle_SdfTruncateSizedRestrictions, 0, __pyx_n_s_pyx_unpickle_SdfTruncateSizedR, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__137)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_SdfTruncateSizedR, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_SdfProcessSizedElements(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_25__pyx_unpickle_SdfProcessSizedElements, 0, __pyx_n_s_pyx_unpickle_SdfProcessSizedEl, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__138)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_SdfProcessSizedEl, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_SdfProcessSizedElements__set_state(<SdfProcessSizedElements> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_SdfProcessSizedElements__set_state(SdfProcessSizedElements __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.dofn_runner = __pyx_state[4]; __pyx_result.element_start_output_bytes = __pyx_state[5]; __pyx_result.execution_context = __pyx_state[6]; __pyx_result.fn = __pyx_state[7]; __pyx_result.input_info = __pyx_state[8]; __pyx_result.lock = __pyx_state[9]; __pyx_result.metrics_container = __pyx_state[10]; __pyx_result.name_context = __pyx_state[11]; __pyx_result.operation_name = __pyx_state[12]; __pyx_result.receivers = __pyx_state[13]; __pyx_result.scoped_finish_state = __pyx_state[14]; __pyx_result.scoped_process_state = __pyx_state[15]; __pyx_result.scoped_start_state = __pyx_state[16]; __pyx_result.setup_done = __pyx_state[17]; __pyx_result.side_input_maps = __pyx_state[18]; __pyx_result.spec = __pyx_state[19]; __pyx_result.state_sampler = __pyx_state[20]; __pyx_result.step_name = __pyx_state[21]; __pyx_result.tagged_receivers = __pyx_state[22]; __pyx_result.timer_inputs = __pyx_state[23]; __pyx_result.timer_specs = __pyx_state[24]; __pyx_result.user_state_context = __pyx_state[25]
 *     if len(__pyx_state) > 26 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_27__pyx_unpickle_CombineOperation, 0, __pyx_n_s_pyx_unpickle_CombineOperation, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__140)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_CombineOperation, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_PGBKCVOperation(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_29__pyx_unpickle_PGBKCVOperation, 0, __pyx_n_s_pyx_unpickle_PGBKCVOperation, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__142)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_PGBKCVOperation, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_PGBKCVOperation__set_state(<PGBKCVOperation> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_PGBKCVOperation__set_state(PGBKCVOperation __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.combine_fn = __pyx_state[0]; __pyx_result.combine_fn_add_input = __pyx_state[1]; __pyx_result.combine_fn_compact = __pyx_state[2]; __pyx_result.consumers = __pyx_state[3]; __pyx_result.counter_factory = __pyx_state[4]; __pyx_result.data_sampler = __pyx_state[5]; __pyx_result.debug_logging_enabled = __pyx_state[6]; __pyx_result.execution_context = __pyx_state[7]; __pyx_result.is_default_windowing = __pyx_state[8]; __pyx_result.key_count = __pyx_state[9]; __pyx_result.max_keys = __pyx_state[10]; __pyx_result.metrics_container = __pyx_state[11]; __pyx_result.name_context = __pyx_state[12]; __pyx_result.operation_name = __pyx_state[13]; __pyx_result.receivers = __pyx_state[14]; __pyx_result.scoped_finish_state = __pyx_state[15]; __pyx_result.scoped_process_state = __pyx_state[16]; __pyx_result.scoped_start_state = __pyx_state[17]; __pyx_result.setup_done = __pyx_state[18]; __pyx_result.spec = __pyx_state[19]; __pyx_result.state_sampler = __pyx_state[20]; __pyx_result.step_name = __pyx_state[21]; __pyx_result.table = __pyx_state[22]; __pyx_result.timestamp_combiner = __pyx_state[23]
 *     if len(__pyx_state) > 24 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_31__pyx_unpickle_FlattenOperation, 0, __pyx_n_s_pyx_unpickle_FlattenOperation, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__144)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_FlattenOperation, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":1
 * #             # <<<<<<<<<<<<<<
 * # Licensed to the Apache Software Foundation (ASF) under one or more
 * # contributor license agreements.  See the NOTICE file distributed with
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cpython/datetime.pxd":211
 * 
 * # Get microseconds of timedelta
 * cdef inline int timedelta_microseconds(object o):             # <<<<<<<<<<<<<<
 *     return (<PyDateTime_Delta*>o).microseconds
 */
  __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_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init apache_beam.runners.worker.operations", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    Py_CLEAR(__pyx_m);
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init apache_beam.runners.worker.operations");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #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;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

/* CIntToDigits */
static const char DIGIT_PAIRS_10[2*10*10+1] = {
    "00010203040506070809"
    "10111213141516171819"
    "20212223242526272829"
    "30313233343536373839"
    "40414243444546474849"
    "50515253545556575859"
    "60616263646566676869"
    "70717273747576777879"
    "80818283848586878889"
    "90919293949596979899"
};
static const char DIGIT_PAIRS_8[2*8*8+1] = {
    "0001020304050607"
    "1011121314151617"
    "2021222324252627"
    "3031323334353637"
    "4041424344454647"
    "5051525354555657"
    "6061626364656667"
    "7071727374757677"
};
static const char DIGITS_HEX[2*16+1] = {
    "0123456789abcdef"
    "0123456789ABCDEF"
};

/* BuildPyUnicode */
static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength,
                                                int prepend_sign, char padding_char) {
    PyObject *uval;
    Py_ssize_t uoffset = ulength - clength;
#if CYTHON_USE_UNICODE_INTERNALS
    Py_ssize_t i;
#if CYTHON_PEP393_ENABLED
    void *udata;
    uval = PyUnicode_New(ulength, 127);
    if (unlikely(!uval)) return NULL;
    udata = PyUnicode_DATA(uval);
#else
    Py_UNICODE *udata;
    uval = PyUnicode_FromUnicode(NULL, ulength);
    if (unlikely(!uval)) return NULL;
    udata = PyUnicode_AS_UNICODE(uval);
#endif
    if (uoffset > 0) {
        i = 0;
        if (prepend_sign) {
            __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, 0, '-');
            i++;
        }
        for (; i < uoffset; i++) {
            __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char);
        }
    }
    for (i=0; i < clength; i++) {
        __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]);
    }
#else
    {
        PyObject *sign = NULL, *padding = NULL;
        uval = NULL;
        if (uoffset > 0) {
            prepend_sign = !!prepend_sign;
            if (uoffset > prepend_sign) {
                padding = PyUnicode_FromOrdinal(padding_char);
                if (likely(padding) && uoffset > prepend_sign + 1) {
                    PyObject *tmp;
                    PyObject *repeat = PyInt_FromSsize_t(uoffset - prepend_sign);
                    if (unlikely(!repeat)) goto done_or_error;
                    tmp = PyNumber_Multiply(padding, repeat);
                    Py_DECREF(repeat);
                    Py_DECREF(padding);
                    padding = tmp;
                }
                if (unlikely(!padding)) goto done_or_error;
            }
            if (prepend_sign) {
                sign = PyUnicode_FromOrdinal('-');
                if (unlikely(!sign)) goto done_or_error;
            }
        }
        uval = PyUnicode_DecodeASCII(chars, clength, NULL);
        if (likely(uval) && padding) {
            PyObject *tmp = PyNumber_Add(padding, uval);
            Py_DECREF(uval);
            uval = tmp;
        }
        if (likely(uval) && sign) {
            PyObject *tmp = PyNumber_Add(sign, uval);
            Py_DECREF(uval);
            uval = tmp;
        }
done_or_error:
        Py_XDECREF(padding);
        Py_XDECREF(sign);
    }
#endif
    return uval;
}

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(Py_ssize_t)*3+2];
    char *dpos, *end = digits + sizeof(Py_ssize_t)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    Py_ssize_t remaining;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (Py_ssize_t) (remaining / (8*8));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (Py_ssize_t) (remaining / (10*10));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (Py_ssize_t) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    if (last_one_off) {
        assert(*dpos == '0');
        dpos++;
    }
    length = end - dpos;
    ulength = length;
    prepend_sign = 0;
    if (!is_unsigned && value <= neg_one) {
        if (padding_char == ' ' || width <= length + 1) {
            *(--dpos) = '-';
            ++length;
        } else {
            prepend_sign = 1;
        }
        ++ulength;
    }
    if (width > ulength) {
        ulength = width;
    }
    if (ulength == 1) {
        return PyUnicode_FromOrdinal(*dpos);
    }
    return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
}

/* JoinPyUnicode */
static PyObject* __Pyx_PyUnicode_Join(PyObject* 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
}

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

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

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

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

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

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

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

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

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

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

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

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

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

/* None */
static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
}

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

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

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

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

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

/* DictGetItem */
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
    PyObject *value;
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (!PyErr_Occurred()) {
            if (unlikely(PyTuple_Check(key))) {
                PyObject* args = PyTuple_Pack(1, key);
                if (likely(args)) {
                    PyErr_SetObject(PyExc_KeyError, args);
                    Py_DECREF(args);
                }
            } else {
                PyErr_SetObject(PyExc_KeyError, key);
            }
        }
        return NULL;
    }
    Py_INCREF(value);
    return value;
}
#endif

/* BytesEquals */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result;
#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
            Py_hash_t hash1, hash2;
            hash1 = ((PyBytesObject*)s1)->ob_shash;
            hash2 = ((PyBytesObject*)s2)->ob_shash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                return (equals == Py_NE);
            }
#endif
            result = memcmp(ps1, ps2, (size_t)length);
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
#endif
}

/* UnicodeEquals */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
#if PY_MAJOR_VERSION < 3
    PyObject* owned_ref = NULL;
#endif
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
#if PY_MAJOR_VERSION < 3
    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
        owned_ref = PyUnicode_FromObject(s2);
        if (unlikely(!owned_ref))
            return -1;
        s2 = owned_ref;
        s2_is_unicode = 1;
    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
        owned_ref = PyUnicode_FromObject(s1);
        if (unlikely(!owned_ref))
            return -1;
        s1 = owned_ref;
        s1_is_unicode = 1;
    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
        return __Pyx_PyBytes_Equals(s1, s2, equals);
    }
#endif
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length;
        int kind;
        void *data1, *data2;
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
            goto return_ne;
        }
#if CYTHON_USE_UNICODE_INTERNALS
        {
            Py_hash_t hash1, hash2;
        #if CYTHON_PEP393_ENABLED
            hash1 = ((PyASCIIObject*)s1)->hash;
            hash2 = ((PyASCIIObject*)s2)->hash;
        #else
            hash1 = ((PyUnicodeObject*)s1)->hash;
            hash2 = ((PyUnicodeObject*)s2)->hash;
        #endif
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                goto return_ne;
            }
        }
#endif
        kind = __Pyx_PyUnicode_KIND(s1);
        if (kind != __Pyx_PyUnicode_KIND(s2)) {
            goto return_ne;
        }
        data1 = __Pyx_PyUnicode_DATA(s1);
        data2 = __Pyx_PyUnicode_DATA(s2);
        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
            goto return_ne;
        } else if (length == 1) {
            goto return_eq;
        } else {
            int result = memcmp(data1, data2, (size_t)(length * kind));
            #if PY_MAJOR_VERSION < 3
            Py_XDECREF(owned_ref);
            #endif
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_ne;
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        #if PY_MAJOR_VERSION < 3
        Py_XDECREF(owned_ref);
        #endif
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_EQ);
return_ne:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_NE);
#endif
}

/* KeywordStringCheck */
static int __Pyx_CheckKeywordStrings(
    PyObject *kwdict,
    const char* function_name,
    int kw_allowed)
{
    PyObject* key = 0;
    Py_ssize_t pos = 0;
#if CYTHON_COMPILING_IN_PYPY
    if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
        goto invalid_keyword;
    return 1;
#else
    while (PyDict_Next(kwdict, &pos, &key, 0)) {
        #if PY_MAJOR_VERSION < 3
        if (unlikely(!PyString_Check(key)))
        #endif
            if (unlikely(!PyUnicode_Check(key)))
                goto invalid_keyword_type;
    }
    if ((!kw_allowed) && unlikely(key))
        goto invalid_keyword;
    return 1;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    return 0;
#endif
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
    return 0;
}

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

/* None */
static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
}

/* SliceObject */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
        Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
        int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
#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;
}

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
#if PY_MAJOR_VERSION < 3 || CYTHON_USE_PYLONG_INTERNALS
#define __Pyx_PyInt_FloorDivideObjC_ZeroDivisionError(operand)\
    if (unlikely(zerodivision_check && ((operand) == 0))) {\
        PyErr_SetString(PyExc_ZeroDivisionError, "integer division by zero");\
        return NULL;\
    }
#endif
static PyObject* __Pyx_PyInt_FloorDivideObjC(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);
            __Pyx_PyInt_FloorDivideObjC_ZeroDivisionError(b)
            if (unlikely(b == -1 && ((unsigned long)a) == 0-(unsigned long)a))
                return PyInt_Type.tp_as_number->nb_floor_divide(op1, op2);
            else {
                long q, r;
                q = a / b;
                r = a - q*b;
                q -= ((r != 0) & ((r ^ b) < 0));
                x = q;
            }
            return PyInt_FromLong(x);
    }
    #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_floor_divide(op1, op2);
            }
        }
                __Pyx_PyInt_FloorDivideObjC_ZeroDivisionError(b)
                {
                    long q, r;
                    q = a / b;
                    r = a - q*b;
                    q -= ((r != 0) & ((r ^ b) < 0));
                    x = q;
                }
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                {
                    PY_LONG_LONG q, r;
                    q = lla / llb;
                    r = lla - q*llb;
                    q -= ((r != 0) & ((r ^ llb) < 0));
                    llx = q;
                }
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    return (inplace ? PyNumber_InPlaceFloorDivide : PyNumber_FloorDivide)(op1, op2);
}
#endif

/* UnpackUnboundCMethod */
static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
    PyObject *method;
    method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
    if (unlikely(!method))
        return -1;
    target->method = method;
#if CYTHON_COMPILING_IN_CPYTHON
    #if PY_MAJOR_VERSION >= 3
    if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
    #endif
    {
        PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
        target->func = descr->d_method->ml_meth;
        target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
    }
#endif
    return 0;
}

/* CallUnboundCMethod1 */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) {
    if (likely(cfunc->func)) {
        int flag = cfunc->flag;
        if (flag == METH_O) {
            return (*(cfunc->func))(self, arg);
        } else if (PY_VERSION_HEX >= 0x030600B1 && flag == METH_FASTCALL) {
            #if PY_VERSION_HEX >= 0x030700A0
                return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1);
            #else
                return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
            #endif
        } else if (PY_VERSION_HEX >= 0x030700A0 && flag == (METH_FASTCALL | METH_KEYWORDS)) {
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
        }
    }
    return __Pyx__CallUnboundCMethod1(cfunc, self, arg);
}
#endif
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        args = PyTuple_New(1);
        if (unlikely(!args)) goto bad;
        Py_INCREF(arg);
        PyTuple_SET_ITEM(args, 0, arg);
        if (cfunc->flag & METH_KEYWORDS)
            result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
        else
            result = (*cfunc->func)(self, args);
    } else {
        args = PyTuple_New(2);
        if (unlikely(!args)) goto bad;
        Py_INCREF(self);
        PyTuple_SET_ITEM(args, 0, self);
        Py_INCREF(arg);
        PyTuple_SET_ITEM(args, 1, arg);
        result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    }
#else
    args = PyTuple_Pack(2, self, arg);
    if (unlikely(!args)) goto bad;
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
#endif
bad:
    Py_XDECREF(args);
    return result;
}

/* CallUnboundCMethod2 */
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
    if (likely(cfunc->func)) {
        PyObject *args[2] = {arg1, arg2};
        if (cfunc->flag == METH_FASTCALL) {
            #if PY_VERSION_HEX >= 0x030700A0
            return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, args, 2);
            #else
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
            #endif
        }
        #if PY_VERSION_HEX >= 0x030700A0
        if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
        #endif
    }
    return __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
}
#endif
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        args = PyTuple_New(2);
        if (unlikely(!args)) goto bad;
        Py_INCREF(arg1);
        PyTuple_SET_ITEM(args, 0, arg1);
        Py_INCREF(arg2);
        PyTuple_SET_ITEM(args, 1, arg2);
        if (cfunc->flag & METH_KEYWORDS)
            result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
        else
            result = (*cfunc->func)(self, args);
    } else {
        args = PyTuple_New(3);
        if (unlikely(!args)) goto bad;
        Py_INCREF(self);
        PyTuple_SET_ITEM(args, 0, self);
        Py_INCREF(arg1);
        PyTuple_SET_ITEM(args, 1, arg1);
        Py_INCREF(arg2);
        PyTuple_SET_ITEM(args, 2, arg2);
        result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    }
#else
    args = PyTuple_Pack(3, self, arg1, arg2);
    if (unlikely(!args)) goto bad;
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
#endif
bad:
    Py_XDECREF(args);
    return result;
}

/* dict_getitem_default */
static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) {
    PyObject* value;
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (unlikely(PyErr_Occurred()))
            return NULL;
        value = default_value;
    }
    Py_INCREF(value);
    if ((1));
#else
    if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) {
        value = PyDict_GetItem(d, key);
        if (unlikely(!value)) {
            value = default_value;
        }
        Py_INCREF(value);
    }
#endif
    else {
        if (default_value == Py_None)
            value = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_get, d, key);
        else
            value = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyDict_Type_get, d, key, default_value);
    }
    return value;
}

/* DivInt[long] */
static CYTHON_INLINE long __Pyx_div_long(long a, long b) {
    long q = a / b;
    long r = a - q*b;
    q -= ((r != 0) & ((r ^ b) < 0));
    return q;
}

/* SetItemInt */
static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
    int r;
    if (!j) return -1;
    r = PyObject_SetItem(o, j, v);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
                                               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) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
            PyObject* old = PyList_GET_ITEM(o, n);
            Py_INCREF(v);
            PyList_SET_ITEM(o, n, v);
            Py_DECREF(old);
            return 1;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_ass_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 -1;
                    PyErr_Clear();
                }
            }
            return m->sq_ass_item(o, i, v);
        }
    }
#else
#if CYTHON_COMPILING_IN_PYPY
    if (is_list || (PySequence_Check(o) && !PyDict_Check(o)))
#else
    if (is_list || PySequence_Check(o))
#endif
    {
        return PySequence_SetItem(o, i, v);
    }
#endif
    return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
}

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

/* WriteUnraisableException */
static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
                                  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
                                  int full_traceback, CYTHON_UNUSED int nogil) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    __Pyx_PyThreadState_declare
#ifdef WITH_THREAD
    PyGILState_STATE state;
    if (nogil)
        state = PyGILState_Ensure();
    else state = (PyGILState_STATE)0;
#endif
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
    if (full_traceback) {
        Py_XINCREF(old_exc);
        Py_XINCREF(old_val);
        Py_XINCREF(old_tb);
        __Pyx_ErrRestore(old_exc, old_val, old_tb);
        PyErr_PrintEx(1);
    }
    #if PY_MAJOR_VERSION < 3
    ctx = PyString_FromString(name);
    #else
    ctx = PyUnicode_FromString(name);
    #endif
    __Pyx_ErrRestore(old_exc, old_val, old_tb);
    if (!ctx) {
        PyErr_WriteUnraisable(Py_None);
    } else {
        PyErr_WriteUnraisable(ctx);
        Py_DECREF(ctx);
    }
#ifdef WITH_THREAD
    if (nogil)
        PyGILState_Release(state);
#endif
}

/* CallNextTpDealloc */
static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc) {
    PyTypeObject* type = Py_TYPE(obj);
    while (type && type->tp_dealloc != current_tp_dealloc)
        type = type->tp_base;
    while (type && type->tp_dealloc == current_tp_dealloc)
        type = type->tp_base;
    if (type)
        type->tp_dealloc(obj);
}

/* CallNextTpTraverse */
static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) {
    PyTypeObject* type = Py_TYPE(obj);
    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);
}

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

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

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

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

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

/* CyFunctionClassCell */
static int __Pyx_CyFunction_InitClassCell(PyObject *cyfunctions, PyObject *classobj) {
    Py_ssize_t i, count = PyList_GET_SIZE(cyfunctions);
    for (i = 0; i < count; i++) {
        __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *)
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            PyList_GET_ITEM(cyfunctions, i);
#else
            PySequence_ITEM(cyfunctions, i);
        if (unlikely(!m))
            return -1;
#endif
        Py_INCREF(classobj);
        m->func_classobj = classobj;
#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
        Py_DECREF((PyObject*)m);
#endif
    }
    return 0;
}

/* 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;\
    }

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

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

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

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= 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(int),
                                     little, !is_unsigned);
    }
}

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