/* Generated by Cython 0.28 */

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

#define 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_28"
#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
  #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
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
#elif defined(PYSTON_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 1
  #define CYTHON_COMPILING_IN_CPYTHON 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
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #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 1
  #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
    #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
  #ifndef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL 1
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT (0 && PY_VERSION_HEX >= 0x03050000)
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
  #endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
  #undef SHIFT
  #undef BASE
  #undef MASK
#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

#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
  #define Py_OptimizeFlag 0
#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_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 PyType_Type
#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
#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)))))
#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_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; // PyThread_create_key reports success always
}
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 // TSS (Thread Specific Storage) API
#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
  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                              0 : _PyUnicode_Ready((PyObject *)(op)))
  #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)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
#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)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? 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
#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 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   PyInt_AsLong
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), 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(MS_WINDOWS)
  #define _USE_MATH_DEFINES
#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_ERR(f_index, lineno, Ln_error) \
{ \
  __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; 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 "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_DEFAULT 0
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    (sizeof(type) < sizeof(Py_ssize_t))  ||\
    (sizeof(type) > sizeof(Py_ssize_t) &&\
          likely(v < (type)PY_SSIZE_T_MAX ||\
                 v == (type)PY_SSIZE_T_MAX)  &&\
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
                                v == (type)PY_SSIZE_T_MIN)))  ||\
    (sizeof(type) == sizeof(Py_ssize_t) &&\
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
                               v == (type)PY_SSIZE_T_MAX)))  )
#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)
#define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False))
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(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);
#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));
    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;
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",
  "apache_beam/utils/windowed_value.pxd",
  "apache_beam/metrics/execution.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/runners/worker/statesampler_fast.pxd",
  "apache_beam/runners/worker/opcounters.pxd",
};

/*--- Type declarations ---*/
struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue;
struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer;
struct __pyx_obj_11apache_beam_7metrics_9execution_ScopedMetricsContainer;
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_OutputProcessor;
struct __pyx_obj_11apache_beam_7runners_6common__OutputProcessor;
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_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_Operation;
struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation;
struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation;
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___read_side_inputs;
struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__;
struct __pyx_opt_args_11apache_beam_5utils_14windowed_value_create;

/* "apache_beam/utils/windowed_value.pxd":35
 * 
 * @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;

/* "apache_beam/runners/common.pxd":55
 *   cdef OutputProcessor output_processor
 * 
 *   cpdef invoke_process(self, WindowedValue windowed_value,             # <<<<<<<<<<<<<<
 *                        restriction_tracker=*,
 *                        OutputProcessor output_processor=*,
 */
struct __pyx_opt_args_11apache_beam_7runners_6common_11DoFnInvoker_invoke_process {
  int __pyx_n;
  PyObject *restriction_tracker;
  struct __pyx_obj_11apache_beam_7runners_6common_OutputProcessor *output_processor;
  PyObject *additional_args;
  PyObject *additional_kwargs;
};
struct __pyx_opt_args_11apache_beam_7runners_6worker_10operations_9Operation_output;

/* "apache_beam/runners/worker/operations.pxd":66
 *   cpdef process(self, WindowedValue windowed_value)
 *   cpdef finish(self)
 *   cpdef output(self, WindowedValue windowed_value, int output_index=*)             # <<<<<<<<<<<<<<
 *   cpdef progress_metrics(self)
 * 
 */
struct __pyx_opt_args_11apache_beam_7runners_6worker_10operations_9Operation_output {
  int __pyx_n;
  int output_index;
};

/* "apache_beam/utils/windowed_value.pxd":25
 * 
 * @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/metrics/execution.pxd":21
 * 
 * 
 * cdef class MetricsContainer(object):             # <<<<<<<<<<<<<<
 *   cdef object step_name
 *   cdef public object counters
 */
struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer {
  PyObject_HEAD
  PyObject *step_name;
  PyObject *counters;
  PyObject *distributions;
  PyObject *gauges;
};


/* "apache_beam/metrics/execution.pxd":28
 * 
 * 
 * cdef class ScopedMetricsContainer(object):             # <<<<<<<<<<<<<<
 *   cpdef enter(self)
 *   cpdef exit(self)
 */
struct __pyx_obj_11apache_beam_7metrics_9execution_ScopedMetricsContainer {
  PyObject_HEAD
  struct __pyx_vtabstruct_11apache_beam_7metrics_9execution_ScopedMetricsContainer *__pyx_vtab;
  PyObject *_stack;
  struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *_container;
};


/* "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)
 * 
 */
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":34
 * 
 * 
 * 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;
};


/* "apache_beam/runners/common.pxd":40
 * 
 * 
 * cdef class DoFnSignature(object):             # <<<<<<<<<<<<<<
 *   cdef public MethodWrapper process_method
 *   cdef public MethodWrapper start_bundle_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 *start_bundle_method;
  struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *finish_bundle_method;
  struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *initial_restriction_method;
  struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *restriction_coder_method;
  struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *create_tracker_method;
  struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *split_method;
  PyObject *do_fn;
};


/* "apache_beam/runners/common.pxd":51
 * 
 * 
 * cdef class DoFnInvoker(object):             # <<<<<<<<<<<<<<
 *   cdef public DoFnSignature signature
 *   cdef OutputProcessor output_processor
 */
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_OutputProcessor *output_processor;
};


/* "apache_beam/runners/common.pxd":67
 * 
 * 
 * cdef class SimpleInvoker(DoFnInvoker):             # <<<<<<<<<<<<<<
 *   cdef object process_method
 * 
 */
struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker {
  struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker __pyx_base;
  PyObject *process_method;
};


/* "apache_beam/runners/common.pxd":71
 * 
 * 
 * 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;
  int has_windowed_inputs;
  int cache_globally_windowed_args;
  PyObject *process_method;
};


/* "apache_beam/runners/common.pxd":82
 * 
 * 
 * cdef class DoFnRunner(Receiver):             # <<<<<<<<<<<<<<
 *   cdef DoFnContext context
 *   cdef object step_name
 */
struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner {
  struct __pyx_obj_11apache_beam_7runners_6common_Receiver __pyx_base;
  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;
};


/* "apache_beam/runners/common.pxd":91
 * 
 * 
 * cdef class OutputProcessor(object):             # <<<<<<<<<<<<<<
 *   @cython.locals(windowed_value=WindowedValue,
 *                  output_element_count=int64_t)
 */
struct __pyx_obj_11apache_beam_7runners_6common_OutputProcessor {
  PyObject_HEAD
  struct __pyx_vtabstruct_11apache_beam_7runners_6common_OutputProcessor *__pyx_vtab;
};


/* "apache_beam/runners/common.pxd":97
 * 
 * 
 * cdef class _OutputProcessor(OutputProcessor):             # <<<<<<<<<<<<<<
 *   cdef object window_fn
 *   cdef Receiver main_receivers
 */
struct __pyx_obj_11apache_beam_7runners_6common__OutputProcessor {
  struct __pyx_obj_11apache_beam_7runners_6common_OutputProcessor __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;
};


/* "apache_beam/runners/common.pxd":106
 *   cpdef process_outputs(self, WindowedValue element, results)
 * 
 * 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":113
 * 
 * 
 * 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
 */
struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter {
  struct __pyx_obj_11apache_beam_5utils_8counters_Counter __pyx_base;
  PyObject *_fast_add_input;
};


/* "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":49
 *       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;
  int64_t _sample_counter;
  int64_t _next_sample;
};


/* "apache_beam/runners/worker/operations.pxd":30
 * 
 * 
 * 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;
};


/* "apache_beam/runners/worker/operations.pxd":42
 * 
 * 
 * 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;
  struct __pyx_obj_11apache_beam_7metrics_9execution_ScopedMetricsContainer *scoped_metrics_container;
  PyObject *receivers;
  int debug_logging_enabled;
  PyObject *step_name;
  PyObject *state_sampler;
  PyObject *scoped_start_state;
  PyObject *scoped_process_state;
  PyObject *scoped_finish_state;
};


/* "apache_beam/runners/worker/operations.pxd":70
 * 
 * 
 * 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":75
 * 
 * 
 * cdef class DoOperation(Operation):             # <<<<<<<<<<<<<<
 *   cdef object dofn_runner
 *   cdef Receiver dofn_receiver
 */
struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation __pyx_base;
  PyObject *dofn_runner;
  struct __pyx_obj_11apache_beam_7runners_6common_Receiver *dofn_receiver;
  PyObject *tagged_receivers;
  PyObject *side_input_maps;
};


/* "apache_beam/runners/worker/operations.pxd":82
 * 
 * 
 * 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":86
 * 
 * 
 * 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 *table;
  long max_keys;
  long key_count;
};


/* "apache_beam/runners/worker/operations.pxd":96
 * 
 * 
 * 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":284
 *     self.tagged_receivers = None
 * 
 *   def _read_side_inputs(self, tags_and_types):             # <<<<<<<<<<<<<<
 *     """Generator reading side inputs in the order prescribed by tags_and_types.
 * 
 */
struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct___read_side_inputs {
  PyObject_HEAD
  PyObject *__pyx_v_default;
  PyObject *__pyx_v_has_default;
  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/runners/worker/operations.py":494
 * class PGBKCVOperation(Operation):
 * 
 *   def __init__(self, name_context, spec, counter_factory, state_sampler):             # <<<<<<<<<<<<<<
 *     super(PGBKCVOperation, self).__init__(
 *         name_context, spec, counter_factory, state_sampler)
 */
struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__ {
  PyObject_HEAD
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self;
};



/* "apache_beam/utils/windowed_value.pxd":25
 * 
 * @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/metrics/execution.pxd":28
 * 
 * 
 * cdef class ScopedMetricsContainer(object):             # <<<<<<<<<<<<<<
 *   cpdef enter(self)
 *   cpdef exit(self)
 */

struct __pyx_vtabstruct_11apache_beam_7metrics_9execution_ScopedMetricsContainer {
  PyObject *(*enter)(struct __pyx_obj_11apache_beam_7metrics_9execution_ScopedMetricsContainer *, int __pyx_skip_dispatch);
  PyObject *(*exit)(struct __pyx_obj_11apache_beam_7metrics_9execution_ScopedMetricsContainer *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_11apache_beam_7metrics_9execution_ScopedMetricsContainer *__pyx_vtabptr_11apache_beam_7metrics_9execution_ScopedMetricsContainer;


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

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);
};
static struct __pyx_vtabstruct_11apache_beam_7runners_6common_Receiver *__pyx_vtabptr_11apache_beam_7runners_6common_Receiver;


/* "apache_beam/runners/common.pxd":51
 * 
 * 
 * cdef class DoFnInvoker(object):             # <<<<<<<<<<<<<<
 *   cdef public DoFnSignature signature
 *   cdef OutputProcessor output_processor
 */

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_restriction_coder)(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *, 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":67
 * 
 * 
 * cdef class SimpleInvoker(DoFnInvoker):             # <<<<<<<<<<<<<<
 *   cdef object process_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":71
 * 
 * 
 * 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":82
 * 
 * 
 * cdef class DoFnRunner(Receiver):             # <<<<<<<<<<<<<<
 *   cdef DoFnContext context
 *   cdef object step_name
 */

struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnRunner {
  struct __pyx_vtabstruct_11apache_beam_7runners_6common_Receiver __pyx_base;
  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":91
 * 
 * 
 * cdef class OutputProcessor(object):             # <<<<<<<<<<<<<<
 *   @cython.locals(windowed_value=WindowedValue,
 *                  output_element_count=int64_t)
 */

struct __pyx_vtabstruct_11apache_beam_7runners_6common_OutputProcessor {
  PyObject *(*process_outputs)(struct __pyx_obj_11apache_beam_7runners_6common_OutputProcessor *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_11apache_beam_7runners_6common_OutputProcessor *__pyx_vtabptr_11apache_beam_7runners_6common_OutputProcessor;


/* "apache_beam/runners/common.pxd":97
 * 
 * 
 * cdef class _OutputProcessor(OutputProcessor):             # <<<<<<<<<<<<<<
 *   cdef object window_fn
 *   cdef Receiver main_receivers
 */

struct __pyx_vtabstruct_11apache_beam_7runners_6common__OutputProcessor {
  struct __pyx_vtabstruct_11apache_beam_7runners_6common_OutputProcessor __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_7runners_6common__OutputProcessor *__pyx_vtabptr_11apache_beam_7runners_6common__OutputProcessor;


/* "apache_beam/runners/common.pxd":106
 *   cpdef process_outputs(self, WindowedValue element, results)
 * 
 * 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":113
 * 
 * 
 * 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
 */

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;


/* "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 {
  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":49
 *       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 *(*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);
  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":66
 * 
 * 
 * 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);
};
static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_ConsumerSet;


/* "apache_beam/runners/worker/operations.py":103
 * 
 * 
 * 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 *(*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 *(*progress_metrics)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, 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":237
 * 
 * 
 * class ReadOperation(Operation):             # <<<<<<<<<<<<<<
 * 
 *   def start(self):
 */

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":275
 * 
 * 
 * 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":417
 * 
 * 
 * class CombineOperation(Operation):             # <<<<<<<<<<<<<<
 *   """A Combine operation executing a CombineFn for each input element."""
 * 
 */

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":492
 * 
 * 
 * class PGBKCVOperation(Operation):             # <<<<<<<<<<<<<<
 * 
 *   def __init__(self, name_context, spec, counter_factory, state_sampler):
 */

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 *, 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":565
 * 
 * 
 * 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);

/* RaiseArgTupleInvalid.proto */
static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);

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

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

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

/* PyErrFetchRestore.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
#define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
#else
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#endif
#else
#define __Pyx_PyErr_Clear() PyErr_Clear()
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
#endif

/* Profile.proto */
#ifndef CYTHON_PROFILE
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
  #define CYTHON_PROFILE 0
#else
  #define CYTHON_PROFILE 1
#endif
#endif
#ifndef CYTHON_TRACE_NOGIL
  #define CYTHON_TRACE_NOGIL 0
#else
  #if CYTHON_TRACE_NOGIL && !defined(CYTHON_TRACE)
    #define CYTHON_TRACE 1
  #endif
#endif
#ifndef CYTHON_TRACE
  #define CYTHON_TRACE 0
#endif
#if CYTHON_TRACE
  #undef CYTHON_PROFILE_REUSE_FRAME
#endif
#ifndef CYTHON_PROFILE_REUSE_FRAME
  #define CYTHON_PROFILE_REUSE_FRAME 0
#endif
#if CYTHON_PROFILE || CYTHON_TRACE
  #include "compile.h"
  #include "frameobject.h"
  #include "traceback.h"
  #if 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;
  #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 (unlikely(tstate->use_tracing) && !tstate->tracing &&\
                  (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\
              __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 (unlikely(tstate->use_tracing) && !tstate->tracing &&\
              (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\
          __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 (unlikely(tstate->use_tracing) && !tstate->tracing &&\
              (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\
          __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 (tstate->use_tracing &&\
              (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\
          tstate->tracing++;\
          tstate->use_tracing = 0;\
          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);\
          }\
          tstate->use_tracing = 1;\
          tstate->tracing--;\
      }\
  }
  static void __Pyx_call_return_trace_func(PyThreadState *tstate, PyFrameObject *frame, PyObject *result) {
      PyObject *type, *value, *traceback;
      __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
      tstate->tracing++;
      tstate->use_tracing = 0;
      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);
      tstate->use_tracing = 1;
      tstate->tracing--;
      __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 (tstate->use_tracing) {\
                  __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
              }\
              PyGILState_Release(state);\
          }\
      } else {\
          PyThreadState* tstate = __Pyx_PyThreadState_Current;\
          if (tstate->use_tracing) {\
              __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 (tstate->use_tracing) {\
          __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);
      tstate->tracing++;
      tstate->use_tracing = 0;
      ret = tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_LINE, NULL);
      tstate->use_tracing = 1;
      tstate->tracing--;
      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 (unlikely(tstate->use_tracing && 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 (unlikely(tstate->use_tracing && 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 (unlikely(tstate->use_tracing && 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

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

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

/* PyFunctionFastCall.proto */
#if CYTHON_FAST_PYCALL
#define __Pyx_PyFunction_FastCall(func, args, nargs)\
    __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
#else
#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
#endif
#endif

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

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

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

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

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

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

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

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

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

/* 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 */
static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
#else
#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\
    (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);
        Py_SIZE(list) = len+1;
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
#endif

/* GetItemInt.proto */
#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
               __Pyx_GetItemInt_Generic(o, to_py_func(i))))
#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
                                                     int is_list, int wraparound, int boundscheck);

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

/* 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);
        Py_SIZE(list) = len+1;
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif

/* PyObjectCallMethod1.proto */
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg);

/* append.proto */
static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x);

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

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

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

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

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

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

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

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

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

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

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

/* CythonFunction.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;
    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_NewEx(ml, flags, qualname, self, module, globals, code)\
    __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code)
static PyObject *__Pyx_CyFunction_New(PyTypeObject *, 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);

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

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

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

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

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

/* UnpackTuple2.proto */
#define __Pyx_unpack_tuple2(tuple, value1, value2, is_tuple, has_known_size, decref_tuple)\
    (likely(is_tuple || PyTuple_Check(tuple)) ?\
        (likely(has_known_size || PyTuple_GET_SIZE(tuple) == 2) ?\
            __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple) :\
            (__Pyx_UnpackTupleError(tuple, 2), -1)) :\
        __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple))
static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
    PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple);
static int __Pyx_unpack_tuple2_generic(
    PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple);

/* dict_iter.proto */
static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_is_dict);
static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos,
                                              PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict);

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_FloorDivideObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
#else
#define __Pyx_PyInt_FloorDivideObjC(op1, op2, intval, inplace)\
    (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

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

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

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

/* SetupReduce.proto */
static int __Pyx_setup_reduce(PyObject* type_obj);

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

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

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

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

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

/* FastTypeChecks.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
#else
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
#endif
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)

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

/* CoroutineBase.proto */
typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *);
typedef struct {
    PyObject_HEAD
    __pyx_coroutine_body_t body;
    PyObject *closure;
    PyObject *exc_type;
    PyObject *exc_value;
    PyObject *exc_traceback;
    PyObject *gi_weakreflist;
    PyObject *classobj;
    PyObject *yieldfrom;
    PyObject *gi_name;
    PyObject *gi_qualname;
    PyObject *gi_modulename;
    PyObject *gi_code;
    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 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);
#define __Pyx_Coroutine_SwapException(self) {\
    __Pyx_ExceptionSwap(&(self)->exc_type, &(self)->exc_value, &(self)->exc_traceback);\
    __Pyx_Coroutine_ResetFrameBackpointer(self);\
    }
#define __Pyx_Coroutine_ResetAndClearException(self) {\
    __Pyx_ExceptionReset((self)->exc_type, (self)->exc_value, (self)->exc_traceback);\
    (self)->exc_type = (self)->exc_value = (self)->exc_traceback = NULL;\
    }
#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_CoroutineObject *self);

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

/* PyIdentifierFromString.proto */
#if !defined(__Pyx_PyIdentifier_FromString)
#if PY_MAJOR_VERSION < 3
  #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s)
#else
  #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s)
#endif
#endif

/* ModuleImport.proto */
static PyObject *__Pyx_ImportModule(const char *name);

/* TypeImport.proto */
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict);

/* VoidPtrImport.proto */
static int __Pyx_ImportVoidPtr(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_receive(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_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_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(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_progress_metrics(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_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_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_progress_metrics(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_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_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_output_key(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_wkey, PyObject *__pyx_v_value, 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_WindowedValue = 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)

/* Module declarations from 'apache_beam.metrics.execution' */
static PyTypeObject *__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7metrics_9execution_ScopedMetricsContainer = 0;

/* 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_OutputProcessor = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common__OutputProcessor = 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 'cpython.version' */

/* Module declarations from '__builtin__' */

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

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

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

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

/* 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 '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_Operation = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation = 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___read_side_inputs = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__ = 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_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_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_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_staticmethod;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_super;
static PyObject *__pyx_builtin_NotImplementedError;
static PyObject *__pyx_builtin_ValueError;
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 const char __pyx_k_a[] = "a";
static const char __pyx_k_e[] = "e";
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__5[] = "[";
static const char __pyx_k__6[] = "]";
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_vs[] = "vs";
static const char __pyx_k_OUT[] = "OUT";
static const char __pyx_k__16[] = ", ";
static const char __pyx_k__17[] = "<";
static const char __pyx_k__18[] = " ";
static const char __pyx_k__19[] = ">";
static const char __pyx_k__32[] = "_";
static const char __pyx_k_doc[] = "__doc__";
static const char __pyx_k_end[] = "end";
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_wkv[] = "wkv";
static const char __pyx_k_zip[] = "zip";
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_func[] = "__func__";
static const char __pyx_k_init[] = "__init__";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_name[] = "__name__";
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_user[] = "user";
static const char __pyx_k_wkey[] = "wkey";
static const char __pyx_k_DEBUG[] = "DEBUG";
static const char __pyx_k_apply[] = "apply";
static const char __pyx_k_class[] = "__class__";
static const char __pyx_k_clear[] = "clear";
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_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_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_value[] = "value";
static const char __pyx_k_append[] = "append";
static const char __pyx_k_common[] = "common";
static const char __pyx_k_dict_2[] = "_dict";
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_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_pvalue[] = "pvalue";
static const char __pyx_k_reduce[] = "__reduce__";
static const char __pyx_k_source[] = "source";
static const char __pyx_k_target[] = "target";
static const char __pyx_k_update[] = "update";
static const char __pyx_k_Metrics[] = "Metrics";
static const char __pyx_k_coder_2[] = ", coder=";
static const char __pyx_k_default[] = "default";
static const char __pyx_k_execute[] = "execute";
static const char __pyx_k_im_func[] = "im_func";
static const char __pyx_k_logging[] = "logging";
static const char __pyx_k_missing[] = "__missing__";
static const char __pyx_k_pickler[] = "pickler";
static const char __pyx_k_prepare[] = "__prepare__";
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_Measured[] = "Measured";
static const char __pyx_k_Receiver[] = "Receiver";
static const char __pyx_k_builtins[] = "builtins";
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_measured[] = "measured";
static const char __pyx_k_producer[] = "producer";
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_reversed[] = "reversed";
static const char __pyx_k_setstate[] = "__setstate__";
static const char __pyx_k_side_tag[] = "side_tag";
static const char __pyx_k_CombineFn[] = "CombineFn";
static const char __pyx_k_DoFnState[] = "DoFnState";
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_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_step_name[] = "step_name";
static const char __pyx_k_timestamp[] = "timestamp";
static const char __pyx_k_user_name[] = "user_name";
static const char __pyx_k_DoFnRunner[] = "DoFnRunner";
static const char __pyx_k_PTransform[] = "PTransform";
static const char __pyx_k_ValueError[] = "ValueError";
static const char __pyx_k_WorkerDoFn[] = "WorkerDoFn";
static const char __pyx_k_WorkerRead[] = "WorkerRead";
static const char __pyx_k_add_inputs[] = "add_inputs";
static const char __pyx_k_combine_fn[] = "combine_fn";
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_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_sideinputs[] = "sideinputs";
static const char __pyx_k_startswith[] = "startswith";
static const char __pyx_k_view_class[] = "view_class";
static const char __pyx_k_AsSingleton[] = "AsSingleton";
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_ONLY_OUTPUT[] = "ONLY_OUTPUT";
static const char __pyx_k_PickleError[] = "PickleError";
static const char __pyx_k_WorkerWrite[] = "WorkerWrite";
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_dofn_runner[] = "dofn_runner";
static const char __pyx_k_has_default[] = "has_default";
static const char __pyx_k_input_index[] = "input_index";
static const char __pyx_k_iterator_fn[] = "iterator_fn";
static const char __pyx_k_output_tags[] = "output_tags";
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_system_name[] = "system_name";
static const char __pyx_k_SideInputMap[] = "SideInputMap";
static const char __pyx_k_SourceBundle[] = "SourceBundle";
static const char __pyx_k_add_receiver[] = "add_receiver";
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_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_staticmethod[] = "staticmethod";
static const char __pyx_k_str_internal[] = "str_internal";
static const char __pyx_k_stringsource[] = "stringsource";
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_MeanCombineFn[] = "MeanCombineFn";
static const char __pyx_k_PGBKOperation[] = "PGBKOperation";
static const char __pyx_k_PropertyNames[] = "PropertyNames";
static const char __pyx_k_WindowedValue[] = "WindowedValue";
static const char __pyx_k_WorkerFlatten[] = "WorkerFlatten";
static const char __pyx_k_len_consumers[] = ", len(consumers)=";
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_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_to_runner_api[] = "to_runner_api";
static const char __pyx_k_CountCombineFn[] = "CountCombineFn";
static const char __pyx_k_apache_beam_io[] = "apache_beam.io";
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_operation_name[] = "operation_name";
static const char __pyx_k_printable_name[] = "printable_name";
static const char __pyx_k_shuffle_source[] = "shuffle_source";
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_windowed_value[] = "windowed_value";
static const char __pyx_k_Operation_start[] = "Operation.start";
static const char __pyx_k_Starting_op_d_s[] = "Starting op %d %s";
static const char __pyx_k_TaggedReceivers[] = "_TaggedReceivers";
static const char __pyx_k_WorkerCombineFn[] = "WorkerCombineFn";
static const char __pyx_k_beam_fn_api_pb2[] = "beam_fn_api_pb2";
static const char __pyx_k_counter_factory[] = "counter_factory";
static const char __pyx_k_element_counter[] = "element_counter";
static const char __pyx_k_operation_specs[] = "operation_specs";
static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
static const char __pyx_k_sampled_seconds[] = "sampled_seconds";
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_EmulatedIterable[] = "EmulatedIterable";
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_create_operation[] = "create_operation";
static const char __pyx_k_curry_combine_fn[] = "curry_combine_fn";
static const char __pyx_k_printable_fields[] = "printable_fields";
static const char __pyx_k_progress_metrics[] = "progress_metrics";
static const char __pyx_k_read_side_inputs[] = "_read_side_inputs";
static const char __pyx_k_tagged_receivers[] = "tagged_receivers";
static const char __pyx_k_total_time_spent[] = "total_time_spent";
static const char __pyx_k_DoOperation_start[] = "DoOperation.start";
static const char __pyx_k_Operation_process[] = "Operation.process";
static const char __pyx_k_ProcessedElements[] = "ProcessedElements";
static const char __pyx_k_Processing_s_in_s[] = "Processing [%s] in %s";
static const char __pyx_k_apache_sideinputs[] = "apache_sideinputs";
static const char __pyx_k_counter_factory_2[] = "_counter_factory";
static const char __pyx_k_get_range_tracker[] = "get_range_tracker";
static const char __pyx_k_metrics_container[] = "metrics_container";
static const char __pyx_k_test_shuffle_sink[] = "test_shuffle_sink";
static const char __pyx_k_DoFnRunnerReceiver[] = "DoFnRunnerReceiver";
static const char __pyx_k_DoOperation_finish[] = "DoOperation.finish";
static const char __pyx_k_WorkerMergeWindows[] = "WorkerMergeWindows";
static const char __pyx_k_WorkerShuffleWrite[] = "WorkerShuffleWrite";
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_global_window_type[] = "_global_window_type";
static const char __pyx_k_processed_elements[] = "processed_elements";
static const char __pyx_k_ConsumerSet_receive[] = "ConsumerSet.receive";
static const char __pyx_k_DataflowNameContext[] = "DataflowNameContext";
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_PGBKOperation_flush[] = "PGBKOperation.flush";
static const char __pyx_k_ReadOperation_start[] = "ReadOperation.start";
static const char __pyx_k_WorkerInMemoryWrite[] = "WorkerInMemoryWrite";
static const char __pyx_k_apache_beam_runners[] = "apache_beam.runners";
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_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_init___locals_lambda[] = "__init__.<locals>.<lambda>";
static const char __pyx_k_scoped_process_state[] = "scoped_process_state";
static const char __pyx_k_PGBKOperation_process[] = "PGBKOperation.process";
static const char __pyx_k_ShuffleWriteOperation[] = "ShuffleWriteOperation";
static const char __pyx_k_SimpleMapTaskExecutor[] = "SimpleMapTaskExecutor";
static const char __pyx_k_WorkerSideInputSource[] = "WorkerSideInputSource";
static const char __pyx_k_debug_logging_enabled[] = "debug_logging_enabled";
static const char __pyx_k_output_element_counts[] = "output_element_counts";
static const char __pyx_k_test_shuffle_source_2[] = "_test_shuffle_source";
static const char __pyx_k_update_counters_start[] = "update_counters_start";
static const char __pyx_k_write_windowed_values[] = "write_windowed_values";
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_ScopedMetricsContainer[] = "ScopedMetricsContainer";
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_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_PGBKCVOperation_process[] = "PGBKCVOperation.process";
static const char __pyx_k_PhasedCombineFnExecutor[] = "PhasedCombineFnExecutor";
static const char __pyx_k_WorkerPartialGroupByKey[] = "WorkerPartialGroupByKey";
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_pyx_unpickle_ConsumerSet[] = "__pyx_unpickle_ConsumerSet";
static const char __pyx_k_pyx_unpickle_DoOperation[] = "__pyx_unpickle_DoOperation";
static const char __pyx_k_DoFnRunnerReceiver___init[] = "DoFnRunnerReceiver.__init__";
static const char __pyx_k_Operation___reduce_cython[] = "Operation.__reduce_cython__";
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_DoFnRunnerReceiver_receive[] = "DoFnRunnerReceiver.receive";
static const char __pyx_k_Operation_progress_metrics[] = "Operation.progress_metrics";
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_pyx_unpickle_ReadOperation[] = "__pyx_unpickle_ReadOperation";
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_GroupedShuffleReadOperation[] = "GroupedShuffleReadOperation";
static const char __pyx_k_Operation___setstate_cython[] = "Operation.__setstate_cython__";
static const char __pyx_k_apache_beam_portability_api[] = "apache_beam.portability.api";
static const char __pyx_k_get_iterator_fn_for_sources[] = "get_iterator_fn_for_sources";
static const char __pyx_k_DoOperation_progress_metrics[] = "DoOperation.progress_metrics";
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_transforms_window[] = "apache_beam.transforms.window";
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_InMemoryWriteOperation_process[] = "InMemoryWriteOperation.process";
static const char __pyx_k_WorkerReifyTimestampAndWindows[] = "WorkerReifyTimestampAndWindows";
static const char __pyx_k_read_side_inputs_locals_lambda[] = "_read_side_inputs.<locals>.<lambda>";
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_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_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_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_Incompatible_checksums_s_vs_0x31[] = "Incompatible checksums (%s vs 0x31178f9 = (consumers, counter_factory, debug_logging_enabled, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, spec, state_sampler, step_name))";
static const char __pyx_k_Incompatible_checksums_s_vs_0x36[] = "Incompatible checksums (%s vs 0x36f06cd = (consumers, counter_factory, debug_logging_enabled, dofn_receiver, dofn_runner, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, side_input_maps, spec, state_sampler, step_name, tagged_receivers))";
static const char __pyx_k_Incompatible_checksums_s_vs_0xdd[] = "Incompatible checksums (%s vs 0xdd72a47 = (consumers, counter_factory, debug_logging_enabled, metrics_container, name_context, operation_name, phased_combine_fn, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, spec, state_sampler, step_name))";
static const char __pyx_k_Incompatible_checksums_s_vs_0xe5[] = "Incompatible checksums (%s vs 0xe53e5b7 = (coder, consumers, opcounter, output_index, step_name))";
static const char __pyx_k_Incompatible_checksums_s_vs_0xe7[] = "Incompatible checksums (%s vs 0xe750882 = (combine_fn, combine_fn_add_input, consumers, counter_factory, debug_logging_enabled, key_count, max_keys, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, spec, state_sampler, step_name, table))";
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_SimpleMapTaskExecutor_operations[] = "SimpleMapTaskExecutor.operations";
static const char __pyx_k_StreamingGroupAlsoByWindowsOpera[] = "StreamingGroupAlsoByWindowsOperation";
static const char __pyx_k_Unexpected_output_name_for_opera[] = "Unexpected output name for operation: %s";
static const char __pyx_k_apache_beam_runners_dataflow_int[] = "apache_beam.runners.dataflow.internal.names";
static const char __pyx_k_apache_beam_runners_worker_opera[] = "apache_beam.runners.worker.operations";
static const char __pyx_k_apache_beam_transforms_combiners[] = "apache_beam.transforms.combiners";
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_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_AsSingleton;
static PyObject *__pyx_n_s_BatchGroupAlsoByWindowsOperation;
static PyObject *__pyx_n_s_CallableWrapperCombineFn;
static PyObject *__pyx_n_s_CombineFn;
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_ConsumerSet___reduce_cython;
static PyObject *__pyx_n_s_ConsumerSet___setstate_cython;
static PyObject *__pyx_n_s_ConsumerSet_receive;
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_DataflowNameContext;
static PyObject *__pyx_n_s_DoFnRunner;
static PyObject *__pyx_n_s_DoFnRunnerReceiver;
static PyObject *__pyx_n_s_DoFnRunnerReceiver___init;
static PyObject *__pyx_n_s_DoFnRunnerReceiver_receive;
static PyObject *__pyx_n_s_DoFnState;
static PyObject *__pyx_n_s_DoOperation___reduce_cython;
static PyObject *__pyx_n_s_DoOperation___setstate_cython;
static PyObject *__pyx_n_s_DoOperation__read_side_inputs;
static PyObject *__pyx_n_s_DoOperation_finish;
static PyObject *__pyx_n_s_DoOperation_process;
static PyObject *__pyx_n_s_DoOperation_progress_metrics;
static PyObject *__pyx_n_s_DoOperation_start;
static PyObject *__pyx_n_s_EmulatedIterable;
static PyObject *__pyx_kp_u_Expected_an_instance_of_operatio;
static PyObject *__pyx_kp_u_Finishing_s;
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_GlobalWindows;
static PyObject *__pyx_n_s_GroupedShuffleReadOperation;
static PyObject *__pyx_n_s_ImportError;
static PyObject *__pyx_n_s_InMemoryWriteOperation;
static PyObject *__pyx_n_s_InMemoryWriteOperation_process;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x31;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x36;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xdd;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xe5;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xe7;
static PyObject *__pyx_n_s_MeanCombineFn;
static PyObject *__pyx_n_s_Measured;
static PyObject *__pyx_n_s_Metrics;
static PyObject *__pyx_n_s_MetricsContainer;
static PyObject *__pyx_n_s_NameContext;
static PyObject *__pyx_n_s_NativeReadOperation;
static PyObject *__pyx_n_s_NativeWriteOperation;
static PyObject *__pyx_n_s_NotImplementedError;
static PyObject *__pyx_n_u_ONLY_OUTPUT;
static PyObject *__pyx_n_s_OUT;
static PyObject *__pyx_n_s_Operation___reduce_cython;
static PyObject *__pyx_n_s_Operation___setstate_cython;
static PyObject *__pyx_n_s_Operation_add_receiver;
static PyObject *__pyx_n_s_Operation_finish;
static PyObject *__pyx_n_s_Operation_output;
static PyObject *__pyx_n_s_Operation_process;
static PyObject *__pyx_n_s_Operation_progress_metrics;
static PyObject *__pyx_n_s_Operation_start;
static PyObject *__pyx_n_s_Operation_str_internal;
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_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_PTransform;
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_n_s_ProcessedElements;
static PyObject *__pyx_kp_u_Processing_s_in_s;
static PyObject *__pyx_n_s_PropertyNames;
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_ScopedMetricsContainer;
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_SourceBundle;
static PyObject *__pyx_kp_u_Starting_op_d_s;
static PyObject *__pyx_n_s_StreamingGroupAlsoByWindowsOpera;
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_TypeError;
static PyObject *__pyx_kp_u_Unexpected_output_name_for_opera;
static PyObject *__pyx_n_s_UngroupedShuffleReadOperation;
static PyObject *__pyx_kp_u_Unknown_side_input_type_r;
static PyObject *__pyx_n_s_ValueError;
static PyObject *__pyx_n_s_WindowedValue;
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__16;
static PyObject *__pyx_kp_u__17;
static PyObject *__pyx_kp_u__18;
static PyObject *__pyx_kp_u__19;
static PyObject *__pyx_n_u__32;
static PyObject *__pyx_kp_u__5;
static PyObject *__pyx_kp_u__6;
static PyObject *__pyx_n_s_a;
static PyObject *__pyx_n_s_add_input;
static PyObject *__pyx_n_s_add_inputs;
static PyObject *__pyx_n_s_add_receiver;
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_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_dataflow_int;
static PyObject *__pyx_n_s_apache_beam_runners_worker;
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_transforms;
static PyObject *__pyx_n_s_apache_beam_transforms_combiners;
static PyObject *__pyx_n_s_apache_beam_transforms_window;
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_beam_fn_api_pb2;
static PyObject *__pyx_n_s_builtins;
static PyObject *__pyx_n_s_class;
static PyObject *__pyx_n_s_clear;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_close;
static PyObject *__pyx_n_s_coder;
static PyObject *__pyx_kp_u_coder_2;
static PyObject *__pyx_n_s_collections;
static PyObject *__pyx_n_s_combine_fn;
static PyObject *__pyx_n_s_combiners;
static PyObject *__pyx_n_s_common;
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_accumulator;
static PyObject *__pyx_n_s_create_operation;
static PyObject *__pyx_n_s_create_pgbk_op;
static PyObject *__pyx_n_s_curry_combine_fn;
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_default;
static PyObject *__pyx_n_u_default;
static PyObject *__pyx_n_s_defaultdict;
static PyObject *__pyx_n_s_dict;
static PyObject *__pyx_n_s_dict_2;
static PyObject *__pyx_n_s_doc;
static PyObject *__pyx_n_s_dofn_runner;
static PyObject *__pyx_n_s_e;
static PyObject *__pyx_n_s_element_counter;
static PyObject *__pyx_n_s_end;
static PyObject *__pyx_n_s_enter;
static PyObject *__pyx_n_s_enumerate;
static PyObject *__pyx_n_s_execute;
static PyObject *__pyx_n_s_exit;
static PyObject *__pyx_n_s_filter;
static PyObject *__pyx_n_s_finish;
static PyObject *__pyx_n_u_finish;
static PyObject *__pyx_n_s_flush;
static PyObject *__pyx_n_s_fn;
static PyObject *__pyx_n_s_func;
static PyObject *__pyx_n_s_get;
static PyObject *__pyx_n_s_getLogger;
static PyObject *__pyx_n_s_get_iterator_fn_for_sources;
static PyObject *__pyx_n_s_get_range_tracker;
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_default;
static PyObject *__pyx_n_s_i;
static PyObject *__pyx_n_u_im_func;
static PyObject *__pyx_n_s_import;
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_s_input_index;
static PyObject *__pyx_n_s_inputs;
static PyObject *__pyx_n_u_inputs;
static PyObject *__pyx_n_s_iobase;
static PyObject *__pyx_n_s_isEnabledFor;
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_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_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_measured;
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_min;
static PyObject *__pyx_n_s_missing;
static PyObject *__pyx_n_s_module;
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_new;
static PyObject *__pyx_n_s_o;
static PyObject *__pyx_n_s_object;
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_s_output_buffer;
static PyObject *__pyx_n_s_output_coders;
static PyObject *__pyx_n_u_output_coders;
static PyObject *__pyx_n_s_output_element_counts;
static PyObject *__pyx_n_s_output_index;
static PyObject *__pyx_n_s_output_key;
static PyObject *__pyx_n_s_output_tags;
static PyObject *__pyx_n_s_output_value;
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_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_processed_elements;
static PyObject *__pyx_n_s_producer;
static PyObject *__pyx_n_s_progress_metrics;
static PyObject *__pyx_n_s_pvalue;
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_Operation;
static PyObject *__pyx_n_s_pyx_unpickle_PGBKCVOperation;
static PyObject *__pyx_n_s_pyx_unpickle_ReadOperation;
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_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_reversed;
static PyObject *__pyx_kp_u_s;
static PyObject *__pyx_kp_u_s_2;
static PyObject *__pyx_n_s_sampled_seconds;
static PyObject *__pyx_n_s_sampler;
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_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_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_size;
static PyObject *__pyx_n_s_source;
static PyObject *__pyx_n_s_sources;
static PyObject *__pyx_n_s_spec;
static PyObject *__pyx_n_s_start;
static PyObject *__pyx_n_u_start;
static PyObject *__pyx_n_s_start_position;
static PyObject *__pyx_n_s_startswith;
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_sum;
static PyObject *__pyx_n_s_super;
static PyObject *__pyx_n_s_system_name;
static PyObject *__pyx_n_s_table;
static PyObject *__pyx_n_s_tag;
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_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_throw;
static PyObject *__pyx_n_s_timestamp;
static PyObject *__pyx_n_s_to_runner_api;
static PyObject *__pyx_n_s_total_time_spent;
static PyObject *__pyx_n_s_type;
static PyObject *__pyx_n_s_update;
static PyObject *__pyx_n_s_update_counters_finish;
static PyObject *__pyx_n_s_update_counters_start;
static PyObject *__pyx_n_s_use_setstate;
static PyObject *__pyx_n_s_user;
static PyObject *__pyx_n_s_user_name;
static PyObject *__pyx_n_s_v;
static PyObject *__pyx_n_s_value;
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_windowed_value;
static PyObject *__pyx_n_s_windows;
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_10FakeCython_cast(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_type, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet___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); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_2receive(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_4update_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_6update_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_8__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_10__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_12__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_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_2start(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_4process(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_6finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_8output(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_10add_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_12progress_metrics(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_14__str__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_16str_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_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_24scoped_metrics_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_24scoped_metrics_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_24scoped_metrics_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_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_18__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_20__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 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 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); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda(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_5start(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_7process(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_9finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_11progress_metrics(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_13__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_15__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_18DoFnRunnerReceiver___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_dofn_runner); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_18DoFnRunnerReceiver_2receive(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_windowed_value); /* 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_2process(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_4finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16CombineOperation_6__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_8__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_create_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 PyObject *__pyx_lambda_funcdef_lambda1(PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_e); /* 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); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_2process(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_4finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_6output_key(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_wkey, PyObject *__pyx_v_value); /* 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_8__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_10__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_2create_operation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name_context, PyObject *__pyx_v_spec, PyObject *__pyx_v_counter_factory, 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_4__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_6__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_8__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_10__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_12__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_14__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_16__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_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_DoOperation(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___read_side_inputs(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__(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_10000;
static PyObject *__pyx_int_51476729;
static PyObject *__pyx_int_57607885;
static PyObject *__pyx_int_232204871;
static PyObject *__pyx_int_240379319;
static PyObject *__pyx_int_242550914;
static PyObject *__pyx_codeobj_;
static PyObject *__pyx_slice__43;
static PyObject *__pyx_slice__56;
static PyObject *__pyx_slice__70;
static PyObject *__pyx_tuple__23;
static PyObject *__pyx_tuple__27;
static PyObject *__pyx_tuple__33;
static PyObject *__pyx_tuple__35;
static PyObject *__pyx_tuple__37;
static PyObject *__pyx_tuple__45;
static PyObject *__pyx_tuple__52;
static PyObject *__pyx_tuple__54;
static PyObject *__pyx_tuple__58;
static PyObject *__pyx_tuple__64;
static PyObject *__pyx_tuple__79;
static PyObject *__pyx_tuple__80;
static PyObject *__pyx_tuple__81;
static PyObject *__pyx_tuple__82;
static PyObject *__pyx_tuple__83;
static PyObject *__pyx_tuple__84;
static PyObject *__pyx_tuple__85;
static PyObject *__pyx_tuple__86;
static PyObject *__pyx_tuple__87;
static PyObject *__pyx_tuple__88;
static PyObject *__pyx_tuple__89;
static PyObject *__pyx_tuple__90;
static PyObject *__pyx_tuple__91;
static PyObject *__pyx_tuple__92;
static PyObject *__pyx_tuple__93;
static PyObject *__pyx_tuple__94;
static PyObject *__pyx_tuple__95;
static PyObject *__pyx_tuple__96;
static PyObject *__pyx_tuple__97;
static PyObject *__pyx_tuple__98;
static PyObject *__pyx_tuple__99;
static PyObject *__pyx_codeobj__2;
static PyObject *__pyx_codeobj__3;
static PyObject *__pyx_codeobj__4;
static PyObject *__pyx_codeobj__7;
static PyObject *__pyx_codeobj__8;
static PyObject *__pyx_codeobj__9;
static PyObject *__pyx_tuple__100;
static PyObject *__pyx_tuple__101;
static PyObject *__pyx_tuple__102;
static PyObject *__pyx_tuple__103;
static PyObject *__pyx_tuple__104;
static PyObject *__pyx_tuple__105;
static PyObject *__pyx_tuple__106;
static PyObject *__pyx_tuple__107;
static PyObject *__pyx_tuple__108;
static PyObject *__pyx_tuple__109;
static PyObject *__pyx_tuple__110;
static PyObject *__pyx_tuple__111;
static PyObject *__pyx_tuple__112;
static PyObject *__pyx_tuple__113;
static PyObject *__pyx_tuple__114;
static PyObject *__pyx_tuple__115;
static PyObject *__pyx_tuple__116;
static PyObject *__pyx_tuple__117;
static PyObject *__pyx_tuple__118;
static PyObject *__pyx_tuple__119;
static PyObject *__pyx_tuple__120;
static PyObject *__pyx_tuple__121;
static PyObject *__pyx_tuple__122;
static PyObject *__pyx_tuple__123;
static PyObject *__pyx_tuple__124;
static PyObject *__pyx_tuple__125;
static PyObject *__pyx_tuple__126;
static PyObject *__pyx_tuple__127;
static PyObject *__pyx_tuple__128;
static PyObject *__pyx_tuple__129;
static PyObject *__pyx_tuple__130;
static PyObject *__pyx_tuple__131;
static PyObject *__pyx_tuple__132;
static PyObject *__pyx_tuple__133;
static PyObject *__pyx_tuple__134;
static PyObject *__pyx_tuple__135;
static PyObject *__pyx_tuple__136;
static PyObject *__pyx_tuple__137;
static PyObject *__pyx_tuple__138;
static PyObject *__pyx_codeobj__10;
static PyObject *__pyx_codeobj__11;
static PyObject *__pyx_codeobj__12;
static PyObject *__pyx_codeobj__13;
static PyObject *__pyx_codeobj__14;
static PyObject *__pyx_codeobj__15;
static PyObject *__pyx_codeobj__20;
static PyObject *__pyx_codeobj__21;
static PyObject *__pyx_codeobj__22;
static PyObject *__pyx_codeobj__24;
static PyObject *__pyx_codeobj__25;
static PyObject *__pyx_codeobj__26;
static PyObject *__pyx_codeobj__28;
static PyObject *__pyx_codeobj__29;
static PyObject *__pyx_codeobj__30;
static PyObject *__pyx_codeobj__31;
static PyObject *__pyx_codeobj__34;
static PyObject *__pyx_codeobj__36;
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__44;
static PyObject *__pyx_codeobj__46;
static PyObject *__pyx_codeobj__47;
static PyObject *__pyx_codeobj__48;
static PyObject *__pyx_codeobj__49;
static PyObject *__pyx_codeobj__50;
static PyObject *__pyx_codeobj__51;
static PyObject *__pyx_codeobj__53;
static PyObject *__pyx_codeobj__55;
static PyObject *__pyx_codeobj__57;
static PyObject *__pyx_codeobj__59;
static PyObject *__pyx_codeobj__60;
static PyObject *__pyx_codeobj__61;
static PyObject *__pyx_codeobj__62;
static PyObject *__pyx_codeobj__63;
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__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;
/* Late includes */

/* "apache_beam/runners/worker/operations.py":57
 *   class FakeCython(object):
 *     @staticmethod
 *     def cast(type, value):             # <<<<<<<<<<<<<<
 *       return value
 *   globals()['cython'] = FakeCython()
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_10FakeCython_1cast(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_10FakeCython_1cast = {"cast", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_10FakeCython_1cast, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_10FakeCython_1cast(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_type = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cast (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_type,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_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_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cast", 1, 2, 2, 1); __PYX_ERR(0, 57, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cast") < 0)) __PYX_ERR(0, 57, __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_type = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cast", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 57, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.FakeCython.cast", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_10FakeCython_cast(__pyx_self, __pyx_v_type, __pyx_v_value);

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_10FakeCython_cast(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_type, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj_)
  __Pyx_RefNannySetupContext("cast", 0);
  __Pyx_TraceCall("cast", __pyx_f[0], 57, 0, __PYX_ERR(0, 57, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":58
 *     @staticmethod
 *     def cast(type, value):
 *       return value             # <<<<<<<<<<<<<<
 *   globals()['cython'] = FakeCython()
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_value);
  __pyx_r = __pyx_v_value;
  goto __pyx_L0;

  /* "apache_beam/runners/worker/operations.py":57
 *   class FakeCython(object):
 *     @staticmethod
 *     def cast(type, value):             # <<<<<<<<<<<<<<
 *       return value
 *   globals()['cython'] = FakeCython()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.FakeCython.cast", __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":75
 *   """
 * 
 *   def __init__(             # <<<<<<<<<<<<<<
 *       self, counter_factory, step_name, output_index, consumers, coder):
 *     self.consumers = consumers
 */

/* Python wrapper */
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_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_consumers = 0;
  PyObject *__pyx_v_coder = 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,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_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, 5, 5, 1); __PYX_ERR(0, 75, __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, 5, 5, 2); __PYX_ERR(0, 75, __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, 5, 5, 3); __PYX_ERR(0, 75, __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, 5, 5, 4); __PYX_ERR(0, 75, __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, 75, __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_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];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 75, __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___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);

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

static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet___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) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 75, 0, __PYX_ERR(0, 75, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":77
 *   def __init__(
 *       self, counter_factory, step_name, output_index, consumers, coder):
 *     self.consumers = consumers             # <<<<<<<<<<<<<<
 *     self.opcounter = opcounters.OperationCounters(
 *         counter_factory, step_name, coder, output_index)
 */
  if (!(likely(PyList_CheckExact(__pyx_v_consumers))||((__pyx_v_consumers) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_consumers)->tp_name), 0))) __PYX_ERR(0, 77, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_consumers;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->consumers);
  __Pyx_DECREF(__pyx_v_self->consumers);
  __pyx_v_self->consumers = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":78
 *       self, counter_factory, step_name, output_index, consumers, coder):
 *     self.consumers = consumers
 *     self.opcounter = opcounters.OperationCounters(             # <<<<<<<<<<<<<<
 *         counter_factory, step_name, coder, output_index)
 *     # Used in repr.
 */
  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 78, __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);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->opcounter);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->opcounter));
  __pyx_v_self->opcounter = ((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":81
 *         counter_factory, step_name, coder, output_index)
 *     # 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":82
 *     # Used in repr.
 *     self.step_name = step_name
 *     self.output_index = output_index             # <<<<<<<<<<<<<<
 *     self.coder = coder
 * 
 */
  __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":83
 *     self.step_name = step_name
 *     self.output_index = output_index
 *     self.coder = coder             # <<<<<<<<<<<<<<
 * 
 *   def receive(self, windowed_value):
 */
  __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":75
 *   """
 * 
 *   def __init__(             # <<<<<<<<<<<<<<
 *       self, counter_factory, step_name, output_index, consumers, coder):
 *     self.consumers = consumers
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("apache_beam.runners.worker.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":85
 *     self.coder = coder
 * 
 *   def receive(self, windowed_value):             # <<<<<<<<<<<<<<
 *     self.update_counters_start(windowed_value)
 *     for consumer in self.consumers:
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_3receive(PyObject *__pyx_v_self, PyObject *__pyx_v_windowed_value); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_11ConsumerSet_receive(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_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;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  __Pyx_TraceFrameInit(__pyx_codeobj__2)
  __Pyx_RefNannySetupContext("receive", 0);
  __Pyx_TraceCall("receive", __pyx_f[0], 85, 0, __PYX_ERR(0, 85, __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_receive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 85, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_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);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_windowed_value)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_windowed_value)};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __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[2] = {__pyx_t_4, ((PyObject *)__pyx_v_windowed_value)};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 85, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_INCREF(((PyObject *)__pyx_v_windowed_value));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_windowed_value));
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_windowed_value));
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/runners/worker/operations.py":86
 * 
 *   def receive(self, windowed_value):
 *     self.update_counters_start(windowed_value)             # <<<<<<<<<<<<<<
 *     for consumer in self.consumers:
 *       cython.cast(Operation, consumer).process(windowed_value)
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self->__pyx_base.__pyx_vtab)->update_counters_start(__pyx_v_self, __pyx_v_windowed_value, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 86, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":87
 *   def receive(self, windowed_value):
 *     self.update_counters_start(windowed_value)
 *     for consumer in self.consumers:             # <<<<<<<<<<<<<<
 *       cython.cast(Operation, consumer).process(windowed_value)
 *     self.update_counters_finish()
 */
  if (unlikely(__pyx_v_self->consumers == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 87, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_v_self->consumers; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0;
  for (;;) {
    if (__pyx_t_6 >= 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_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 87, __pyx_L1_error)
    #else
    __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __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":88
 *     self.update_counters_start(windowed_value)
 *     for consumer in self.consumers:
 *       cython.cast(Operation, consumer).process(windowed_value)             # <<<<<<<<<<<<<<
 *     self.update_counters_finish()
 * 
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation *)((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_consumer)->__pyx_vtab)->process(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_consumer), __pyx_v_windowed_value, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/runners/worker/operations.py":87
 *   def receive(self, windowed_value):
 *     self.update_counters_start(windowed_value)
 *     for consumer in self.consumers:             # <<<<<<<<<<<<<<
 *       cython.cast(Operation, consumer).process(windowed_value)
 *     self.update_counters_finish()
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":89
 *     for consumer in self.consumers:
 *       cython.cast(Operation, consumer).process(windowed_value)
 *     self.update_counters_finish()             # <<<<<<<<<<<<<<
 * 
 *   def update_counters_start(self, windowed_value):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self->__pyx_base.__pyx_vtab)->update_counters_finish(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":85
 *     self.coder = coder
 * 
 *   def receive(self, windowed_value):             # <<<<<<<<<<<<<<
 *     self.update_counters_start(windowed_value)
 *     for consumer in self.consumers:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.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_11ConsumerSet_3receive(PyObject *__pyx_v_self, PyObject *__pyx_v_windowed_value); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_3receive = {"receive", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_3receive, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_3receive(PyObject *__pyx_v_self, PyObject *__pyx_v_windowed_value) {
  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, 85, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_2receive(((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_2receive(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;
  __Pyx_TraceFrameInit(__pyx_codeobj__2)
  __Pyx_RefNannySetupContext("receive", 0);
  __Pyx_TraceCall("receive (wrapper)", __pyx_f[0], 85, 0, __PYX_ERR(0, 85, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_11ConsumerSet_receive(__pyx_v_self, __pyx_v_windowed_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.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":91
 *     self.update_counters_finish()
 * 
 *   def update_counters_start(self, windowed_value):             # <<<<<<<<<<<<<<
 *     self.opcounter.update_from(windowed_value)
 * 
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5update_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;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__3)
  __Pyx_RefNannySetupContext("update_counters_start", 0);
  __Pyx_TraceCall("update_counters_start", __pyx_f[0], 91, 0, __PYX_ERR(0, 91, __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_update_counters_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5update_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);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_windowed_value)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_windowed_value)};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __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[2] = {__pyx_t_4, ((PyObject *)__pyx_v_windowed_value)};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 91, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_INCREF(((PyObject *)__pyx_v_windowed_value));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_windowed_value));
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_windowed_value));
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/runners/worker/operations.py":92
 * 
 *   def update_counters_start(self, windowed_value):
 *     self.opcounter.update_from(windowed_value)             # <<<<<<<<<<<<<<
 * 
 *   def update_counters_finish(self):
 */
  __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, 92, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":91
 *     self.update_counters_finish()
 * 
 *   def update_counters_start(self, windowed_value):             # <<<<<<<<<<<<<<
 *     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_XDECREF(__pyx_t_5);
  __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_5update_counters_start(PyObject *__pyx_v_self, PyObject *__pyx_v_windowed_value); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5update_counters_start = {"update_counters_start", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5update_counters_start, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5update_counters_start(PyObject *__pyx_v_self, PyObject *__pyx_v_windowed_value) {
  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, 91, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_4update_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_4update_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;
  __Pyx_TraceFrameInit(__pyx_codeobj__3)
  __Pyx_RefNannySetupContext("update_counters_start", 0);
  __Pyx_TraceCall("update_counters_start (wrapper)", __pyx_f[0], 91, 0, __PYX_ERR(0, 91, __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, 91, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.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":94
 *     self.opcounter.update_from(windowed_value)
 * 
 *   def update_counters_finish(self):             # <<<<<<<<<<<<<<
 *     self.opcounter.update_collect()
 * 
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_7update_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;
  __Pyx_TraceFrameInit(__pyx_codeobj__4)
  __Pyx_RefNannySetupContext("update_counters_finish", 0);
  __Pyx_TraceCall("update_counters_finish", __pyx_f[0], 94, 0, __PYX_ERR(0, 94, __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_update_counters_finish); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_7update_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);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __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;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/runners/worker/operations.py":95
 * 
 *   def update_counters_finish(self):
 *     self.opcounter.update_collect()             # <<<<<<<<<<<<<<
 * 
 *   def __repr__(self):
 */
  __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, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":94
 *     self.opcounter.update_from(windowed_value)
 * 
 *   def update_counters_finish(self):             # <<<<<<<<<<<<<<
 *     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_7update_counters_finish(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_7update_counters_finish = {"update_counters_finish", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_7update_counters_finish, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_7update_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_6update_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_6update_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;
  __Pyx_TraceFrameInit(__pyx_codeobj__4)
  __Pyx_RefNannySetupContext("update_counters_finish", 0);
  __Pyx_TraceCall("update_counters_finish (wrapper)", __pyx_f[0], 94, 0, __PYX_ERR(0, 94, __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, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":97
 *     self.opcounter.update_collect()
 * 
 *   def __repr__(self):             # <<<<<<<<<<<<<<
 *     return '%s[%s.out%s, coder=%s, len(consumers)=%s]' % (
 *         self.__class__.__name__, self.step_name, self.output_index, self.coder,
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9__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_8__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_8__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;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 97, 0, __PYX_ERR(0, 97, __pyx_L1_error));

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

  /* "apache_beam/runners/worker/operations.py":99
 *   def __repr__(self):
 *     return '%s[%s.out%s, coder=%s, len(consumers)=%s]' % (
 *         self.__class__.__name__, self.step_name, self.output_index, self.coder,             # <<<<<<<<<<<<<<
 *         len(self.consumers))
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 99, __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, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 99, __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__5);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u__5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_self->step_name), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 99, __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);
  __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_self->output_index), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 99, __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);
  __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_self->coder), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 99, __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":100
 *     return '%s[%s.out%s, coder=%s, len(consumers)=%s]' % (
 *         self.__class__.__name__, self.step_name, 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, 100, __pyx_L1_error)
  }
  __pyx_t_6 = PyList_GET_SIZE(__pyx_t_4); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 100, __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, 100, __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__6);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__6);
  PyTuple_SET_ITEM(__pyx_t_1, 9, __pyx_kp_u__6);

  /* "apache_beam/runners/worker/operations.py":98
 * 
 *   def __repr__(self):
 *     return '%s[%s.out%s, coder=%s, len(consumers)=%s]' % (             # <<<<<<<<<<<<<<
 *         self.__class__.__name__, self.step_name, self.output_index, self.coder,
 *         len(self.consumers))
 */
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 10, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 98, __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":97
 *     self.opcounter.update_collect()
 * 
 *   def __repr__(self):             # <<<<<<<<<<<<<<
 *     return '%s[%s.out%s, coder=%s, len(consumers)=%s]' % (
 *         self.__class__.__name__, self.step_name, self.output_index, self.coder,
 */

  /* 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":32
 * 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
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 32, 0, __PYX_ERR(1, 32, __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":33
 *   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
  __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(__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
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 33, 0, __PYX_ERR(1, 33, __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
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[1], 33, 0, __PYX_ERR(1, 33, __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":34
 *   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_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
  __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->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
  __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->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
  __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->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":35
 *   cdef public step_name
 *   cdef public output_index
 *   cdef public coder             # <<<<<<<<<<<<<<
 * 
 *   cpdef receive(self, WindowedValue windowed_value)
 */

/* 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
  __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->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
  __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->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
  __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->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;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self.coder, self.consumers, self.opcounter, self.output_index, self.step_name)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_11__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_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_11ConsumerSet_10__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_10__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self) {
  int __pyx_v_use_setstate;
  PyObject *__pyx_v_state = NULL;
  PyObject *__pyx_v__dict = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__7)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error));

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

  /* "(tree fragment)":4
 *     cdef bint use_setstate
 *     state = (self.coder, self.consumers, self.opcounter, self.output_index, 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, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":5
 *     state = (self.coder, self.consumers, self.opcounter, self.output_index, 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)":6
 *     _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, 6, __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, 6, __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)":7
 *     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.opcounter is not None or self.output_index is not None or self.step_name is not None
 */
    __pyx_v_use_setstate = 1;

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

  /* "(tree fragment)":9
 *         use_setstate = True
 *     else:
 *         use_setstate = self.coder is not None or self.consumers is not None or self.opcounter is not None or self.output_index is not None or self.step_name is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_ConsumerSet, (type(self), 0xe53e5b7, 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 = (((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->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)":10
 *     else:
 *         use_setstate = self.coder is not None or self.consumers is not None or self.opcounter is not None or self.output_index is not None or self.step_name is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_ConsumerSet, (type(self), 0xe53e5b7, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":11
 *         use_setstate = self.coder is not None or self.consumers is not None or self.opcounter is not None or self.output_index is not None or self.step_name is not None
 *     if use_setstate:
 *         return __pyx_unpickle_ConsumerSet, (type(self), 0xe53e5b7, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_ConsumerSet, (type(self), 0xe53e5b7, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_ConsumerSet); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 11, __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_240379319);
    __Pyx_GIVEREF(__pyx_int_240379319);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_240379319);
    __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, 11, __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)":10
 *     else:
 *         use_setstate = self.coder is not None or self.consumers is not None or self.opcounter is not None or self.output_index is not None or self.step_name is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_ConsumerSet, (type(self), 0xe53e5b7, None), state
 *     else:
 */
  }

  /* "(tree fragment)":13
 *         return __pyx_unpickle_ConsumerSet, (type(self), 0xe53e5b7, None), state
 *     else:
 *         return __pyx_unpickle_ConsumerSet, (type(self), 0xe53e5b7, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_ConsumerSet__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_ConsumerSet); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __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_240379319);
    __Pyx_GIVEREF(__pyx_int_240379319);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_240379319);
    __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, 13, __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 bint use_setstate
 *     state = (self.coder, self.consumers, self.opcounter, self.output_index, self.step_name)
 */

  /* 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)":14
 *     else:
 *         return __pyx_unpickle_ConsumerSet, (type(self), 0xe53e5b7, 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_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_13__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_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_11ConsumerSet_12__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_12__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;
  __Pyx_TraceFrameInit(__pyx_codeobj__8)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[2], 14, 0, __PYX_ERR(2, 14, __pyx_L1_error));

  /* "(tree fragment)":15
 *         return __pyx_unpickle_ConsumerSet, (type(self), 0xe53e5b7, 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)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 15, __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, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_ConsumerSet, (type(self), 0xe53e5b7, 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":110
 *   """
 * 
 *   def __init__(self, name_context, spec, counter_factory, state_sampler):             # <<<<<<<<<<<<<<
 *     """Initializes a worker operation instance.
 * 
 */

/* 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 or string(deprecated), with the\n        name information for this 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_COMPILING_IN_CPYTHON
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_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, 110, __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, 110, __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, 110, __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, 110, __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, 110, __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;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 110, 0, __PYX_ERR(0, 110, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":120
 *       state_sampler: The StateSampler for the current operation.
 *     """
 *     if isinstance(name_context, common.NameContext):             # <<<<<<<<<<<<<<
 *       # TODO(BEAM-4028): Clean this up once it's completely migrated.
 *       # We use the specific operation name that is used for metrics and state
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_common); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 120, __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, 120, __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, 120, __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":124
 *       # We use the specific operation name that is used for metrics and state
 *       # sampling.
 *       self.name_context = name_context             # <<<<<<<<<<<<<<
 *     else:
 *       self.name_context = common.NameContext(name_context)
 */
    __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":120
 *       state_sampler: The StateSampler for the current operation.
 *     """
 *     if isinstance(name_context, common.NameContext):             # <<<<<<<<<<<<<<
 *       # TODO(BEAM-4028): Clean this up once it's completely migrated.
 *       # We use the specific operation name that is used for metrics and state
 */
    goto __pyx_L3;
  }

  /* "apache_beam/runners/worker/operations.py":126
 *       self.name_context = name_context
 *     else:
 *       self.name_context = common.NameContext(name_context)             # <<<<<<<<<<<<<<
 * 
 *     self.spec = spec
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_common); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_NameContext); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 126, __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);
      }
    }
    if (!__pyx_t_1) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_name_context); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_name_context};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __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[2] = {__pyx_t_1, __pyx_v_name_context};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 126, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 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_6, 0+1, __pyx_v_name_context);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_self->name_context);
    __Pyx_DECREF(__pyx_v_self->name_context);
    __pyx_v_self->name_context = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_L3:;

  /* "apache_beam/runners/worker/operations.py":128
 *       self.name_context = common.NameContext(name_context)
 * 
 *     self.spec = spec             # <<<<<<<<<<<<<<
 *     self.counter_factory = counter_factory
 *     self.consumers = collections.defaultdict(list)
 */
  __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":129
 * 
 *     self.spec = spec
 *     self.counter_factory = counter_factory             # <<<<<<<<<<<<<<
 *     self.consumers = collections.defaultdict(list)
 * 
 */
  __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":130
 *     self.spec = spec
 *     self.counter_factory = counter_factory
 *     self.consumers = collections.defaultdict(list)             # <<<<<<<<<<<<<<
 * 
 *     # These are overwritten in the legacy harness.
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_collections); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_defaultdict); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)(&PyList_Type))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, ((PyObject *)(&PyList_Type))};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __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_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, ((PyObject *)(&PyList_Type))};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_INCREF(((PyObject *)(&PyList_Type)));
      __Pyx_GIVEREF(((PyObject *)(&PyList_Type)));
      PyTuple_SET_ITEM(__pyx_t_1, 0+1, ((PyObject *)(&PyList_Type)));
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L1_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_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":133
 * 
 *     # These are overwritten in the legacy harness.
 *     self.metrics_container = MetricsContainer(self.name_context.metrics_name())             # <<<<<<<<<<<<<<
 *     # TODO(BEAM-4094): Remove ScopedMetricsContainer after Dataflow no longer
 *     # depends on it.
 */
  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_MetricsContainer); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->name_context, __pyx_n_s_metrics_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(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);
    }
  }
  if (__pyx_t_7) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __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_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_1};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_1};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 133, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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":136
 *     # TODO(BEAM-4094): Remove ScopedMetricsContainer after Dataflow no longer
 *     # depends on it.
 *     self.scoped_metrics_container = ScopedMetricsContainer()             # <<<<<<<<<<<<<<
 * 
 *     self.state_sampler = state_sampler
 */
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_11apache_beam_7metrics_9execution_ScopedMetricsContainer)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->scoped_metrics_container);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->scoped_metrics_container));
  __pyx_v_self->scoped_metrics_container = ((struct __pyx_obj_11apache_beam_7metrics_9execution_ScopedMetricsContainer *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":138
 *     self.scoped_metrics_container = ScopedMetricsContainer()
 * 
 *     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":139
 * 
 *     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, 139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

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

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

  /* "apache_beam/runners/worker/operations.py":141
 *     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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->state_sampler, __pyx_n_s_scoped_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "apache_beam/runners/worker/operations.py":142
 *         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_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_v_self->name_context);
  __Pyx_GIVEREF(__pyx_v_self->name_context);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_self->name_context);
  __Pyx_INCREF(__pyx_n_u_process);
  __Pyx_GIVEREF(__pyx_n_u_process);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_n_u_process);
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_metrics_container, __pyx_v_self->metrics_container) < 0) __PYX_ERR(0, 142, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":141
 *     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_1, __pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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":143
 *     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, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

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

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

  /* "apache_beam/runners/worker/operations.py":147
 *     # TODO(ccy): the '-abort' state can be added when the abort is supported in
 *     # Operations.
 *     self.receivers = []             # <<<<<<<<<<<<<<
 * 
 *   def start(self):
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__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;

  /* "apache_beam/runners/worker/operations.py":110
 *   """
 * 
 *   def __init__(self, name_context, spec, counter_factory, state_sampler):             # <<<<<<<<<<<<<<
 *     """Initializes a worker operation instance.
 * 
 */

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

/* "apache_beam/runners/worker/operations.py":149
 *     self.receivers = []
 * 
 *   def start(self):             # <<<<<<<<<<<<<<
 *     """Start operation."""
 *     self.debug_logging_enabled = logging.getLogger().isEnabledFor(logging.DEBUG)
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_3start(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_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;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__9)
  __Pyx_RefNannySetupContext("start", 0);
  __Pyx_TraceCall("start", __pyx_f[0], 149, 0, __PYX_ERR(0, 149, __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_3start)) {
      __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);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 149, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 149, __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;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/runners/worker/operations.py":151
 *   def start(self):
 *     """Start operation."""
 *     self.debug_logging_enabled = logging.getLogger().isEnabledFor(logging.DEBUG)             # <<<<<<<<<<<<<<
 *     # Everything except WorkerSideInputSource, which is not a
 *     # top-level operation, should have output_coders
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_logging); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 151, __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 && 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);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 151, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 151, __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_isEnabledFor); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_logging); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 151, __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, 151, __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_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);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 151, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 151, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 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_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 151, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 151, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 151, __pyx_L1_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_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 151, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->debug_logging_enabled = __pyx_t_6;

  /* "apache_beam/runners/worker/operations.py":155
 *     # top-level operation, should have output_coders
 *     #TODO(pabloem): Define better what step name is used here.
 *     if getattr(self.spec, 'output_coders', None):             # <<<<<<<<<<<<<<
 *       self.receivers = [ConsumerSet(self.counter_factory,
 *                                     self.name_context.logging_name(),
 */
  __pyx_t_1 = __pyx_v_self->spec;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_GetAttr3(__pyx_t_1, __pyx_n_u_output_coders, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 155, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_6) {

    /* "apache_beam/runners/worker/operations.py":156
 *     #TODO(pabloem): Define better what step name is used here.
 *     if getattr(self.spec, 'output_coders', None):
 *       self.receivers = [ConsumerSet(self.counter_factory,             # <<<<<<<<<<<<<<
 *                                     self.name_context.logging_name(),
 *                                     i,
 */
    { /* enter inner scope */
      __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 156, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_int_0);
      __pyx_t_1 = __pyx_int_0;

      /* "apache_beam/runners/worker/operations.py":160
 *                                     i,
 *                                     self.consumers[i], coder)
 *                         for i, coder in enumerate(self.spec.output_coders)]             # <<<<<<<<<<<<<<
 * 
 *   def process(self, o):
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->spec, __pyx_n_s_output_coders); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 160, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
        __pyx_t_3 = __pyx_t_5; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0;
        __pyx_t_8 = NULL;
      } else {
        __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 160, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 160, __pyx_L6_error)
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      for (;;) {
        if (likely(!__pyx_t_8)) {
          if (likely(PyList_CheckExact(__pyx_t_3))) {
            if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 160, __pyx_L6_error)
            #else
            __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 160, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_5);
            #endif
          } else {
            if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 160, __pyx_L6_error)
            #else
            __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 160, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_5);
            #endif
          }
        } else {
          __pyx_t_5 = __pyx_t_8(__pyx_t_3);
          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, 160, __pyx_L6_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_5);
        }
        __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_coder, __pyx_t_5);
        __pyx_t_5 = 0;
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_i, __pyx_t_1);
        __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 160, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_1);
        __pyx_t_1 = __pyx_t_5;
        __pyx_t_5 = 0;

        /* "apache_beam/runners/worker/operations.py":157
 *     if getattr(self.spec, 'output_coders', None):
 *       self.receivers = [ConsumerSet(self.counter_factory,
 *                                     self.name_context.logging_name(),             # <<<<<<<<<<<<<<
 *                                     i,
 *                                     self.consumers[i], coder)
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->name_context, __pyx_n_s_logging_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 157, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_9 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
          }
        }
        if (__pyx_t_9) {
          __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 157, __pyx_L6_error)
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        } else {
          __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 157, __pyx_L6_error)
        }
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "apache_beam/runners/worker/operations.py":159
 *                                     self.name_context.logging_name(),
 *                                     i,
 *                                     self.consumers[i], coder)             # <<<<<<<<<<<<<<
 *                         for i, coder in enumerate(self.spec.output_coders)]
 * 
 */
        __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_self->consumers, __pyx_7genexpr__pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_2);

        /* "apache_beam/runners/worker/operations.py":156
 *     #TODO(pabloem): Define better what step name is used here.
 *     if getattr(self.spec, 'output_coders', None):
 *       self.receivers = [ConsumerSet(self.counter_factory,             # <<<<<<<<<<<<<<
 *                                     self.name_context.logging_name(),
 *                                     i,
 */
        __pyx_t_9 = PyTuple_New(5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 156, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_INCREF(__pyx_v_self->counter_factory);
        __Pyx_GIVEREF(__pyx_v_self->counter_factory);
        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_self->counter_factory);
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_5);
        __Pyx_INCREF(__pyx_7genexpr__pyx_v_i);
        __Pyx_GIVEREF(__pyx_7genexpr__pyx_v_i);
        PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_7genexpr__pyx_v_i);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_2);
        __Pyx_INCREF(__pyx_7genexpr__pyx_v_coder);
        __Pyx_GIVEREF(__pyx_7genexpr__pyx_v_coder);
        PyTuple_SET_ITEM(__pyx_t_9, 4, __pyx_7genexpr__pyx_v_coder);
        __pyx_t_5 = 0;
        __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet), __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 156, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 156, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "apache_beam/runners/worker/operations.py":160
 *                                     i,
 *                                     self.consumers[i], coder)
 *                         for i, coder in enumerate(self.spec.output_coders)]             # <<<<<<<<<<<<<<
 * 
 *   def process(self, o):
 */
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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_L9_exit_scope;
      __pyx_L6_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_L1_error;
      __pyx_L9_exit_scope:;
    } /* exit inner scope */

    /* "apache_beam/runners/worker/operations.py":156
 *     #TODO(pabloem): Define better what step name is used here.
 *     if getattr(self.spec, 'output_coders', None):
 *       self.receivers = [ConsumerSet(self.counter_factory,             # <<<<<<<<<<<<<<
 *                                     self.name_context.logging_name(),
 *                                     i,
 */
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_GOTREF(__pyx_v_self->receivers);
    __Pyx_DECREF(__pyx_v_self->receivers);
    __pyx_v_self->receivers = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "apache_beam/runners/worker/operations.py":155
 *     # top-level operation, should have output_coders
 *     #TODO(pabloem): Define better what step name is used here.
 *     if getattr(self.spec, 'output_coders', None):             # <<<<<<<<<<<<<<
 *       self.receivers = [ConsumerSet(self.counter_factory,
 *                                     self.name_context.logging_name(),
 */
  }

  /* "apache_beam/runners/worker/operations.py":149
 *     self.receivers = []
 * 
 *   def start(self):             # <<<<<<<<<<<<<<
 *     """Start operation."""
 *     self.debug_logging_enabled = logging.getLogger().isEnabledFor(logging.DEBUG)
 */

  /* function exit code */
  __pyx_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_9);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_7genexpr__pyx_v_i);
  __Pyx_XDECREF(__pyx_7genexpr__pyx_v_coder);
  __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_3start(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_2start[] = "Start operation.";
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_3start = {"start", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_3start, METH_NOARGS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_2start};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_3start(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_2start(((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_2start(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;
  __Pyx_TraceFrameInit(__pyx_codeobj__9)
  __Pyx_RefNannySetupContext("start", 0);
  __Pyx_TraceCall("start (wrapper)", __pyx_f[0], 149, 0, __PYX_ERR(0, 149, __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, 149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.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":162
 *                         for i, coder in enumerate(self.spec.output_coders)]
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     """Process element in operation."""
 *     pass
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_5process(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;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__10)
  __Pyx_RefNannySetupContext("process", 0);
  __Pyx_TraceCall("process", __pyx_f[0], 162, 0, __PYX_ERR(0, 162, __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_process); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 162, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_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);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_o)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 162, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_o)};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 162, __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[2] = {__pyx_t_4, ((PyObject *)__pyx_v_o)};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 162, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 162, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_INCREF(((PyObject *)__pyx_v_o));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_o));
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_o));
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 162, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/runners/worker/operations.py":163
 * 
 *   def process(self, o):
 *     """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_XDECREF(__pyx_t_5);
  __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":162
 *                         for i, coder in enumerate(self.spec.output_coders)]
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     """Process element in operation."""
 *     pass
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_5process(PyObject *__pyx_v_self, PyObject *__pyx_v_o); /*proto*/
static char __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_4process[] = "Process element in operation.";
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_5process = {"process", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_5process, METH_O, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_4process};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_5process(PyObject *__pyx_v_self, PyObject *__pyx_v_o) {
  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, 162, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_4process(((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_4process(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;
  __Pyx_TraceFrameInit(__pyx_codeobj__10)
  __Pyx_RefNannySetupContext("process", 0);
  __Pyx_TraceCall("process (wrapper)", __pyx_f[0], 162, 0, __PYX_ERR(0, 162, __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, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":166
 *     pass
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     """Finish operation."""
 *     pass
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_7finish(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_finish(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;
  __Pyx_TraceFrameInit(__pyx_codeobj__11)
  __Pyx_RefNannySetupContext("finish", 0);
  __Pyx_TraceCall("finish", __pyx_f[0], 166, 0, __PYX_ERR(0, 166, __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_finish); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_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);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 166, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 166, __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;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/runners/worker/operations.py":167
 * 
 *   def finish(self):
 *     """Finish 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.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;
}

/* "apache_beam/runners/worker/operations.py":166
 *     pass
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     """Finish operation."""
 *     pass
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_7finish(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_6finish[] = "Finish operation.";
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_7finish = {"finish", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_7finish, METH_NOARGS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_6finish};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_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_9Operation_6finish(((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_6finish(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;
  __Pyx_TraceFrameInit(__pyx_codeobj__11)
  __Pyx_RefNannySetupContext("finish", 0);
  __Pyx_TraceCall("finish (wrapper)", __pyx_f[0], 166, 0, __PYX_ERR(0, 166, __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, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.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":170
 *     pass
 * 
 *   def output(self, windowed_value, output_index=0):             # <<<<<<<<<<<<<<
 *     cython.cast(Receiver, self.receivers[output_index]).receive(windowed_value)
 * 
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9output(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;
  __Pyx_TraceFrameInit(__pyx_codeobj__12)
  __Pyx_RefNannySetupContext("output", 0);
  __Pyx_TraceCall("output", __pyx_f[0], 170, 0, __PYX_ERR(0, 170, __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_output); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 170, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9output)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_output_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 170, __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, 170, __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, 170, __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, 170, __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, 170, __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;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/runners/worker/operations.py":171
 * 
 *   def output(self, windowed_value, output_index=0):
 *     cython.cast(Receiver, self.receivers[output_index]).receive(windowed_value)             # <<<<<<<<<<<<<<
 * 
 *   def add_receiver(self, operation, output_index=0):
 */
  if (unlikely(__pyx_v_self->receivers == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 171, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->receivers, __pyx_v_output_index, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6common_Receiver *)((struct __pyx_obj_11apache_beam_7runners_6common_Receiver *)__pyx_t_1)->__pyx_vtab)->receive(((struct __pyx_obj_11apache_beam_7runners_6common_Receiver *)__pyx_t_1), __pyx_v_windowed_value, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __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":170
 *     pass
 * 
 *   def output(self, windowed_value, output_index=0):             # <<<<<<<<<<<<<<
 *     cython.cast(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_9output(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_9output = {"output", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9output, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9output(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;
  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, 170, __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, 170, __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, 170, __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, 170, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_8output(((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_8output(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;
  __Pyx_TraceFrameInit(__pyx_codeobj__12)
  __Pyx_RefNannySetupContext("output", 0);
  __Pyx_TraceCall("output (wrapper)", __pyx_f[0], 170, 0, __PYX_ERR(0, 170, __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, 170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":173
 *     cython.cast(Receiver, self.receivers[output_index]).receive(windowed_value)
 * 
 *   def add_receiver(self, operation, output_index=0):             # <<<<<<<<<<<<<<
 *     """Adds a receiver operation for the specified output."""
 *     self.consumers[output_index].append(operation)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_11add_receiver(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_10add_receiver[] = "Adds a receiver operation for the specified output.";
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_11add_receiver = {"add_receiver", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_11add_receiver, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_10add_receiver};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_11add_receiver(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_operation = 0;
  PyObject *__pyx_v_output_index = 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, 173, __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, 173, __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_10add_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_10add_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;
  __Pyx_TraceFrameInit(__pyx_codeobj__13)
  __Pyx_RefNannySetupContext("add_receiver", 0);
  __Pyx_TraceCall("add_receiver", __pyx_f[0], 173, 0, __PYX_ERR(0, 173, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":175
 *   def add_receiver(self, operation, output_index=0):
 *     """Adds a receiver operation for the specified output."""
 *     self.consumers[output_index].append(operation)             # <<<<<<<<<<<<<<
 * 
 *   def progress_metrics(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_self->consumers, __pyx_v_output_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __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, 175, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":173
 *     cython.cast(Receiver, self.receivers[output_index]).receive(windowed_value)
 * 
 *   def add_receiver(self, operation, output_index=0):             # <<<<<<<<<<<<<<
 *     """Adds a receiver operation for the specified output."""
 *     self.consumers[output_index].append(operation)
 */

  /* 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":177
 *     self.consumers[output_index].append(operation)
 * 
 *   def progress_metrics(self):             # <<<<<<<<<<<<<<
 *     return beam_fn_api_pb2.Metrics.PTransform(
 *         processed_elements=beam_fn_api_pb2.Metrics.PTransform.ProcessedElements(
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_13progress_metrics(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_progress_metrics(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;
  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;
  Py_ssize_t __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__14)
  __Pyx_RefNannySetupContext("progress_metrics", 0);
  __Pyx_TraceCall("progress_metrics", __pyx_f[0], 177, 0, __PYX_ERR(0, 177, __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_progress_metrics); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_13progress_metrics)) {
      __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);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 177, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 177, __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;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/runners/worker/operations.py":178
 * 
 *   def progress_metrics(self):
 *     return beam_fn_api_pb2.Metrics.PTransform(             # <<<<<<<<<<<<<<
 *         processed_elements=beam_fn_api_pb2.Metrics.PTransform.ProcessedElements(
 *             measured=beam_fn_api_pb2.Metrics.PTransform.Measured(
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_beam_fn_api_pb2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Metrics); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __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_PTransform); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":179
 *   def progress_metrics(self):
 *     return beam_fn_api_pb2.Metrics.PTransform(
 *         processed_elements=beam_fn_api_pb2.Metrics.PTransform.ProcessedElements(             # <<<<<<<<<<<<<<
 *             measured=beam_fn_api_pb2.Metrics.PTransform.Measured(
 *                 total_time_spent=(
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_beam_fn_api_pb2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Metrics); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 179, __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_PTransform); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 179, __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_ProcessedElements); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "apache_beam/runners/worker/operations.py":180
 *     return beam_fn_api_pb2.Metrics.PTransform(
 *         processed_elements=beam_fn_api_pb2.Metrics.PTransform.ProcessedElements(
 *             measured=beam_fn_api_pb2.Metrics.PTransform.Measured(             # <<<<<<<<<<<<<<
 *                 total_time_spent=(
 *                     self.scoped_start_state.sampled_seconds()
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_beam_fn_api_pb2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_Metrics); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_PTransform); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_Measured); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "apache_beam/runners/worker/operations.py":181
 *         processed_elements=beam_fn_api_pb2.Metrics.PTransform.ProcessedElements(
 *             measured=beam_fn_api_pb2.Metrics.PTransform.Measured(
 *                 total_time_spent=(             # <<<<<<<<<<<<<<
 *                     self.scoped_start_state.sampled_seconds()
 *                     + self.scoped_process_state.sampled_seconds()
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "apache_beam/runners/worker/operations.py":182
 *             measured=beam_fn_api_pb2.Metrics.PTransform.Measured(
 *                 total_time_spent=(
 *                     self.scoped_start_state.sampled_seconds()             # <<<<<<<<<<<<<<
 *                     + self.scoped_process_state.sampled_seconds()
 *                     + self.scoped_finish_state.sampled_seconds()),
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->scoped_start_state, __pyx_n_s_sampled_seconds); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 182, __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);
    }
  }
  if (__pyx_t_9) {
    __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 182, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  } else {
    __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 182, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "apache_beam/runners/worker/operations.py":183
 *                 total_time_spent=(
 *                     self.scoped_start_state.sampled_seconds()
 *                     + self.scoped_process_state.sampled_seconds()             # <<<<<<<<<<<<<<
 *                     + self.scoped_finish_state.sampled_seconds()),
 *                 # Multi-output operations should override this.
 */
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->scoped_process_state, __pyx_n_s_sampled_seconds); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 183, __pyx_L1_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);
    }
  }
  if (__pyx_t_10) {
    __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 183, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  } else {
    __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 183, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyNumber_Add(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "apache_beam/runners/worker/operations.py":184
 *                     self.scoped_start_state.sampled_seconds()
 *                     + self.scoped_process_state.sampled_seconds()
 *                     + self.scoped_finish_state.sampled_seconds()),             # <<<<<<<<<<<<<<
 *                 # Multi-output operations should override this.
 *                 output_element_counts=(
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->scoped_finish_state, __pyx_n_s_sampled_seconds); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_10 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  if (__pyx_t_10) {
    __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 184, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  } else {
    __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 184, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyNumber_Add(__pyx_t_9, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_total_time_spent, __pyx_t_7) < 0) __PYX_ERR(0, 181, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "apache_beam/runners/worker/operations.py":192
 *                     {'ONLY_OUTPUT': self.receivers[0].opcounter
 *                                     .element_counter.value()}
 *                     if len(self.receivers) == 1             # <<<<<<<<<<<<<<
 *                     else None))),
 *         user=self.metrics_container.to_runner_api())
 */
  __pyx_t_8 = __pyx_v_self->receivers;
  __Pyx_INCREF(__pyx_t_8);
  if (unlikely(__pyx_t_8 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 192, __pyx_L1_error)
  }
  __pyx_t_11 = PyList_GET_SIZE(__pyx_t_8); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 192, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (((__pyx_t_11 == 1) != 0)) {

    /* "apache_beam/runners/worker/operations.py":190
 *                     # fix its name later, which we do.
 *                     # TODO(robertwb): Plumb the actual name here.
 *                     {'ONLY_OUTPUT': self.receivers[0].opcounter             # <<<<<<<<<<<<<<
 *                                     .element_counter.value()}
 *                     if len(self.receivers) == 1
 */
    __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);

    /* "apache_beam/runners/worker/operations.py":191
 *                     # TODO(robertwb): Plumb the actual name here.
 *                     {'ONLY_OUTPUT': self.receivers[0].opcounter
 *                                     .element_counter.value()}             # <<<<<<<<<<<<<<
 *                     if len(self.receivers) == 1
 *                     else None))),
 */
    if (unlikely(__pyx_v_self->receivers == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 190, __pyx_L1_error)
    }

    /* "apache_beam/runners/worker/operations.py":190
 *                     # fix its name later, which we do.
 *                     # TODO(robertwb): Plumb the actual name here.
 *                     {'ONLY_OUTPUT': self.receivers[0].opcounter             # <<<<<<<<<<<<<<
 *                                     .element_counter.value()}
 *                     if len(self.receivers) == 1
 */
    __pyx_t_10 = __Pyx_GetItemInt_List(__pyx_v_self->receivers, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_opcounter); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "apache_beam/runners/worker/operations.py":191
 *                     # TODO(robertwb): Plumb the actual name here.
 *                     {'ONLY_OUTPUT': self.receivers[0].opcounter
 *                                     .element_counter.value()}             # <<<<<<<<<<<<<<
 *                     if len(self.receivers) == 1
 *                     else None))),
 */
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_element_counter); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_value); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_12);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_12, function);
      }
    }
    if (__pyx_t_10) {
      __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 191, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    } else {
      __pyx_t_9 = __Pyx_PyObject_CallNoArg(__pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 191, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (PyDict_SetItem(__pyx_t_8, __pyx_n_u_ONLY_OUTPUT, __pyx_t_9) < 0) __PYX_ERR(0, 190, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_7 = __pyx_t_8;
    __pyx_t_8 = 0;
  } else {

    /* "apache_beam/runners/worker/operations.py":193
 *                                     .element_counter.value()}
 *                     if len(self.receivers) == 1
 *                     else None))),             # <<<<<<<<<<<<<<
 *         user=self.metrics_container.to_runner_api())
 * 
 */
    __Pyx_INCREF(Py_None);
    __pyx_t_7 = Py_None;
  }
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_output_element_counts, __pyx_t_7) < 0) __PYX_ERR(0, 181, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "apache_beam/runners/worker/operations.py":180
 *     return beam_fn_api_pb2.Metrics.PTransform(
 *         processed_elements=beam_fn_api_pb2.Metrics.PTransform.ProcessedElements(
 *             measured=beam_fn_api_pb2.Metrics.PTransform.Measured(             # <<<<<<<<<<<<<<
 *                 total_time_spent=(
 *                     self.scoped_start_state.sampled_seconds()
 */
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_measured, __pyx_t_7) < 0) __PYX_ERR(0, 180, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "apache_beam/runners/worker/operations.py":179
 *   def progress_metrics(self):
 *     return beam_fn_api_pb2.Metrics.PTransform(
 *         processed_elements=beam_fn_api_pb2.Metrics.PTransform.ProcessedElements(             # <<<<<<<<<<<<<<
 *             measured=beam_fn_api_pb2.Metrics.PTransform.Measured(
 *                 total_time_spent=(
 */
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_processed_elements, __pyx_t_7) < 0) __PYX_ERR(0, 179, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "apache_beam/runners/worker/operations.py":194
 *                     if len(self.receivers) == 1
 *                     else None))),
 *         user=self.metrics_container.to_runner_api())             # <<<<<<<<<<<<<<
 * 
 *   def __str__(self):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->metrics_container, __pyx_n_s_to_runner_api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 194, __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);
    }
  }
  if (__pyx_t_4) {
    __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 194, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 194, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_user, __pyx_t_7) < 0) __PYX_ERR(0, 179, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "apache_beam/runners/worker/operations.py":178
 * 
 *   def progress_metrics(self):
 *     return beam_fn_api_pb2.Metrics.PTransform(             # <<<<<<<<<<<<<<
 *         processed_elements=beam_fn_api_pb2.Metrics.PTransform.ProcessedElements(
 *             measured=beam_fn_api_pb2.Metrics.PTransform.Measured(
 */
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 178, __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;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "apache_beam/runners/worker/operations.py":177
 *     self.consumers[output_index].append(operation)
 * 
 *   def progress_metrics(self):             # <<<<<<<<<<<<<<
 *     return beam_fn_api_pb2.Metrics.PTransform(
 *         processed_elements=beam_fn_api_pb2.Metrics.PTransform.ProcessedElements(
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.progress_metrics", __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_13progress_metrics(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_13progress_metrics = {"progress_metrics", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_13progress_metrics, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_13progress_metrics(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("progress_metrics (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_12progress_metrics(((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_12progress_metrics(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;
  __Pyx_TraceFrameInit(__pyx_codeobj__14)
  __Pyx_RefNannySetupContext("progress_metrics", 0);
  __Pyx_TraceCall("progress_metrics (wrapper)", __pyx_f[0], 177, 0, __PYX_ERR(0, 177, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_progress_metrics(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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.progress_metrics", __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":196
 *         user=self.metrics_container.to_runner_api())
 * 
 *   def __str__(self):             # <<<<<<<<<<<<<<
 *     """Generates a useful string for this object.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_15__str__(PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_14__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_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_11apache_beam_7runners_6worker_10operations_9Operation_14__str__;
#endif
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_15__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_14__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_14__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;
  __Pyx_RefNannySetupContext("__str__", 0);
  __Pyx_TraceCall("__str__", __pyx_f[0], 196, 0, __PYX_ERR(0, 196, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":207
 *       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, 207, __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);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __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":196
 *         user=self.metrics_container.to_runner_api())
 * 
 *   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":209
 *     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_17str_internal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_16str_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_17str_internal = {"str_internal", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17str_internal, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_16str_internal};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17str_internal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_is_recursive = 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, 209, __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, 209, __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_16str_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_16str_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_8genexpr1__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;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  Py_UCS4 __pyx_t_10;
  __Pyx_TraceFrameInit(__pyx_codeobj__15)
  __Pyx_RefNannySetupContext("str_internal", 0);
  __Pyx_TraceCall("str_internal", __pyx_f[0], 209, 0, __PYX_ERR(0, 209, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":218
 *       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, 218, __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, 218, __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":219
 *     """
 *     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, 219, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "apache_beam/runners/worker/operations.py":220
 *     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, 220, __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);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 220, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 220, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyUnicode_Format(__pyx_kp_u_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 220, __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, 220, __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":221
 *     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, 221, __pyx_L1_error)
    if (__pyx_t_4) {

      /* "apache_beam/runners/worker/operations.py":223
 *       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 = PyUnicode_Format(__pyx_kp_u_s_2, __pyx_v_printable_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 223, __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":221
 *     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":219
 *     """
 *     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":225
 *         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":226
 * 
 *     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, 226, __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":225
 *         return '<%s>' % printable_name
 * 
 *     if self.spec is None:             # <<<<<<<<<<<<<<
 *       printable_fields = []
 *     else:
 */
    goto __pyx_L5;
  }

  /* "apache_beam/runners/worker/operations.py":228
 *       printable_fields = []
 *     else:
 *       printable_fields = operation_specs.worker_printable_fields(self.spec)             # <<<<<<<<<<<<<<
 * 
 *     if not is_recursive and getattr(self, 'receivers', []):
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_operation_specs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 228, __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, 228, __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);
      }
    }
    if (!__pyx_t_1) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_self->spec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_self->spec};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __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[2] = {__pyx_t_1, __pyx_v_self->spec};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 228, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __pyx_t_1 = NULL;
        __Pyx_INCREF(__pyx_v_self->spec);
        __Pyx_GIVEREF(__pyx_v_self->spec);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_self->spec);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __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":230
 *       printable_fields = operation_specs.worker_printable_fields(self.spec)
 * 
 *     if not is_recursive and getattr(self, 'receivers', []):             # <<<<<<<<<<<<<<
 *       printable_fields.append('receivers=[%s]' % ', '.join([
 *           str(receiver) for receiver in self.receivers]))
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_is_recursive); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 230, __pyx_L1_error)
  __pyx_t_7 = ((!__pyx_t_4) != 0);
  if (__pyx_t_7) {
  } else {
    __pyx_t_3 = __pyx_t_7;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 230, __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, 230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 230, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = __pyx_t_7;
  __pyx_L7_bool_binop_done:;
  if (__pyx_t_3) {

    /* "apache_beam/runners/worker/operations.py":231
 * 
 *     if not is_recursive and getattr(self, 'receivers', []):
 *       printable_fields.append('receivers=[%s]' % ', '.join([             # <<<<<<<<<<<<<<
 *           str(receiver) for receiver in self.receivers]))
 * 
 */
    { /* enter inner scope */
      __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 231, __pyx_L11_error)
      __Pyx_GOTREF(__pyx_t_5);

      /* "apache_beam/runners/worker/operations.py":232
 *     if not is_recursive and getattr(self, 'receivers', []):
 *       printable_fields.append('receivers=[%s]' % ', '.join([
 *           str(receiver) for receiver in self.receivers]))             # <<<<<<<<<<<<<<
 * 
 *     return '<%s %s>' % (printable_name, ', '.join(printable_fields))
 */
      if (unlikely(__pyx_v_self->receivers == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
        __PYX_ERR(0, 232, __pyx_L11_error)
      }
      __pyx_t_2 = __pyx_v_self->receivers; __Pyx_INCREF(__pyx_t_2); __pyx_t_8 = 0;
      for (;;) {
        if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 232, __pyx_L11_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 232, __pyx_L11_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
        __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_receiver, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_8genexpr1__pyx_v_receiver); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 232, __pyx_L11_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 231, __pyx_L11_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_receiver); __pyx_8genexpr1__pyx_v_receiver = 0;
      goto __pyx_L14_exit_scope;
      __pyx_L11_error:;
      __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_receiver); __pyx_8genexpr1__pyx_v_receiver = 0;
      goto __pyx_L1_error;
      __pyx_L14_exit_scope:;
    } /* exit inner scope */

    /* "apache_beam/runners/worker/operations.py":231
 * 
 *     if not is_recursive and getattr(self, 'receivers', []):
 *       printable_fields.append('receivers=[%s]' % ', '.join([             # <<<<<<<<<<<<<<
 *           str(receiver) for receiver in self.receivers]))
 * 
 */
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__16, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_receivers_s, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_9 = __Pyx_PyObject_Append(__pyx_v_printable_fields, __pyx_t_5); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 231, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "apache_beam/runners/worker/operations.py":230
 *       printable_fields = operation_specs.worker_printable_fields(self.spec)
 * 
 *     if not is_recursive and getattr(self, 'receivers', []):             # <<<<<<<<<<<<<<
 *       printable_fields.append('receivers=[%s]' % ', '.join([
 *           str(receiver) for receiver in self.receivers]))
 */
  }

  /* "apache_beam/runners/worker/operations.py":234
 *           str(receiver) for receiver in self.receivers]))
 * 
 *     return '<%s %s>' % (printable_name, ', '.join(printable_fields))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = PyTuple_New(5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = 0;
  __pyx_t_10 = 127;
  __Pyx_INCREF(__pyx_kp_u__17);
  __pyx_t_8 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__17);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u__17);
  __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_printable_name), __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_10;
  __pyx_t_8 += __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__18);
  __pyx_t_8 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__18);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u__18);
  __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__16, __pyx_v_printable_fields); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_10;
  __pyx_t_8 += __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__19);
  __pyx_t_8 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__19);
  PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_kp_u__19);
  __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_5, 5, __pyx_t_8, __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __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":209
 *     return self.str_internal()
 * 
 *   def str_internal(self, is_recursive=False):             # <<<<<<<<<<<<<<
 *     """Internal helper for __str__ that supports recursion.
 * 
 */

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

/* "apache_beam/runners/worker/operations.pxd":43
 * 
 * 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
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 43, 0, __PYX_ERR(1, 43, __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":44
 * 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
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 44, 0, __PYX_ERR(1, 44, __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":45
 *   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
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 45, 0, __PYX_ERR(1, 45, __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":47
 *   cdef readonly spec
 *   cdef object consumers
 *   cdef readonly counter_factory             # <<<<<<<<<<<<<<
 *   cdef public metrics_container
 *   cdef public ScopedMetricsContainer scoped_metrics_container
 */

/* 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
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 47, 0, __PYX_ERR(1, 47, __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":48
 *   cdef object consumers
 *   cdef readonly counter_factory
 *   cdef public metrics_container             # <<<<<<<<<<<<<<
 *   cdef public ScopedMetricsContainer scoped_metrics_container
 *   # 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
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 48, 0, __PYX_ERR(1, 48, __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
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 48, 0, __PYX_ERR(1, 48, __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
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[1], 48, 0, __PYX_ERR(1, 48, __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":49
 *   cdef readonly counter_factory
 *   cdef public metrics_container
 *   cdef public ScopedMetricsContainer scoped_metrics_container             # <<<<<<<<<<<<<<
 *   # Public for access by Fn harness operations.
 *   # TODO(robertwb): Cythonize FnHarness.
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_24scoped_metrics_container_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_24scoped_metrics_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_24scoped_metrics_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_24scoped_metrics_container___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 49, 0, __PYX_ERR(1, 49, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->scoped_metrics_container));
  __pyx_r = ((PyObject *)__pyx_v_self->scoped_metrics_container);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.scoped_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_24scoped_metrics_container_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_24scoped_metrics_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_24scoped_metrics_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_24scoped_metrics_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
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 49, 0, __PYX_ERR(1, 49, __pyx_L1_error));
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_11apache_beam_7metrics_9execution_ScopedMetricsContainer))))) __PYX_ERR(1, 49, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->scoped_metrics_container);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->scoped_metrics_container));
  __pyx_v_self->scoped_metrics_container = ((struct __pyx_obj_11apache_beam_7metrics_9execution_ScopedMetricsContainer *)__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.scoped_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_24scoped_metrics_container_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_24scoped_metrics_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_24scoped_metrics_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_24scoped_metrics_container_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[1], 49, 0, __PYX_ERR(1, 49, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->scoped_metrics_container);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->scoped_metrics_container));
  __pyx_v_self->scoped_metrics_container = ((struct __pyx_obj_11apache_beam_7metrics_9execution_ScopedMetricsContainer *)Py_None);

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.scoped_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":52
 *   # Public for access by Fn harness operations.
 *   # TODO(robertwb): Cythonize FnHarness.
 *   cdef public list receivers             # <<<<<<<<<<<<<<
 *   cdef readonly bint debug_logging_enabled
 * 
 */

/* 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
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 52, 0, __PYX_ERR(1, 52, __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;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 52, 0, __PYX_ERR(1, 52, __pyx_L1_error));
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(1, 52, __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
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[1], 52, 0, __PYX_ERR(1, 52, __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":53
 *   # TODO(robertwb): Cythonize FnHarness.
 *   cdef public list receivers
 *   cdef readonly bint debug_logging_enabled             # <<<<<<<<<<<<<<
 * 
 *   cdef public step_name  # initialized lazily
 */

/* 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;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 53, 0, __PYX_ERR(1, 53, __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, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.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":55
 *   cdef readonly bint debug_logging_enabled
 * 
 *   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
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 55, 0, __PYX_ERR(1, 55, __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
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 55, 0, __PYX_ERR(1, 55, __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
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[1], 55, 0, __PYX_ERR(1, 55, __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":57
 *   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
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 57, 0, __PYX_ERR(1, 57, __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":59
 *   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
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 59, 0, __PYX_ERR(1, 59, __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":60
 * 
 *   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
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 60, 0, __PYX_ERR(1, 60, __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":61
 *   cdef readonly object scoped_start_state
 *   cdef readonly object scoped_process_state
 *   cdef readonly object scoped_finish_state             # <<<<<<<<<<<<<<
 * 
 *   cpdef start(self)
 */

/* 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
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 61, 0, __PYX_ERR(1, 61, __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;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, self.spec, self.state_sampler, self.step_name)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_19__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_19__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_19__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_18__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_18__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) {
  int __pyx_v_use_setstate;
  PyObject *__pyx_v_state = NULL;
  PyObject *__pyx_v__dict = 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;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__20)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error));

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     cdef bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, 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, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(14); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_self->consumers);
  __Pyx_GIVEREF(__pyx_v_self->consumers);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->consumers);
  __Pyx_INCREF(__pyx_v_self->counter_factory);
  __Pyx_GIVEREF(__pyx_v_self->counter_factory);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->counter_factory);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->metrics_container);
  __Pyx_GIVEREF(__pyx_v_self->metrics_container);
  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_self->metrics_container);
  __Pyx_INCREF(__pyx_v_self->name_context);
  __Pyx_GIVEREF(__pyx_v_self->name_context);
  PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_self->name_context);
  __Pyx_INCREF(__pyx_v_self->operation_name);
  __Pyx_GIVEREF(__pyx_v_self->operation_name);
  PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_v_self->operation_name);
  __Pyx_INCREF(__pyx_v_self->receivers);
  __Pyx_GIVEREF(__pyx_v_self->receivers);
  PyTuple_SET_ITEM(__pyx_t_2, 6, __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_2, 7, __pyx_v_self->scoped_finish_state);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->scoped_metrics_container));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->scoped_metrics_container));
  PyTuple_SET_ITEM(__pyx_t_2, 8, ((PyObject *)__pyx_v_self->scoped_metrics_container));
  __Pyx_INCREF(__pyx_v_self->scoped_process_state);
  __Pyx_GIVEREF(__pyx_v_self->scoped_process_state);
  PyTuple_SET_ITEM(__pyx_t_2, 9, __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_2, 10, __pyx_v_self->scoped_start_state);
  __Pyx_INCREF(__pyx_v_self->spec);
  __Pyx_GIVEREF(__pyx_v_self->spec);
  PyTuple_SET_ITEM(__pyx_t_2, 11, __pyx_v_self->spec);
  __Pyx_INCREF(__pyx_v_self->state_sampler);
  __Pyx_GIVEREF(__pyx_v_self->state_sampler);
  PyTuple_SET_ITEM(__pyx_t_2, 12, __pyx_v_self->state_sampler);
  __Pyx_INCREF(__pyx_v_self->step_name);
  __Pyx_GIVEREF(__pyx_v_self->step_name);
  PyTuple_SET_ITEM(__pyx_t_2, 13, __pyx_v_self->step_name);
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":4
 *     cdef bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, self.spec, self.state_sampler, 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, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":5
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, 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_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":6
 *     _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, 6, __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, 6, __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)":7
 *     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.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_metrics_container 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)":5
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, 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)":9
 *         use_setstate = True
 *     else:
 *         use_setstate = self.consumers is not None or self.counter_factory 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_metrics_container 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), 0x31178f9, None), state
 */
  /*else*/ {
    __pyx_t_3 = (__pyx_v_self->consumers != 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->counter_factory != 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->metrics_container != 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->name_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 = (__pyx_v_self->operation_name != 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->receivers != ((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->scoped_finish_state != Py_None);
    __pyx_t_5 = (__pyx_t_3 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (((PyObject *)__pyx_v_self->scoped_metrics_container) != 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->scoped_process_state != 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->scoped_start_state != 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->spec != 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->state_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->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)":10
 *     else:
 *         use_setstate = self.consumers is not None or self.counter_factory 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_metrics_container 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), 0x31178f9, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":11
 *         use_setstate = self.consumers is not None or self.counter_factory 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_metrics_container 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), 0x31178f9, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_Operation, (type(self), 0x31178f9, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_Operation); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 11, __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_51476729);
    __Pyx_GIVEREF(__pyx_int_51476729);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_51476729);
    __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, 11, __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)":10
 *     else:
 *         use_setstate = self.consumers is not None or self.counter_factory 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_metrics_container 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), 0x31178f9, None), state
 *     else:
 */
  }

  /* "(tree fragment)":13
 *         return __pyx_unpickle_Operation, (type(self), 0x31178f9, None), state
 *     else:
 *         return __pyx_unpickle_Operation, (type(self), 0x31178f9, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Operation__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_Operation); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __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_51476729);
    __Pyx_GIVEREF(__pyx_int_51476729);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_51476729);
    __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, 13, __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 bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, self.spec, self.state_sampler, self.step_name)
 */

  /* 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.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)":14
 *     else:
 *         return __pyx_unpickle_Operation, (type(self), 0x31178f9, 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_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_21__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_21__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_21__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_20__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_20__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;
  __Pyx_TraceFrameInit(__pyx_codeobj__21)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[2], 14, 0, __PYX_ERR(2, 14, __pyx_L1_error));

  /* "(tree fragment)":15
 *         return __pyx_unpickle_Operation, (type(self), 0x31178f9, 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)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 15, __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, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_Operation, (type(self), 0x31178f9, 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":239
 * 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;
  __Pyx_TraceFrameInit(__pyx_codeobj__22)
  __Pyx_RefNannySetupContext("start", 0);
  __Pyx_TraceCall("start", __pyx_f[0], 239, 0, __PYX_ERR(0, 239, __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__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);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 239, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 239, __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;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/runners/worker/operations.py":240
 * 
 *   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, 240, __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, 240, __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);
      }
    }
    if (__pyx_t_3) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __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":241
 *   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, 241, __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, 241, __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, 241, __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);
            }
          }
          if (__pyx_t_3) {
            __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __pyx_L7_error)
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          } else {
            __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __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":242
 *     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, 242, __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, 242, __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, 242, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "apache_beam/runners/worker/operations.py":243
 *       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, 243, __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, 243, __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, 243, __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, 243, __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, 242, __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, 242, __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, 242, __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, 242, __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":244
 *       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, 244, __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, 244, __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, 244, __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);
            }
          }
          if (!__pyx_t_11) {
            __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_range_tracker); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_1);
          } else {
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_2)) {
              PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_v_range_tracker};
              __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L7_error)
              __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
              __Pyx_GOTREF(__pyx_t_1);
            } else
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
              PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_v_range_tracker};
              __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L7_error)
              __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
              __Pyx_GOTREF(__pyx_t_1);
            } else
            #endif
            {
              __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 244, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_11); __pyx_t_11 = NULL;
              __Pyx_INCREF(__pyx_v_range_tracker);
              __Pyx_GIVEREF(__pyx_v_range_tracker);
              PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_range_tracker);
              __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            }
          }
          __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, 244, __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, 244, __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, 244, __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, 244, __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, 244, __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, 244, __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, 244, __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":245
 *           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":246
 *       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, 246, __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":245
 *           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":248
 *           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, 248, __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":249
 *         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, 249, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

            /* "apache_beam/runners/worker/operations.py":244
 *       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":240
 * 
 *   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_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 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_9) < 0) __PYX_ERR(0, 240, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_11 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 240, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_11, NULL);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 240, __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, 240, __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_9);
            __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_1, __pyx_t_9);
            __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_9 = 0; 
            __PYX_ERR(0, 240, __pyx_L9_except_error)
          }
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          goto __pyx_L8_exception_handled;
        }
        __pyx_L9_except_error:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        goto __pyx_L1_error;
        __pyx_L8_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        __pyx_L12_try_end:;
      }
    }
    /*finally:*/ {
      /*normal exit:*/{
        if (__pyx_t_5) {
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__23, NULL);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 240, __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":239
 * 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;
  __Pyx_TraceFrameInit(__pyx_codeobj__22)
  __Pyx_RefNannySetupContext("start", 0);
  __Pyx_TraceCall("start (wrapper)", __pyx_f[0], 239, 0, __PYX_ERR(0, 239, __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, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.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 bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, self.spec, self.state_sampler, self.step_name)
 */

/* 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) {
  int __pyx_v_use_setstate;
  PyObject *__pyx_v_state = NULL;
  PyObject *__pyx_v__dict = 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;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __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)":3
 * def __reduce_cython__(self):
 *     cdef bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, 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, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(14); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.consumers);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.consumers);
  PyTuple_SET_ITEM(__pyx_t_2, 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_2, 1, __pyx_v_self->__pyx_base.counter_factory);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.metrics_container);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.metrics_container);
  PyTuple_SET_ITEM(__pyx_t_2, 3, __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_2, 4, __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_2, 5, __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_2, 6, __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_2, 7, __pyx_v_self->__pyx_base.scoped_finish_state);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.scoped_metrics_container));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.scoped_metrics_container));
  PyTuple_SET_ITEM(__pyx_t_2, 8, ((PyObject *)__pyx_v_self->__pyx_base.scoped_metrics_container));
  __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_2, 9, __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_2, 10, __pyx_v_self->__pyx_base.scoped_start_state);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.spec);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.spec);
  PyTuple_SET_ITEM(__pyx_t_2, 11, __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_2, 12, __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_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)":4
 *     cdef bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, self.spec, self.state_sampler, 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, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":5
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, 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_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":6
 *     _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, 6, __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, 6, __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)":7
 *     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.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_metrics_container 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)":5
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, 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)":9
 *         use_setstate = True
 *     else:
 *         use_setstate = self.consumers is not None or self.counter_factory 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_metrics_container 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), 0x31178f9, None), state
 */
  /*else*/ {
    __pyx_t_3 = (__pyx_v_self->__pyx_base.consumers != 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.counter_factory != 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.metrics_container != 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.name_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 = (__pyx_v_self->__pyx_base.operation_name != 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.receivers != ((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.scoped_finish_state != Py_None);
    __pyx_t_5 = (__pyx_t_3 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (((PyObject *)__pyx_v_self->__pyx_base.scoped_metrics_container) != 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.scoped_process_state != 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.scoped_start_state != 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.spec != 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.state_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->__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)":10
 *     else:
 *         use_setstate = self.consumers is not None or self.counter_factory 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_metrics_container 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), 0x31178f9, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":11
 *         use_setstate = self.consumers is not None or self.counter_factory 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_metrics_container 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), 0x31178f9, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_ReadOperation, (type(self), 0x31178f9, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_ReadOperation); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 11, __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_51476729);
    __Pyx_GIVEREF(__pyx_int_51476729);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_51476729);
    __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, 11, __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)":10
 *     else:
 *         use_setstate = self.consumers is not None or self.counter_factory 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_metrics_container 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), 0x31178f9, None), state
 *     else:
 */
  }

  /* "(tree fragment)":13
 *         return __pyx_unpickle_ReadOperation, (type(self), 0x31178f9, None), state
 *     else:
 *         return __pyx_unpickle_ReadOperation, (type(self), 0x31178f9, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_ReadOperation__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_ReadOperation); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __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_51476729);
    __Pyx_GIVEREF(__pyx_int_51476729);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_51476729);
    __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, 13, __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 bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, self.spec, self.state_sampler, self.step_name)
 */

  /* 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.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)":14
 *     else:
 *         return __pyx_unpickle_ReadOperation, (type(self), 0x31178f9, 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;
  __Pyx_TraceFrameInit(__pyx_codeobj__25)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[2], 14, 0, __PYX_ERR(2, 14, __pyx_L1_error));

  /* "(tree fragment)":15
 *         return __pyx_unpickle_ReadOperation, (type(self), 0x31178f9, 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)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 15, __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, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_ReadOperation, (type(self), 0x31178f9, 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":255
 *   """A write operation that will write to an in-memory sink."""
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     with self.scoped_process_state:
 *       if self.debug_logging_enabled:
 */

/* 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)__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;
  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, 255, __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, 255, __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, 255, __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;
  __Pyx_TraceFrameInit(__pyx_codeobj__26)
  __Pyx_RefNannySetupContext("process", 0);
  __Pyx_TraceCall("process", __pyx_f[0], 255, 0, __PYX_ERR(0, 255, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":256
 * 
 *   def process(self, o):
 *     with self.scoped_process_state:             # <<<<<<<<<<<<<<
 *       if self.debug_logging_enabled:
 *         logging.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, 256, __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, 256, __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, 256, __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);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 256, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 256, __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":257
 *   def process(self, o):
 *     with self.scoped_process_state:
 *       if self.debug_logging_enabled:             # <<<<<<<<<<<<<<
 *         logging.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, 257, __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, 257, __pyx_L7_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (__pyx_t_9) {

            /* "apache_beam/runners/worker/operations.py":258
 *     with self.scoped_process_state:
 *       if self.debug_logging_enabled:
 *         logging.debug('Processing [%s] in %s', o, self)             # <<<<<<<<<<<<<<
 *       self.spec.output_buffer.append(
 *           o if self.spec.write_windowed_values else o.value)
 */
            __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_logging); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 258, __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, 258, __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, 258, __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, 258, __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, 258, __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, 258, __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":257
 *   def process(self, o):
 *     with self.scoped_process_state:
 *       if self.debug_logging_enabled:             # <<<<<<<<<<<<<<
 *         logging.debug('Processing [%s] in %s', o, self)
 *       self.spec.output_buffer.append(
 */
          }

          /* "apache_beam/runners/worker/operations.py":259
 *       if self.debug_logging_enabled:
 *         logging.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, 259, __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, 259, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "apache_beam/runners/worker/operations.py":260
 *         logging.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, 260, __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, 260, __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, 260, __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, 260, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_1 = __pyx_t_3;
            __pyx_t_3 = 0;
          }

          /* "apache_beam/runners/worker/operations.py":259
 *       if self.debug_logging_enabled:
 *         logging.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, 259, __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":256
 * 
 *   def process(self, o):
 *     with self.scoped_process_state:             # <<<<<<<<<<<<<<
 *       if self.debug_logging_enabled:
 *         logging.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_5); __pyx_t_5 = 0;
        __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;
        /*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, 256, __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, 256, __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, 256, __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, 256, __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, 256, __pyx_L9_except_error)
          }
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__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__27, NULL);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 256, __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":255
 *   """A write operation that will write to an in-memory sink."""
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     with self.scoped_process_state:
 *       if self.debug_logging_enabled:
 */

  /* function exit 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":265
 * 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)__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;
  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, 265, __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, 265, __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, 265, __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, 265, __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
  __Pyx_TraceFrameInit(__pyx_codeobj__28)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 265, 0, __PYX_ERR(0, 265, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":266
 * 
 *   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, 266, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":267
 *   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, 267, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":265
 * 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":269
 *     self._step_name = step_name
 * 
 *   def __missing__(self, tag):             # <<<<<<<<<<<<<<
 *     self[tag] = receiver = ConsumerSet(
 *         self._counter_factory, self._step_name, tag, [], 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)__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;
  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, 269, __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, 269, __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, 269, __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) {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__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;
  __Pyx_TraceFrameInit(__pyx_codeobj__29)
  __Pyx_RefNannySetupContext("__missing__", 0);
  __Pyx_TraceCall("__missing__", __pyx_f[0], 269, 0, __PYX_ERR(0, 269, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":271
 *   def __missing__(self, tag):
 *     self[tag] = receiver = ConsumerSet(
 *         self._counter_factory, self._step_name, tag, [], None)             # <<<<<<<<<<<<<<
 *     return receiver
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_counter_factory_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_step_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "apache_beam/runners/worker/operations.py":270
 * 
 *   def __missing__(self, tag):
 *     self[tag] = receiver = ConsumerSet(             # <<<<<<<<<<<<<<
 *         self._counter_factory, self._step_name, tag, [], None)
 *     return receiver
 */
  __pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_tag);
  __Pyx_GIVEREF(__pyx_v_tag);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_tag);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_3);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_4, 4, Py_None);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(PyObject_SetItem(__pyx_v_self, __pyx_v_tag, __pyx_t_3) < 0)) __PYX_ERR(0, 270, __pyx_L1_error)
  __Pyx_INCREF(__pyx_t_3);
  __pyx_v_receiver = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "apache_beam/runners/worker/operations.py":272
 *     self[tag] = receiver = ConsumerSet(
 *         self._counter_factory, self._step_name, tag, [], None)
 *     return receiver             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_receiver));
  __pyx_r = ((PyObject *)__pyx_v_receiver);
  goto __pyx_L0;

  /* "apache_beam/runners/worker/operations.py":269
 *     self._step_name = step_name
 * 
 *   def __missing__(self, tag):             # <<<<<<<<<<<<<<
 *     self[tag] = receiver = ConsumerSet(
 *         self._counter_factory, self._step_name, tag, [], None)
 */

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

/* "apache_beam/runners/worker/operations.py":278
 *   """A Do operation that will execute a custom DoFn for each input element."""
 * 
 *   def __init__(             # <<<<<<<<<<<<<<
 *       self, name, spec, counter_factory, sampler, side_input_maps=None):
 *     super(DoOperation, self).__init__(name, spec, counter_factory, sampler)
 */

/* 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;
  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,0};
    PyObject* values[5] = {0,0,0,0,0};

    /* "apache_beam/runners/worker/operations.py":279
 * 
 *   def __init__(
 *       self, name, spec, counter_factory, sampler, side_input_maps=None):             # <<<<<<<<<<<<<<
 *     super(DoOperation, self).__init__(name, spec, counter_factory, sampler)
 *     self.side_input_maps = side_input_maps
 */
    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_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, 5, 1); __PYX_ERR(0, 278, __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, 278, __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, 5, 3); __PYX_ERR(0, 278, __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--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 278, __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 = 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];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 278, __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);

  /* "apache_beam/runners/worker/operations.py":278
 *   """A Do operation that will execute a custom DoFn for each input element."""
 * 
 *   def __init__(             # <<<<<<<<<<<<<<
 *       self, name, spec, counter_factory, sampler, side_input_maps=None):
 *     super(DoOperation, self).__init__(name, spec, counter_factory, sampler)
 */

  /* 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) {
  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;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 278, 0, __PYX_ERR(0, 278, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":280
 *   def __init__(
 *       self, name, spec, counter_factory, sampler, side_input_maps=None):
 *     super(DoOperation, self).__init__(name, spec, counter_factory, sampler)             # <<<<<<<<<<<<<<
 *     self.side_input_maps = side_input_maps
 *     self.tagged_receivers = None
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __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, 280, __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, 280, __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, 280, __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, 280, __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, 280, __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, 280, __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":281
 *       self, name, spec, counter_factory, sampler, side_input_maps=None):
 *     super(DoOperation, self).__init__(name, spec, counter_factory, sampler)
 *     self.side_input_maps = side_input_maps             # <<<<<<<<<<<<<<
 *     self.tagged_receivers = None
 * 
 */
  __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":282
 *     super(DoOperation, self).__init__(name, spec, counter_factory, sampler)
 *     self.side_input_maps = side_input_maps
 *     self.tagged_receivers = None             # <<<<<<<<<<<<<<
 * 
 *   def _read_side_inputs(self, tags_and_types):
 */
  __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":278
 *   """A Do operation that will execute a custom DoFn for each input element."""
 * 
 *   def __init__(             # <<<<<<<<<<<<<<
 *       self, name, spec, counter_factory, sampler, side_input_maps=None):
 *     super(DoOperation, self).__init__(name, spec, counter_factory, 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_AddTraceback("apache_beam.runners.worker.operations.DoOperation.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __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":284
 *     self.tagged_receivers = None
 * 
 *   def _read_side_inputs(self, tags_and_types):             # <<<<<<<<<<<<<<
 *     """Generator reading side inputs in the order prescribed by tags_and_types.
 * 
 */

/* 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":318
 *       # 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_lambda(PyObject *__pyx_self, PyObject *__pyx_v_o); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_17_read_side_inputs_lambda = {"lambda", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_17_read_side_inputs_lambda, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_17_read_side_inputs_lambda(PyObject *__pyx_self, PyObject *__pyx_v_o) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda(__pyx_self, ((PyObject *)__pyx_v_o));

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

static PyObject *__pyx_lambda_funcdef_lambda(PyObject *__pyx_self, PyObject *__pyx_v_o) {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct___read_side_inputs *__pyx_cur_scope;
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct___read_side_inputs *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("lambda", 0);
  __pyx_outer_scope = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct___read_side_inputs *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_TraceCall("lambda", __pyx_f[0], 318, 0, __PYX_ERR(0, 318, __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, 318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(!__pyx_cur_scope->__pyx_v_side_tag)) { __Pyx_RaiseClosureNameError("side_tag"); __PYX_ERR(0, 318, __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, 318, __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.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":284
 *     self.tagged_receivers = None
 * 
 *   def _read_side_inputs(self, tags_and_types):             # <<<<<<<<<<<<<<
 *     """Generator reading side inputs in the order prescribed by tags_and_types.
 * 
 */

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___read_side_inputs *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_read_side_inputs", 0);
  __pyx_cur_scope = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct___read_side_inputs *)__pyx_tp_new_11apache_beam_7runners_6worker_10operations___pyx_scope_struct___read_side_inputs(__pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct___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___read_side_inputs *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 284, __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__30, (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, 284, __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___read_side_inputs *__pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct___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 *);
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  Py_ssize_t __pyx_t_14;
  PyObject *(*__pyx_t_15)(PyObject *);
  int __pyx_t_16;
  int __pyx_t_17;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_read_side_inputs", 0);
  __Pyx_TraceFrameInit(__pyx_codeobj__30)
  __Pyx_TraceCall("_read_side_inputs", __pyx_f[0], 284, 0, __PYX_ERR(0, 284, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L15_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, 284, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":300
 *     # 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(!Py_OptimizeFlag)) {
    __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, 300, __pyx_L1_error)
    }
  }
  #endif

  /* "apache_beam/runners/worker/operations.py":310
 *     # 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, 310, __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, 310, __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, 310, __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, 310, __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, 310, __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, 310, __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, 310, __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, 310, __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, 310, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 310, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 310, __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, 310, __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, 310, __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, 310, __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); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 310, __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":311
 *     # 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, 311, __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":317
 *       # 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):
 */
    __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_filter); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 317, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);

    /* "apache_beam/runners/worker/operations.py":318
 *       # 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_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_17_read_side_inputs_lambda, 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_8)) __PYX_ERR(0, 318, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->__pyx_base.spec, __pyx_n_s_side_inputs); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 318, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_10 = NULL;
    __pyx_t_12 = 0;
    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_12 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_9)) {
      PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_8, __pyx_t_7};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 317, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
      PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_8, __pyx_t_7};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 317, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    {
      __pyx_t_13 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 317, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      if (__pyx_t_10) {
        __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_10); __pyx_t_10 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_12, __pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_12, __pyx_t_7);
      __pyx_t_8 = 0;
      __pyx_t_7 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_13, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 317, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "apache_beam/runners/worker/operations.py":317
 *       # 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):
 */
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_9 = __pyx_t_6; __Pyx_INCREF(__pyx_t_9); __pyx_t_14 = 0;
      __pyx_t_15 = NULL;
    } else {
      __pyx_t_14 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 317, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_15 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 317, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_15)) {
        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_6 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_14); __Pyx_INCREF(__pyx_t_6); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 317, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_9, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 317, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_14 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_14); __Pyx_INCREF(__pyx_t_6); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 317, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_9, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 317, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_15(__pyx_t_9);
        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, 317, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_si);
      __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_si, __pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      __pyx_t_6 = 0;

      /* "apache_beam/runners/worker/operations.py":319
 *       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_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_operation_specs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 319, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_WorkerSideInputSource); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 319, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_1 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v_si, __pyx_t_13); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 319, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_16 = ((!(__pyx_t_1 != 0)) != 0);
      if (unlikely(__pyx_t_16)) {

        /* "apache_beam/runners/worker/operations.py":320
 *           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)
 *         # The tracking of time spend reading and bytes read from side inputs is
 */
        __pyx_t_13 = PyUnicode_Format(__pyx_kp_u_Unknown_side_input_type_r, __pyx_cur_scope->__pyx_v_si); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 320, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_NotImplementedError, __pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 320, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_Raise(__pyx_t_6, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __PYX_ERR(0, 320, __pyx_L1_error)

        /* "apache_beam/runners/worker/operations.py":319
 *       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":321
 *         if not isinstance(si, operation_specs.WorkerSideInputSource):
 *           raise NotImplementedError('Unknown side input type: %r' % si)
 *         sources.append(si.source)             # <<<<<<<<<<<<<<
 *         # The tracking of time spend reading and bytes read from side inputs is
 *         # behind an experiment flag to test its performance impact.
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_si, __pyx_n_s_source); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 321, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_17 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_sources, __pyx_t_6); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 321, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "apache_beam/runners/worker/operations.py":324
 *         # The tracking of time spend reading and bytes read from side inputs is
 *         # behind an experiment flag to test its performance impact.
 *         si_counter = opcounters.SideInputReadCounter(             # <<<<<<<<<<<<<<
 *             self.counter_factory,
 *             self.state_sampler,
 */
      __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 324, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __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_6, 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_6, 1, __pyx_cur_scope->__pyx_v_self->__pyx_base.state_sampler);

      /* "apache_beam/runners/worker/operations.py":327
 *             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_13 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 327, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->__pyx_base.name_context, __pyx_n_s_step_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 327, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_declaring_step, __pyx_t_7) < 0) __PYX_ERR(0, 327, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "apache_beam/runners/worker/operations.py":329
 *             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)             # <<<<<<<<<<<<<<
 *       iterator_fn = sideinputs.get_iterator_fn_for_sources(
 *           sources, read_counter=si_counter)
 */
      __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_cur_scope->__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 329, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_input_index, __pyx_t_7) < 0) __PYX_ERR(0, 327, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "apache_beam/runners/worker/operations.py":324
 *         # The tracking of time spend reading and bytes read from side inputs is
 *         # behind an experiment flag to test its performance impact.
 *         si_counter = opcounters.SideInputReadCounter(             # <<<<<<<<<<<<<<
 *             self.counter_factory,
 *             self.state_sampler,
 */
      __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter), __pyx_t_6, __pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 324, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_si_counter);
      __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_si_counter, __pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_7);
      __pyx_t_7 = 0;

      /* "apache_beam/runners/worker/operations.py":317
 *       # 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):
 */
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "apache_beam/runners/worker/operations.py":330
 *             # Inputs are 1-indexed, so we add 1 to i in the side input id
 *             input_index=i + 1)
 *       iterator_fn = sideinputs.get_iterator_fn_for_sources(             # <<<<<<<<<<<<<<
 *           sources, read_counter=si_counter)
 * 
 */
    __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_sideinputs); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 330, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_get_iterator_fn_for_sources); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 330, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "apache_beam/runners/worker/operations.py":331
 *             input_index=i + 1)
 *       iterator_fn = sideinputs.get_iterator_fn_for_sources(
 *           sources, read_counter=si_counter)             # <<<<<<<<<<<<<<
 * 
 *       # Backwards compatibility for pre BEAM-733 SDKs.
 */
    __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 330, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sources);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sources);
    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_cur_scope->__pyx_v_sources);
    __pyx_t_13 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 331, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    if (unlikely(!__pyx_cur_scope->__pyx_v_si_counter)) { __Pyx_RaiseUnboundLocalError("si_counter"); __PYX_ERR(0, 331, __pyx_L1_error) }
    if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_read_counter, __pyx_cur_scope->__pyx_v_si_counter) < 0) __PYX_ERR(0, 331, __pyx_L1_error)

    /* "apache_beam/runners/worker/operations.py":330
 *             # Inputs are 1-indexed, so we add 1 to i in the side input id
 *             input_index=i + 1)
 *       iterator_fn = sideinputs.get_iterator_fn_for_sources(             # <<<<<<<<<<<<<<
 *           sources, read_counter=si_counter)
 * 
 */
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, __pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 330, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_iterator_fn);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_iterator_fn, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;

    /* "apache_beam/runners/worker/operations.py":334
 * 
 *       # Backwards compatibility for pre BEAM-733 SDKs.
 *       if isinstance(view_options, tuple):             # <<<<<<<<<<<<<<
 *         if view_class == pvalue.AsSingleton:
 *           has_default, default = view_options
 */
    __pyx_t_16 = PyTuple_Check(__pyx_cur_scope->__pyx_v_view_options); 
    __pyx_t_1 = (__pyx_t_16 != 0);
    if (__pyx_t_1) {

      /* "apache_beam/runners/worker/operations.py":335
 *       # Backwards compatibility for pre BEAM-733 SDKs.
 *       if isinstance(view_options, tuple):
 *         if view_class == pvalue.AsSingleton:             # <<<<<<<<<<<<<<
 *           has_default, default = view_options
 *           view_options = {'default': default} if has_default else {}
 */
      __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_pvalue); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 335, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_AsSingleton); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 335, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_view_class, __pyx_t_13, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 335, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 335, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_1) {

        /* "apache_beam/runners/worker/operations.py":336
 *       if isinstance(view_options, tuple):
 *         if view_class == pvalue.AsSingleton:
 *           has_default, default = view_options             # <<<<<<<<<<<<<<
 *           view_options = {'default': default} if has_default else {}
 *         else:
 */
        if ((likely(PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_view_options))) || (PyList_CheckExact(__pyx_cur_scope->__pyx_v_view_options))) {
          PyObject* sequence = __pyx_cur_scope->__pyx_v_view_options;
          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, 336, __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_13 = PyTuple_GET_ITEM(sequence, 1); 
          } else {
            __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_13 = PyList_GET_ITEM(sequence, 1); 
          }
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_13);
          #else
          __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 336, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_13 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 336, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_13);
          #endif
        } else {
          Py_ssize_t index = -1;
          __pyx_t_9 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_view_options); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 336, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_11 = Py_TYPE(__pyx_t_9)->tp_iternext;
          index = 0; __pyx_t_6 = __pyx_t_11(__pyx_t_9); if (unlikely(!__pyx_t_6)) goto __pyx_L13_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_6);
          index = 1; __pyx_t_13 = __pyx_t_11(__pyx_t_9); if (unlikely(!__pyx_t_13)) goto __pyx_L13_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_13);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_9), 2) < 0) __PYX_ERR(0, 336, __pyx_L1_error)
          __pyx_t_11 = NULL;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          goto __pyx_L14_unpacking_done;
          __pyx_L13_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __pyx_t_11 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(0, 336, __pyx_L1_error)
          __pyx_L14_unpacking_done:;
        }
        __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_has_default);
        __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_has_default, __pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_6);
        __pyx_t_6 = 0;
        __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_default);
        __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_default, __pyx_t_13);
        __Pyx_GIVEREF(__pyx_t_13);
        __pyx_t_13 = 0;

        /* "apache_beam/runners/worker/operations.py":337
 *         if view_class == pvalue.AsSingleton:
 *           has_default, default = view_options
 *           view_options = {'default': default} if has_default else {}             # <<<<<<<<<<<<<<
 *         else:
 *           view_options = {}
 */
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_has_default); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 337, __pyx_L1_error)
        if (__pyx_t_1) {
          __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 337, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_default, __pyx_cur_scope->__pyx_v_default) < 0) __PYX_ERR(0, 337, __pyx_L1_error)
          __pyx_t_13 = __pyx_t_6;
          __pyx_t_6 = 0;
        } else {
          __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 337, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_13 = __pyx_t_6;
          __pyx_t_6 = 0;
        }
        __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_view_options);
        __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_view_options, __pyx_t_13);
        __Pyx_GIVEREF(__pyx_t_13);
        __pyx_t_13 = 0;

        /* "apache_beam/runners/worker/operations.py":335
 *       # Backwards compatibility for pre BEAM-733 SDKs.
 *       if isinstance(view_options, tuple):
 *         if view_class == pvalue.AsSingleton:             # <<<<<<<<<<<<<<
 *           has_default, default = view_options
 *           view_options = {'default': default} if has_default else {}
 */
        goto __pyx_L12;
      }

      /* "apache_beam/runners/worker/operations.py":339
 *           view_options = {'default': default} if has_default else {}
 *         else:
 *           view_options = {}             # <<<<<<<<<<<<<<
 * 
 *       yield apache_sideinputs.SideInputMap(
 */
      /*else*/ {
        __pyx_t_13 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 339, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_view_options);
        __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_view_options, __pyx_t_13);
        __Pyx_GIVEREF(__pyx_t_13);
        __pyx_t_13 = 0;
      }
      __pyx_L12:;

      /* "apache_beam/runners/worker/operations.py":334
 * 
 *       # Backwards compatibility for pre BEAM-733 SDKs.
 *       if isinstance(view_options, tuple):             # <<<<<<<<<<<<<<
 *         if view_class == pvalue.AsSingleton:
 *           has_default, default = view_options
 */
    }

    /* "apache_beam/runners/worker/operations.py":341
 *           view_options = {}
 * 
 *       yield apache_sideinputs.SideInputMap(             # <<<<<<<<<<<<<<
 *           view_class, view_options, sideinputs.EmulatedIterable(iterator_fn))
 * 
 */
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_apache_sideinputs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_SideInputMap); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "apache_beam/runners/worker/operations.py":342
 * 
 *       yield apache_sideinputs.SideInputMap(
 *           view_class, view_options, sideinputs.EmulatedIterable(iterator_fn))             # <<<<<<<<<<<<<<
 * 
 *   def start(self):
 */
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_sideinputs); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 342, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_EmulatedIterable); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 342, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_cur_scope->__pyx_v_iterator_fn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 342, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_cur_scope->__pyx_v_iterator_fn};
        __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 342, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_6);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_cur_scope->__pyx_v_iterator_fn};
        __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 342, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_6);
      } else
      #endif
      {
        __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 342, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_INCREF(__pyx_cur_scope->__pyx_v_iterator_fn);
        __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_iterator_fn);
        PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_cur_scope->__pyx_v_iterator_fn);
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 342, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = NULL;
    __pyx_t_12 = 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_12 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_9)) {
      PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_cur_scope->__pyx_v_view_class, __pyx_cur_scope->__pyx_v_view_options, __pyx_t_6};
      __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 341, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
      PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_cur_scope->__pyx_v_view_class, __pyx_cur_scope->__pyx_v_view_options, __pyx_t_6};
      __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 341, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_10 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 341, __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_cur_scope->__pyx_v_view_class);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_view_class);
      PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_12, __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_10, 1+__pyx_t_12, __pyx_cur_scope->__pyx_v_view_options);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_12, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 341, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_r = __pyx_t_13;
    __pyx_t_13 = 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_L15_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, 341, __pyx_L1_error)

    /* "apache_beam/runners/worker/operations.py":310
 *     # 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":284
 *     self.tagged_receivers = None
 * 
 *   def _read_side_inputs(self, tags_and_types):             # <<<<<<<<<<<<<<
 *     """Generator reading side inputs in the order prescribed by tags_and_types.
 * 
 */

  /* 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_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("_read_side_inputs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  __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":344
 *           view_class, view_options, sideinputs.EmulatedIterable(iterator_fn))
 * 
 *   def start(self):             # <<<<<<<<<<<<<<
 *     with self.scoped_start_state:
 *       super(DoOperation, self).start()
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_6start(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_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_output_tag_prefix = NULL;
  PyObject *__pyx_v_index = NULL;
  PyObject *__pyx_v_tag = NULL;
  PyObject *__pyx_v_original_tag = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  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;
  PyObject *(*__pyx_t_15)(PyObject *);
  int __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  int __pyx_t_18;
  PyObject *__pyx_t_19 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__31)
  __Pyx_RefNannySetupContext("start", 0);
  __Pyx_TraceCall("start", __pyx_f[0], 344, 0, __PYX_ERR(0, 344, __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 344, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_6start)) {
      __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);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 344, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 344, __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;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/runners/worker/operations.py":345
 * 
 *   def start(self):
 *     with self.scoped_start_state:             # <<<<<<<<<<<<<<
 *       super(DoOperation, self).start()
 * 
 */
  /*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, 345, __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, 345, __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);
      }
    }
    if (__pyx_t_3) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 345, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 345, __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":346
 *   def start(self):
 *     with self.scoped_start_state:
 *       super(DoOperation, self).start()             # <<<<<<<<<<<<<<
 * 
 *       # See fn_data in dataflow_runner.py
 */
          __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 346, __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, 346, __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, 346, __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);
            }
          }
          if (__pyx_t_3) {
            __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L7_error)
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          } else {
            __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __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":350
 *       # See fn_data in dataflow_runner.py
 *       fn, args, kwargs, tags_and_types, window_fn = (
 *           pickler.loads(self.spec.serialized_fn))             # <<<<<<<<<<<<<<
 * 
 *       state = common.DoFnState(self.counter_factory)
 */
          __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_pickler); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 350, __pyx_L7_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, 350, __pyx_L7_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, 350, __pyx_L7_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);
            }
          }
          if (!__pyx_t_4) {
            __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 350, __pyx_L7_error)
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_GOTREF(__pyx_t_1);
          } else {
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_3)) {
              PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2};
              __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 350, __pyx_L7_error)
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            } else
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
              PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2};
              __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 350, __pyx_L7_error)
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            } else
            #endif
            {
              __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 350, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __pyx_t_4 = NULL;
              __Pyx_GIVEREF(__pyx_t_2);
              PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_2);
              __pyx_t_2 = 0;
              __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 350, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            }
          }
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
            PyObject* sequence = __pyx_t_1;
            Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
            if (unlikely(size != 5)) {
              if (size > 5) __Pyx_RaiseTooManyValuesError(5);
              else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
              __PYX_ERR(0, 349, __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_9 = PyTuple_GET_ITEM(sequence, 1); 
              __pyx_t_2 = PyTuple_GET_ITEM(sequence, 2); 
              __pyx_t_4 = PyTuple_GET_ITEM(sequence, 3); 
              __pyx_t_10 = PyTuple_GET_ITEM(sequence, 4); 
            } else {
              __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
              __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
              __pyx_t_2 = PyList_GET_ITEM(sequence, 2); 
              __pyx_t_4 = PyList_GET_ITEM(sequence, 3); 
              __pyx_t_10 = PyList_GET_ITEM(sequence, 4); 
            }
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_10);
            #else
            {
              Py_ssize_t i;
              PyObject** temps[5] = {&__pyx_t_3,&__pyx_t_9,&__pyx_t_2,&__pyx_t_4,&__pyx_t_10};
              for (i=0; i < 5; i++) {
                PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 349, __pyx_L7_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_3,&__pyx_t_9,&__pyx_t_2,&__pyx_t_4,&__pyx_t_10};
            __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 349, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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, 349, __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, 349, __pyx_L7_error)
            __pyx_L14_unpacking_done:;
          }

          /* "apache_beam/runners/worker/operations.py":349
 * 
 *       # 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_3;
          __pyx_t_3 = 0;
          __pyx_v_args = __pyx_t_9;
          __pyx_t_9 = 0;
          __pyx_v_kwargs = __pyx_t_2;
          __pyx_t_2 = 0;
          __pyx_v_tags_and_types = __pyx_t_4;
          __pyx_t_4 = 0;
          __pyx_v_window_fn = __pyx_t_10;
          __pyx_t_10 = 0;

          /* "apache_beam/runners/worker/operations.py":352
 *           pickler.loads(self.spec.serialized_fn))
 * 
 *       state = common.DoFnState(self.counter_factory)             # <<<<<<<<<<<<<<
 *       state.step_name = self.name_context.logging_name()
 * 
 */
          __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_common); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 352, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_DoFnState); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 352, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __pyx_t_10 = NULL;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
            __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4);
            if (likely(__pyx_t_10)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_10);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_4, function);
            }
          }
          if (!__pyx_t_10) {
            __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_self->__pyx_base.counter_factory); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 352, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_1);
          } else {
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_4)) {
              PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_self->__pyx_base.counter_factory};
              __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 352, __pyx_L7_error)
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_GOTREF(__pyx_t_1);
            } else
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
              PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_self->__pyx_base.counter_factory};
              __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 352, __pyx_L7_error)
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_GOTREF(__pyx_t_1);
            } else
            #endif
            {
              __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 352, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_10); __pyx_t_10 = NULL;
              __Pyx_INCREF(__pyx_v_self->__pyx_base.counter_factory);
              __Pyx_GIVEREF(__pyx_v_self->__pyx_base.counter_factory);
              PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_self->__pyx_base.counter_factory);
              __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 352, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            }
          }
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_v_state = __pyx_t_1;
          __pyx_t_1 = 0;

          /* "apache_beam/runners/worker/operations.py":353
 * 
 *       state = common.DoFnState(self.counter_factory)
 *       state.step_name = self.name_context.logging_name()             # <<<<<<<<<<<<<<
 * 
 *       # Tag to output index map used to dispatch the side output values emitted
 */
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.name_context, __pyx_n_s_logging_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 353, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_2 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
            __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
            if (likely(__pyx_t_2)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_2);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_4, function);
            }
          }
          if (__pyx_t_2) {
            __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L7_error)
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          } else {
            __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L7_error)
          }
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (__Pyx_PyObject_SetAttrStr(__pyx_v_state, __pyx_n_s_step_name, __pyx_t_1) < 0) __PYX_ERR(0, 353, __pyx_L7_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "apache_beam/runners/worker/operations.py":358
 *       # by the DoFn function to the appropriate receivers. The main output is
 *       # tagged with None and is associated with its corresponding index.
 *       self.tagged_receivers = _TaggedReceivers(             # <<<<<<<<<<<<<<
 *           self.counter_factory, self.name_context.logging_name())
 * 
 */
          __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_TaggedReceivers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 358, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_4);

          /* "apache_beam/runners/worker/operations.py":359
 *       # tagged with None and is associated with its corresponding index.
 *       self.tagged_receivers = _TaggedReceivers(
 *           self.counter_factory, self.name_context.logging_name())             # <<<<<<<<<<<<<<
 * 
 *       output_tag_prefix = PropertyNames.OUT + '_'
 */
          __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.name_context, __pyx_n_s_logging_name); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 359, __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);
            }
          }
          if (__pyx_t_9) {
            __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 359, __pyx_L7_error)
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          } else {
            __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 359, __pyx_L7_error)
          }
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __pyx_t_10 = NULL;
          __pyx_t_13 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
            __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4);
            if (likely(__pyx_t_10)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_10);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_4, function);
              __pyx_t_13 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_4)) {
            PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_self->__pyx_base.counter_factory, __pyx_t_2};
            __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 358, __pyx_L7_error)
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 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_4)) {
            PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_self->__pyx_base.counter_factory, __pyx_t_2};
            __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 358, __pyx_L7_error)
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          } else
          #endif
          {
            __pyx_t_9 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 358, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_9);
            if (__pyx_t_10) {
              __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); __pyx_t_10 = NULL;
            }
            __Pyx_INCREF(__pyx_v_self->__pyx_base.counter_factory);
            __Pyx_GIVEREF(__pyx_v_self->__pyx_base.counter_factory);
            PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_13, __pyx_v_self->__pyx_base.counter_factory);
            __Pyx_GIVEREF(__pyx_t_2);
            PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_13, __pyx_t_2);
            __pyx_t_2 = 0;
            __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 358, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          }
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "apache_beam/runners/worker/operations.py":358
 *       # by the DoFn function to the appropriate receivers. The main output is
 *       # 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_1);
          __Pyx_GOTREF(__pyx_v_self->tagged_receivers);
          __Pyx_DECREF(__pyx_v_self->tagged_receivers);
          __pyx_v_self->tagged_receivers = __pyx_t_1;
          __pyx_t_1 = 0;

          /* "apache_beam/runners/worker/operations.py":361
 *           self.counter_factory, self.name_context.logging_name())
 * 
 *       output_tag_prefix = PropertyNames.OUT + '_'             # <<<<<<<<<<<<<<
 *       for index, tag in enumerate(self.spec.output_tags):
 *         if tag == PropertyNames.OUT:
 */
          __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_PropertyNames); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_OUT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_1 = PyNumber_Add(__pyx_t_4, __pyx_n_u__32); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_v_output_tag_prefix = __pyx_t_1;
          __pyx_t_1 = 0;

          /* "apache_beam/runners/worker/operations.py":362
 * 
 *       output_tag_prefix = PropertyNames.OUT + '_'
 *       for index, tag in enumerate(self.spec.output_tags):             # <<<<<<<<<<<<<<
 *         if tag == PropertyNames.OUT:
 *           original_tag = None
 */
          __Pyx_INCREF(__pyx_int_0);
          __pyx_t_1 = __pyx_int_0;
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.spec, __pyx_n_s_output_tags); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 362, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
            __pyx_t_9 = __pyx_t_4; __Pyx_INCREF(__pyx_t_9); __pyx_t_14 = 0;
            __pyx_t_15 = NULL;
          } else {
            __pyx_t_14 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 362, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_15 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 362, __pyx_L7_error)
          }
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          for (;;) {
            if (likely(!__pyx_t_15)) {
              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_4 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_14); __Pyx_INCREF(__pyx_t_4); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 362, __pyx_L7_error)
                #else
                __pyx_t_4 = PySequence_ITEM(__pyx_t_9, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 362, __pyx_L7_error)
                __Pyx_GOTREF(__pyx_t_4);
                #endif
              } else {
                if (__pyx_t_14 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_14); __Pyx_INCREF(__pyx_t_4); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 362, __pyx_L7_error)
                #else
                __pyx_t_4 = PySequence_ITEM(__pyx_t_9, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 362, __pyx_L7_error)
                __Pyx_GOTREF(__pyx_t_4);
                #endif
              }
            } else {
              __pyx_t_4 = __pyx_t_15(__pyx_t_9);
              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, 362, __pyx_L7_error)
                }
                break;
              }
              __Pyx_GOTREF(__pyx_t_4);
            }
            __Pyx_XDECREF_SET(__pyx_v_tag, __pyx_t_4);
            __pyx_t_4 = 0;
            __Pyx_INCREF(__pyx_t_1);
            __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_1);
            __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 362, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_1);
            __pyx_t_1 = __pyx_t_4;
            __pyx_t_4 = 0;

            /* "apache_beam/runners/worker/operations.py":363
 *       output_tag_prefix = PropertyNames.OUT + '_'
 *       for index, tag in enumerate(self.spec.output_tags):
 *         if tag == PropertyNames.OUT:             # <<<<<<<<<<<<<<
 *           original_tag = None
 *         elif tag.startswith(output_tag_prefix):
 */
            __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_PropertyNames); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 363, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_OUT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 363, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __pyx_t_4 = PyObject_RichCompare(__pyx_v_tag, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 363, __pyx_L7_error)
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(0, 363, __pyx_L7_error)
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            if (__pyx_t_16) {

              /* "apache_beam/runners/worker/operations.py":364
 *       for index, tag in enumerate(self.spec.output_tags):
 *         if tag == PropertyNames.OUT:
 *           original_tag = None             # <<<<<<<<<<<<<<
 *         elif tag.startswith(output_tag_prefix):
 *           original_tag = tag[len(output_tag_prefix):]
 */
              __Pyx_INCREF(Py_None);
              __Pyx_XDECREF_SET(__pyx_v_original_tag, Py_None);

              /* "apache_beam/runners/worker/operations.py":363
 *       output_tag_prefix = PropertyNames.OUT + '_'
 *       for index, tag in enumerate(self.spec.output_tags):
 *         if tag == PropertyNames.OUT:             # <<<<<<<<<<<<<<
 *           original_tag = None
 *         elif tag.startswith(output_tag_prefix):
 */
              goto __pyx_L17;
            }

            /* "apache_beam/runners/worker/operations.py":365
 *         if tag == PropertyNames.OUT:
 *           original_tag = None
 *         elif tag.startswith(output_tag_prefix):             # <<<<<<<<<<<<<<
 *           original_tag = tag[len(output_tag_prefix):]
 *         else:
 */
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_tag, __pyx_n_s_startswith); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 365, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_10 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
              __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
              if (likely(__pyx_t_10)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
                __Pyx_INCREF(__pyx_t_10);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_2, function);
              }
            }
            if (!__pyx_t_10) {
              __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_output_tag_prefix); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 365, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_4);
            } else {
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_2)) {
                PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_output_tag_prefix};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 365, __pyx_L7_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
                PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_output_tag_prefix};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 365, __pyx_L7_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 365, __pyx_L7_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_10); __pyx_t_10 = NULL;
                __Pyx_INCREF(__pyx_v_output_tag_prefix);
                __Pyx_GIVEREF(__pyx_v_output_tag_prefix);
                PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_output_tag_prefix);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 365, __pyx_L7_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_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(0, 365, __pyx_L7_error)
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            if (likely(__pyx_t_16)) {

              /* "apache_beam/runners/worker/operations.py":366
 *           original_tag = None
 *         elif tag.startswith(output_tag_prefix):
 *           original_tag = tag[len(output_tag_prefix):]             # <<<<<<<<<<<<<<
 *         else:
 *           raise ValueError('Unexpected output name for operation: %s' % tag)
 */
              __pyx_t_17 = PyObject_Length(__pyx_v_output_tag_prefix); if (unlikely(__pyx_t_17 == ((Py_ssize_t)-1))) __PYX_ERR(0, 366, __pyx_L7_error)
              __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_tag, __pyx_t_17, 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 366, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_4);
              __Pyx_XDECREF_SET(__pyx_v_original_tag, __pyx_t_4);
              __pyx_t_4 = 0;

              /* "apache_beam/runners/worker/operations.py":365
 *         if tag == PropertyNames.OUT:
 *           original_tag = None
 *         elif tag.startswith(output_tag_prefix):             # <<<<<<<<<<<<<<
 *           original_tag = tag[len(output_tag_prefix):]
 *         else:
 */
              goto __pyx_L17;
            }

            /* "apache_beam/runners/worker/operations.py":368
 *           original_tag = tag[len(output_tag_prefix):]
 *         else:
 *           raise ValueError('Unexpected output name for operation: %s' % tag)             # <<<<<<<<<<<<<<
 *         self.tagged_receivers[original_tag] = self.receivers[index]
 * 
 */
            /*else*/ {
              __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_Unexpected_output_name_for_opera, __pyx_v_tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 368, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_4);
              __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 368, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __Pyx_Raise(__pyx_t_2, 0, 0, 0);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __PYX_ERR(0, 368, __pyx_L7_error)
            }
            __pyx_L17:;

            /* "apache_beam/runners/worker/operations.py":369
 *         else:
 *           raise ValueError('Unexpected output name for operation: %s' % tag)
 *         self.tagged_receivers[original_tag] = self.receivers[index]             # <<<<<<<<<<<<<<
 * 
 *       if self.side_input_maps is None:
 */
            if (unlikely(__pyx_v_self->__pyx_base.receivers == Py_None)) {
              PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
              __PYX_ERR(0, 369, __pyx_L7_error)
            }
            __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_self->__pyx_base.receivers, __pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 369, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_2);
            if (unlikely(PyObject_SetItem(__pyx_v_self->tagged_receivers, __pyx_v_original_tag, __pyx_t_2) < 0)) __PYX_ERR(0, 369, __pyx_L7_error)
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "apache_beam/runners/worker/operations.py":362
 * 
 *       output_tag_prefix = PropertyNames.OUT + '_'
 *       for index, tag in enumerate(self.spec.output_tags):             # <<<<<<<<<<<<<<
 *         if tag == PropertyNames.OUT:
 *           original_tag = None
 */
          }
          __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
 *         self.tagged_receivers[original_tag] = self.receivers[index]
 * 
 *       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_16 = (__pyx_v_self->side_input_maps == Py_None);
          __pyx_t_18 = (__pyx_t_16 != 0);
          if (__pyx_t_18) {

            /* "apache_beam/runners/worker/operations.py":372
 * 
 *       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_18 = __Pyx_PyObject_IsTrue(__pyx_v_tags_and_types); if (unlikely(__pyx_t_18 < 0)) __PYX_ERR(0, 372, __pyx_L7_error)
            if (__pyx_t_18) {

              /* "apache_beam/runners/worker/operations.py":373
 *       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, 373, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_9);
              __pyx_t_2 = NULL;
              if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
                __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
                if (likely(__pyx_t_2)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
                  __Pyx_INCREF(__pyx_t_2);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_9, function);
                }
              }
              if (!__pyx_t_2) {
                __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_tags_and_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 373, __pyx_L7_error)
                __Pyx_GOTREF(__pyx_t_1);
              } else {
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_9)) {
                  PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_tags_and_types};
                  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 373, __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_9)) {
                  PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_tags_and_types};
                  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 373, __pyx_L7_error)
                  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                  __Pyx_GOTREF(__pyx_t_1);
                } else
                #endif
                {
                  __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 373, __pyx_L7_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
                  __Pyx_INCREF(__pyx_v_tags_and_types);
                  __Pyx_GIVEREF(__pyx_v_tags_and_types);
                  PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_tags_and_types);
                  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 373, __pyx_L7_error)
                  __Pyx_GOTREF(__pyx_t_1);
                  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                }
              }
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              __pyx_t_9 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 373, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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":372
 * 
 *       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_L19;
            }

            /* "apache_beam/runners/worker/operations.py":375
 *           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, 375, __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_L19:;

            /* "apache_beam/runners/worker/operations.py":371
 *         self.tagged_receivers[original_tag] = self.receivers[index]
 * 
 *       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":377
 *           self.side_input_maps = []
 * 
 *       self.dofn_runner = common.DoFnRunner(             # <<<<<<<<<<<<<<
 *           fn, args, kwargs, self.side_input_maps, window_fn,
 *           tagged_receivers=self.tagged_receivers,
 */
          __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_common); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 377, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_DoFnRunner); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 377, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

          /* "apache_beam/runners/worker/operations.py":378
 * 
 *       self.dofn_runner = common.DoFnRunner(
 *           fn, args, 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, 377, __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":379
 *       self.dofn_runner = common.DoFnRunner(
 *           fn, args, kwargs, self.side_input_maps, window_fn,
 *           tagged_receivers=self.tagged_receivers,             # <<<<<<<<<<<<<<
 *           step_name=self.name_context.logging_name(),
 *           state=state,
 */
          __pyx_t_4 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 379, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_tagged_receivers, __pyx_v_self->tagged_receivers) < 0) __PYX_ERR(0, 379, __pyx_L7_error)

          /* "apache_beam/runners/worker/operations.py":380
 *           fn, args, kwargs, self.side_input_maps, window_fn,
 *           tagged_receivers=self.tagged_receivers,
 *           step_name=self.name_context.logging_name(),             # <<<<<<<<<<<<<<
 *           state=state,
 *           operation_name=self.name_context.metrics_name())
 */
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.name_context, __pyx_n_s_logging_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 380, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_10 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
            __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
            if (likely(__pyx_t_10)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
              __Pyx_INCREF(__pyx_t_10);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_3, function);
            }
          }
          if (__pyx_t_10) {
            __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 380, __pyx_L7_error)
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          } else {
            __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 380, __pyx_L7_error)
          }
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_step_name, __pyx_t_2) < 0) __PYX_ERR(0, 379, __pyx_L7_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "apache_beam/runners/worker/operations.py":381
 *           tagged_receivers=self.tagged_receivers,
 *           step_name=self.name_context.logging_name(),
 *           state=state,             # <<<<<<<<<<<<<<
 *           operation_name=self.name_context.metrics_name())
 * 
 */
          if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_state, __pyx_v_state) < 0) __PYX_ERR(0, 379, __pyx_L7_error)

          /* "apache_beam/runners/worker/operations.py":382
 *           step_name=self.name_context.logging_name(),
 *           state=state,
 *           operation_name=self.name_context.metrics_name())             # <<<<<<<<<<<<<<
 * 
 *       self.dofn_receiver = (self.dofn_runner
 */
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.name_context, __pyx_n_s_metrics_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 382, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_10 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
            __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
            if (likely(__pyx_t_10)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
              __Pyx_INCREF(__pyx_t_10);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_3, function);
            }
          }
          if (__pyx_t_10) {
            __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 382, __pyx_L7_error)
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          } else {
            __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 382, __pyx_L7_error)
          }
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_operation_name, __pyx_t_2) < 0) __PYX_ERR(0, 379, __pyx_L7_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "apache_beam/runners/worker/operations.py":377
 *           self.side_input_maps = []
 * 
 *       self.dofn_runner = common.DoFnRunner(             # <<<<<<<<<<<<<<
 *           fn, args, kwargs, self.side_input_maps, window_fn,
 *           tagged_receivers=self.tagged_receivers,
 */
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 377, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GIVEREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_v_self->dofn_runner);
          __Pyx_DECREF(__pyx_v_self->dofn_runner);
          __pyx_v_self->dofn_runner = __pyx_t_2;
          __pyx_t_2 = 0;

          /* "apache_beam/runners/worker/operations.py":385
 * 
 *       self.dofn_receiver = (self.dofn_runner
 *                             if isinstance(self.dofn_runner, Receiver)             # <<<<<<<<<<<<<<
 *                             else DoFnRunnerReceiver(self.dofn_runner))
 * 
 */
          __pyx_t_4 = __pyx_v_self->dofn_runner;
          __Pyx_INCREF(__pyx_t_4);
          __pyx_t_18 = __Pyx_TypeCheck(__pyx_t_4, __pyx_ptype_11apache_beam_7runners_6common_Receiver); 
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if ((__pyx_t_18 != 0)) {

            /* "apache_beam/runners/worker/operations.py":384
 *           operation_name=self.name_context.metrics_name())
 * 
 *       self.dofn_receiver = (self.dofn_runner             # <<<<<<<<<<<<<<
 *                             if isinstance(self.dofn_runner, Receiver)
 *                             else DoFnRunnerReceiver(self.dofn_runner))
 */
            if (!(likely(((__pyx_v_self->dofn_runner) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->dofn_runner, __pyx_ptype_11apache_beam_7runners_6common_Receiver))))) __PYX_ERR(0, 384, __pyx_L7_error)
            __Pyx_INCREF(__pyx_v_self->dofn_runner);
            __pyx_t_2 = __pyx_v_self->dofn_runner;
          } else {

            /* "apache_beam/runners/worker/operations.py":386
 *       self.dofn_receiver = (self.dofn_runner
 *                             if isinstance(self.dofn_runner, Receiver)
 *                             else DoFnRunnerReceiver(self.dofn_runner))             # <<<<<<<<<<<<<<
 * 
 *       self.dofn_runner.start()
 */
            __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_DoFnRunnerReceiver); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 386, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_1 = NULL;
            if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
              __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
              if (likely(__pyx_t_1)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
                __Pyx_INCREF(__pyx_t_1);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_9, function);
              }
            }
            if (!__pyx_t_1) {
              __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_self->dofn_runner); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 386, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_4);
            } else {
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_9)) {
                PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_self->dofn_runner};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 386, __pyx_L7_error)
                __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
                PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_self->dofn_runner};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 386, __pyx_L7_error)
                __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 386, __pyx_L7_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __pyx_t_1 = NULL;
                __Pyx_INCREF(__pyx_v_self->dofn_runner);
                __Pyx_GIVEREF(__pyx_v_self->dofn_runner);
                PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_self->dofn_runner);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 386, __pyx_L7_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
            }
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_11apache_beam_7runners_6common_Receiver))))) __PYX_ERR(0, 386, __pyx_L7_error)
            __pyx_t_2 = __pyx_t_4;
            __pyx_t_4 = 0;
          }

          /* "apache_beam/runners/worker/operations.py":384
 *           operation_name=self.name_context.metrics_name())
 * 
 *       self.dofn_receiver = (self.dofn_runner             # <<<<<<<<<<<<<<
 *                             if isinstance(self.dofn_runner, Receiver)
 *                             else DoFnRunnerReceiver(self.dofn_runner))
 */
          __Pyx_GIVEREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_v_self->dofn_receiver);
          __Pyx_DECREF(((PyObject *)__pyx_v_self->dofn_receiver));
          __pyx_v_self->dofn_receiver = ((struct __pyx_obj_11apache_beam_7runners_6common_Receiver *)__pyx_t_2);
          __pyx_t_2 = 0;

          /* "apache_beam/runners/worker/operations.py":388
 *                             else DoFnRunnerReceiver(self.dofn_runner))
 * 
 *       self.dofn_runner.start()             # <<<<<<<<<<<<<<
 * 
 *   def process(self, o):
 */
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dofn_runner, __pyx_n_s_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 388, __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);
            }
          }
          if (__pyx_t_9) {
            __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 388, __pyx_L7_error)
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          } else {
            __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 388, __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":345
 * 
 *   def start(self):
 *     with self.scoped_start_state:             # <<<<<<<<<<<<<<
 *       super(DoOperation, self).start()
 * 
 */
        }
        __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_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        /*except:*/ {
          __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_9) < 0) __PYX_ERR(0, 345, __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, 345, __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, 345, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_19);
          __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_19);
          __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
          if (__pyx_t_18 < 0) __PYX_ERR(0, 345, __pyx_L9_except_error)
          __pyx_t_16 = ((!(__pyx_t_18 != 0)) != 0);
          if (__pyx_t_16) {
            __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, 345, __pyx_L9_except_error)
          }
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          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__33, NULL);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 345, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        goto __pyx_L6;
      }
      __pyx_L6:;
    }
    goto __pyx_L23;
    __pyx_L3_error:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L1_error;
    __pyx_L23:;
  }

  /* "apache_beam/runners/worker/operations.py":344
 *           view_class, view_options, sideinputs.EmulatedIterable(iterator_fn))
 * 
 *   def start(self):             # <<<<<<<<<<<<<<
 *     with self.scoped_start_state:
 *       super(DoOperation, 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_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __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_output_tag_prefix);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XDECREF(__pyx_v_tag);
  __Pyx_XDECREF(__pyx_v_original_tag);
  __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_6start(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_6start = {"start", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_6start, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_6start(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_5start(((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_5start(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;
  __Pyx_TraceFrameInit(__pyx_codeobj__31)
  __Pyx_RefNannySetupContext("start", 0);
  __Pyx_TraceCall("start (wrapper)", __pyx_f[0], 344, 0, __PYX_ERR(0, 344, __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, 344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.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":390
 *       self.dofn_runner.start()
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     with self.scoped_process_state:
 *       self.dofn_receiver.receive(o)
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_8process(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_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;
  int __pyx_t_11;
  int __pyx_t_12;
  __Pyx_TraceFrameInit(__pyx_codeobj__34)
  __Pyx_RefNannySetupContext("process", 0);
  __Pyx_TraceCall("process", __pyx_f[0], 390, 0, __PYX_ERR(0, 390, __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_process); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 390, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_8process)) {
      __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);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_o)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 390, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_o)};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 390, __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[2] = {__pyx_t_4, ((PyObject *)__pyx_v_o)};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 390, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 390, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_INCREF(((PyObject *)__pyx_v_o));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_o));
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_o));
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 390, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/runners/worker/operations.py":391
 * 
 *   def process(self, o):
 *     with self.scoped_process_state:             # <<<<<<<<<<<<<<
 *       self.dofn_receiver.receive(o)
 * 
 */
  /*with:*/ {
    __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_process_state, __pyx_n_s_exit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 391, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __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, 391, __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);
      }
    }
    if (__pyx_t_3) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 391, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 391, __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":392
 *   def process(self, o):
 *     with self.scoped_process_state:
 *       self.dofn_receiver.receive(o)             # <<<<<<<<<<<<<<
 * 
 *   def finish(self):
 */
          __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6common_Receiver *)__pyx_v_self->dofn_receiver->__pyx_vtab)->receive(__pyx_v_self->dofn_receiver, __pyx_v_o, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 392, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "apache_beam/runners/worker/operations.py":391
 * 
 *   def process(self, o):
 *     with self.scoped_process_state:             # <<<<<<<<<<<<<<
 *       self.dofn_receiver.receive(o)
 * 
 */
        }
        __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_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        /*except:*/ {
          __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 391, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_5 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 391, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, NULL);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 391, __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, 391, __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_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, 391, __pyx_L9_except_error)
          }
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          goto __pyx_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__35, NULL);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 391, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        }
        goto __pyx_L6;
      }
      __pyx_L6:;
    }
    goto __pyx_L16;
    __pyx_L3_error:;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L1_error;
    __pyx_L16:;
  }

  /* "apache_beam/runners/worker/operations.py":390
 *       self.dofn_runner.start()
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     with self.scoped_process_state:
 *       self.dofn_receiver.receive(o)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.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_11DoOperation_8process(PyObject *__pyx_v_self, PyObject *__pyx_v_o); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_8process = {"process", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_8process, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_8process(PyObject *__pyx_v_self, PyObject *__pyx_v_o) {
  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, 390, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_7process(((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_7process(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;
  __Pyx_TraceFrameInit(__pyx_codeobj__34)
  __Pyx_RefNannySetupContext("process", 0);
  __Pyx_TraceCall("process (wrapper)", __pyx_f[0], 390, 0, __PYX_ERR(0, 390, __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, 390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":394
 *       self.dofn_receiver.receive(o)
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     with self.scoped_finish_state:
 *       self.dofn_runner.finish()
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_10finish(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;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_t_11;
  __Pyx_TraceFrameInit(__pyx_codeobj__36)
  __Pyx_RefNannySetupContext("finish", 0);
  __Pyx_TraceCall("finish", __pyx_f[0], 394, 0, __PYX_ERR(0, 394, __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_finish); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_10finish)) {
      __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);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 394, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 394, __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;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/runners/worker/operations.py":395
 * 
 *   def finish(self):
 *     with self.scoped_finish_state:             # <<<<<<<<<<<<<<
 *       self.dofn_runner.finish()
 * 
 */
  /*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, 395, __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, 395, __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);
      }
    }
    if (__pyx_t_3) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 395, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 395, __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":396
 *   def finish(self):
 *     with self.scoped_finish_state:
 *       self.dofn_runner.finish()             # <<<<<<<<<<<<<<
 * 
 *   def progress_metrics(self):
 */
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dofn_runner, __pyx_n_s_finish); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 396, __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);
            }
          }
          if (__pyx_t_3) {
            __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 396, __pyx_L7_error)
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          } else {
            __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 396, __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":395
 * 
 *   def finish(self):
 *     with self.scoped_finish_state:             # <<<<<<<<<<<<<<
 *       self.dofn_runner.finish()
 * 
 */
        }
        __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_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        /*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, 395, __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, 395, __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, 395, __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, 395, __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, 395, __pyx_L9_except_error)
          }
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          goto __pyx_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__37, NULL);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 395, __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":394
 *       self.dofn_receiver.receive(o)
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     with self.scoped_finish_state:
 *       self.dofn_runner.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_10finish(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_10finish = {"finish", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_10finish, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_10finish(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_9finish(((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_9finish(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;
  __Pyx_TraceFrameInit(__pyx_codeobj__36)
  __Pyx_RefNannySetupContext("finish", 0);
  __Pyx_TraceCall("finish (wrapper)", __pyx_f[0], 394, 0, __PYX_ERR(0, 394, __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, 394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":398
 *       self.dofn_runner.finish()
 * 
 *   def progress_metrics(self):             # <<<<<<<<<<<<<<
 *     metrics = super(DoOperation, self).progress_metrics()
 *     if self.tagged_receivers:
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_12progress_metrics(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_progress_metrics(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_metrics = NULL;
  PyObject *__pyx_v_tag = NULL;
  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;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  __Pyx_TraceFrameInit(__pyx_codeobj__38)
  __Pyx_RefNannySetupContext("progress_metrics", 0);
  __Pyx_TraceCall("progress_metrics", __pyx_f[0], 398, 0, __PYX_ERR(0, 398, __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_progress_metrics); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 398, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_12progress_metrics)) {
      __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);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 398, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 398, __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;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/runners/worker/operations.py":399
 * 
 *   def progress_metrics(self):
 *     metrics = super(DoOperation, self).progress_metrics()             # <<<<<<<<<<<<<<
 *     if self.tagged_receivers:
 *       metrics.processed_elements.measured.output_element_counts.clear()
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 399, __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, 399, __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_progress_metrics); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 399, __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);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 399, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 399, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_metrics = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":400
 *   def progress_metrics(self):
 *     metrics = super(DoOperation, self).progress_metrics()
 *     if self.tagged_receivers:             # <<<<<<<<<<<<<<
 *       metrics.processed_elements.measured.output_element_counts.clear()
 *       for tag, receiver in self.tagged_receivers.items():
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_self->tagged_receivers); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 400, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "apache_beam/runners/worker/operations.py":401
 *     metrics = super(DoOperation, self).progress_metrics()
 *     if self.tagged_receivers:
 *       metrics.processed_elements.measured.output_element_counts.clear()             # <<<<<<<<<<<<<<
 *       for tag, receiver in self.tagged_receivers.items():
 *         metrics.processed_elements.measured.output_element_counts[
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_metrics, __pyx_n_s_processed_elements); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 401, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_measured); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 401, __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_output_element_counts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 401, __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_clear); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 401, __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);
      }
    }
    if (__pyx_t_2) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 401, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 401, __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":402
 *     if self.tagged_receivers:
 *       metrics.processed_elements.measured.output_element_counts.clear()
 *       for tag, receiver in self.tagged_receivers.items():             # <<<<<<<<<<<<<<
 *         metrics.processed_elements.measured.output_element_counts[
 *             str(tag)] = receiver.opcounter.element_counter.value()
 */
    __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, 402, __pyx_L1_error)
    }
    __pyx_t_3 = __Pyx_dict_iterator(__pyx_v_self->tagged_receivers, 0, __pyx_n_s_items, (&__pyx_t_7), (&__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 402, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_1);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
    while (1) {
      __pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_7, &__pyx_t_6, &__pyx_t_3, &__pyx_t_2, NULL, __pyx_t_8);
      if (unlikely(__pyx_t_9 == 0)) break;
      if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 402, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_XDECREF_SET(__pyx_v_tag, __pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_XDECREF_SET(__pyx_v_receiver, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "apache_beam/runners/worker/operations.py":404
 *       for tag, receiver in self.tagged_receivers.items():
 *         metrics.processed_elements.measured.output_element_counts[
 *             str(tag)] = receiver.opcounter.element_counter.value()             # <<<<<<<<<<<<<<
 *     return metrics
 * 
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_receiver, __pyx_n_s_opcounter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 404, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_element_counter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 404, __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_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 404, __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);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 404, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 404, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "apache_beam/runners/worker/operations.py":403
 *       metrics.processed_elements.measured.output_element_counts.clear()
 *       for tag, receiver in self.tagged_receivers.items():
 *         metrics.processed_elements.measured.output_element_counts[             # <<<<<<<<<<<<<<
 *             str(tag)] = receiver.opcounter.element_counter.value()
 *     return metrics
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_metrics, __pyx_n_s_processed_elements); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 403, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_measured); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 403, __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_output_element_counts); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 403, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "apache_beam/runners/worker/operations.py":404
 *       for tag, receiver in self.tagged_receivers.items():
 *         metrics.processed_elements.measured.output_element_counts[
 *             str(tag)] = receiver.opcounter.element_counter.value()             # <<<<<<<<<<<<<<
 *     return metrics
 * 
 */
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 404, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (unlikely(PyObject_SetItem(__pyx_t_3, __pyx_t_4, __pyx_t_2) < 0)) __PYX_ERR(0, 403, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __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":400
 *   def progress_metrics(self):
 *     metrics = super(DoOperation, self).progress_metrics()
 *     if self.tagged_receivers:             # <<<<<<<<<<<<<<
 *       metrics.processed_elements.measured.output_element_counts.clear()
 *       for tag, receiver in self.tagged_receivers.items():
 */
  }

  /* "apache_beam/runners/worker/operations.py":405
 *         metrics.processed_elements.measured.output_element_counts[
 *             str(tag)] = receiver.opcounter.element_counter.value()
 *     return metrics             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_metrics);
  __pyx_r = __pyx_v_metrics;
  goto __pyx_L0;

  /* "apache_beam/runners/worker/operations.py":398
 *       self.dofn_runner.finish()
 * 
 *   def progress_metrics(self):             # <<<<<<<<<<<<<<
 *     metrics = super(DoOperation, self).progress_metrics()
 *     if self.tagged_receivers:
 */

  /* function 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.progress_metrics", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_metrics);
  __Pyx_XDECREF(__pyx_v_tag);
  __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_11DoOperation_12progress_metrics(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_12progress_metrics = {"progress_metrics", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_12progress_metrics, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_12progress_metrics(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("progress_metrics (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_11progress_metrics(((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_11progress_metrics(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;
  __Pyx_TraceFrameInit(__pyx_codeobj__38)
  __Pyx_RefNannySetupContext("progress_metrics", 0);
  __Pyx_TraceCall("progress_metrics (wrapper)", __pyx_f[0], 398, 0, __PYX_ERR(0, 398, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_progress_metrics(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.progress_metrics", __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 bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.dofn_receiver, self.dofn_runner, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, self.side_input_maps, self.spec, self.state_sampler, self.step_name, self.tagged_receivers)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_14__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_14__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_14__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_14__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_13__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_13__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self) {
  int __pyx_v_use_setstate;
  PyObject *__pyx_v_state = NULL;
  PyObject *__pyx_v__dict = 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;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__39)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error));

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     cdef bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.dofn_receiver, self.dofn_runner, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, self.side_input_maps, self.spec, self.state_sampler, self.step_name, self.tagged_receivers)             # <<<<<<<<<<<<<<
 *     _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, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(18); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.consumers);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.consumers);
  PyTuple_SET_ITEM(__pyx_t_2, 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_2, 1, __pyx_v_self->__pyx_base.counter_factory);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->dofn_receiver));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->dofn_receiver));
  PyTuple_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_v_self->dofn_receiver));
  __Pyx_INCREF(__pyx_v_self->dofn_runner);
  __Pyx_GIVEREF(__pyx_v_self->dofn_runner);
  PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_self->dofn_runner);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.metrics_container);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.metrics_container);
  PyTuple_SET_ITEM(__pyx_t_2, 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_2, 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_2, 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_2, 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_2, 9, __pyx_v_self->__pyx_base.scoped_finish_state);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.scoped_metrics_container));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.scoped_metrics_container));
  PyTuple_SET_ITEM(__pyx_t_2, 10, ((PyObject *)__pyx_v_self->__pyx_base.scoped_metrics_container));
  __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_2, 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_2, 12, __pyx_v_self->__pyx_base.scoped_start_state);
  __Pyx_INCREF(__pyx_v_self->side_input_maps);
  __Pyx_GIVEREF(__pyx_v_self->side_input_maps);
  PyTuple_SET_ITEM(__pyx_t_2, 13, __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_2, 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_2, 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_2, 16, __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_2, 17, __pyx_v_self->tagged_receivers);
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":4
 *     cdef bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.dofn_receiver, self.dofn_runner, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, self.side_input_maps, self.spec, self.state_sampler, self.step_name, self.tagged_receivers)
 *     _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, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":5
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.dofn_receiver, self.dofn_runner, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, self.side_input_maps, self.spec, self.state_sampler, self.step_name, self.tagged_receivers)
 *     _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)":6
 *     _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, 6, __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, 6, __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)":7
 *     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.dofn_receiver is not None or self.dofn_runner 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_metrics_container 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
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":5
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.dofn_receiver, self.dofn_runner, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, self.side_input_maps, self.spec, self.state_sampler, self.step_name, self.tagged_receivers)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":9
 *         use_setstate = True
 *     else:
 *         use_setstate = self.consumers is not None or self.counter_factory is not None or self.dofn_receiver is not None or self.dofn_runner 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_metrics_container 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             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_DoOperation, (type(self), 0x36f06cd, None), state
 */
  /*else*/ {
    __pyx_t_3 = (__pyx_v_self->__pyx_base.consumers != 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.counter_factory != 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->dofn_receiver) != 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->dofn_runner != 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.metrics_container != 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.name_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 = (__pyx_v_self->__pyx_base.operation_name != 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.receivers != ((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.scoped_finish_state != Py_None);
    __pyx_t_5 = (__pyx_t_3 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (((PyObject *)__pyx_v_self->__pyx_base.scoped_metrics_container) != 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.scoped_process_state != 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.scoped_start_state != 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->side_input_maps != 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.spec != 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.state_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.step_name != 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->tagged_receivers != 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)":10
 *     else:
 *         use_setstate = self.consumers is not None or self.counter_factory is not None or self.dofn_receiver is not None or self.dofn_runner 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_metrics_container 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
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_DoOperation, (type(self), 0x36f06cd, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":11
 *         use_setstate = self.consumers is not None or self.counter_factory is not None or self.dofn_receiver is not None or self.dofn_runner 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_metrics_container 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
 *     if use_setstate:
 *         return __pyx_unpickle_DoOperation, (type(self), 0x36f06cd, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_DoOperation, (type(self), 0x36f06cd, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_DoOperation); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 11, __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_57607885);
    __Pyx_GIVEREF(__pyx_int_57607885);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_57607885);
    __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, 11, __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)":10
 *     else:
 *         use_setstate = self.consumers is not None or self.counter_factory is not None or self.dofn_receiver is not None or self.dofn_runner 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_metrics_container 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
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_DoOperation, (type(self), 0x36f06cd, None), state
 *     else:
 */
  }

  /* "(tree fragment)":13
 *         return __pyx_unpickle_DoOperation, (type(self), 0x36f06cd, None), state
 *     else:
 *         return __pyx_unpickle_DoOperation, (type(self), 0x36f06cd, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_DoOperation__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_DoOperation); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __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_57607885);
    __Pyx_GIVEREF(__pyx_int_57607885);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_57607885);
    __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, 13, __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 bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.dofn_receiver, self.dofn_runner, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, self.side_input_maps, self.spec, self.state_sampler, self.step_name, self.tagged_receivers)
 */

  /* 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.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)":14
 *     else:
 *         return __pyx_unpickle_DoOperation, (type(self), 0x36f06cd, 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_16__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_16__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_16__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_16__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_15__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_15__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;
  __Pyx_TraceFrameInit(__pyx_codeobj__40)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[2], 14, 0, __PYX_ERR(2, 14, __pyx_L1_error));

  /* "(tree fragment)":15
 *         return __pyx_unpickle_DoOperation, (type(self), 0x36f06cd, 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)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 15, __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, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_DoOperation, (type(self), 0x36f06cd, 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":410
 * class DoFnRunnerReceiver(Receiver):
 * 
 *   def __init__(self, dofn_runner):             # <<<<<<<<<<<<<<
 *     self.dofn_runner = dofn_runner
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_18DoFnRunnerReceiver_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_18DoFnRunnerReceiver_1__init__ = {"__init__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_18DoFnRunnerReceiver_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_18DoFnRunnerReceiver_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_dofn_runner = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_dofn_runner,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_dofn_runner)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 410, __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, 410, __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_dofn_runner = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 410, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoFnRunnerReceiver.__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_18DoFnRunnerReceiver___init__(__pyx_self, __pyx_v_self, __pyx_v_dofn_runner);

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_18DoFnRunnerReceiver___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_dofn_runner) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__41)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 410, 0, __PYX_ERR(0, 410, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":411
 * 
 *   def __init__(self, dofn_runner):
 *     self.dofn_runner = dofn_runner             # <<<<<<<<<<<<<<
 * 
 *   def receive(self, windowed_value):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dofn_runner, __pyx_v_dofn_runner) < 0) __PYX_ERR(0, 411, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":410
 * class DoFnRunnerReceiver(Receiver):
 * 
 *   def __init__(self, dofn_runner):             # <<<<<<<<<<<<<<
 *     self.dofn_runner = dofn_runner
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoFnRunnerReceiver.__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":413
 *     self.dofn_runner = dofn_runner
 * 
 *   def receive(self, windowed_value):             # <<<<<<<<<<<<<<
 *     self.dofn_runner.process(windowed_value)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_18DoFnRunnerReceiver_3receive(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_18DoFnRunnerReceiver_3receive = {"receive", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_18DoFnRunnerReceiver_3receive, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_18DoFnRunnerReceiver_3receive(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_windowed_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("receive (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_windowed_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_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_windowed_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("receive", 1, 2, 2, 1); __PYX_ERR(0, 413, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "receive") < 0)) __PYX_ERR(0, 413, __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_windowed_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("receive", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 413, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoFnRunnerReceiver.receive", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_18DoFnRunnerReceiver_2receive(__pyx_self, __pyx_v_self, __pyx_v_windowed_value);

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_18DoFnRunnerReceiver_2receive(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_windowed_value) {
  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;
  __Pyx_TraceFrameInit(__pyx_codeobj__42)
  __Pyx_RefNannySetupContext("receive", 0);
  __Pyx_TraceCall("receive", __pyx_f[0], 413, 0, __PYX_ERR(0, 413, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":414
 * 
 *   def receive(self, windowed_value):
 *     self.dofn_runner.process(windowed_value)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dofn_runner); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_process); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && 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);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_windowed_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 414, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_windowed_value};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 414, __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[2] = {__pyx_t_2, __pyx_v_windowed_value};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 414, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 414, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_INCREF(__pyx_v_windowed_value);
      __Pyx_GIVEREF(__pyx_v_windowed_value);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_windowed_value);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 414, __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":413
 *     self.dofn_runner = dofn_runner
 * 
 *   def receive(self, windowed_value):             # <<<<<<<<<<<<<<
 *     self.dofn_runner.process(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.DoFnRunnerReceiver.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":420
 *   """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_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, 420, __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, 420, __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, 420, __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, 420, __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, 420, __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 *);
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 420, 0, __PYX_ERR(0, 420, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":421
 * 
 *   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, 421, __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, 421, __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, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "apache_beam/runners/worker/operations.py":422
 *   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_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, 421, __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, 421, __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, 421, __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, 421, __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":426
 *     # and therefore the code to handle the extra args/kwargs is simpler than for
 *     # the DoFn's of ParDo.
 *     fn, args, kwargs = pickler.loads(self.spec.serialized_fn)[:3]             # <<<<<<<<<<<<<<
 *     self.phased_combine_fn = (
 *         PhasedCombineFnExecutor(self.spec.phase, fn, args, kwargs))
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_pickler); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 426, __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, 426, __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, 426, __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);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 426, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 426, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 426, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 426, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 426, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 3, NULL, NULL, &__pyx_slice__43, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 426, __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, 426, __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_6 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 2); 
    } else {
      __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 2); 
    }
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_2);
    #else
    __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 426, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 426, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 426, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_3 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 426, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext;
    index = 0; __pyx_t_1 = __pyx_t_7(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    index = 1; __pyx_t_6 = __pyx_t_7(__pyx_t_3); if (unlikely(!__pyx_t_6)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_6);
    index = 2; __pyx_t_2 = __pyx_t_7(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_3), 3) < 0) __PYX_ERR(0, 426, __pyx_L1_error)
    __pyx_t_7 = NULL;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 426, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_fn = __pyx_t_1;
  __pyx_t_1 = 0;
  __pyx_v_args = __pyx_t_6;
  __pyx_t_6 = 0;
  __pyx_v_kwargs = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":428
 *     fn, args, kwargs = pickler.loads(self.spec.serialized_fn)[:3]
 *     self.phased_combine_fn = (
 *         PhasedCombineFnExecutor(self.spec.phase, fn, args, kwargs))             # <<<<<<<<<<<<<<
 * 
 *   def process(self, o):
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_PhasedCombineFnExecutor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.spec, __pyx_n_s_phase); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_1, __pyx_t_6, __pyx_v_fn, __pyx_v_args, __pyx_v_kwargs};
    __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 4+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 428, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_1, __pyx_t_6, __pyx_v_fn, __pyx_v_args, __pyx_v_kwargs};
    __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 4+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 428, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  {
    __pyx_t_3 = PyTuple_New(4+__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__pyx_t_1) {
      __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __pyx_t_1 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_4, __pyx_t_6);
    __Pyx_INCREF(__pyx_v_fn);
    __Pyx_GIVEREF(__pyx_v_fn);
    PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_4, __pyx_v_fn);
    __Pyx_INCREF(__pyx_v_args);
    __Pyx_GIVEREF(__pyx_v_args);
    PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_4, __pyx_v_args);
    __Pyx_INCREF(__pyx_v_kwargs);
    __Pyx_GIVEREF(__pyx_v_kwargs);
    PyTuple_SET_ITEM(__pyx_t_3, 3+__pyx_t_4, __pyx_v_kwargs);
    __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":427
 *     # 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":420
 *   """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":430
 *         PhasedCombineFnExecutor(self.spec.phase, fn, args, kwargs))
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     with self.scoped_process_state:
 *       if self.debug_logging_enabled:
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_3process(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;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_t_11;
  PyObject *(*__pyx_t_12)(PyObject *);
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  __Pyx_TraceFrameInit(__pyx_codeobj__44)
  __Pyx_RefNannySetupContext("process", 0);
  __Pyx_TraceCall("process", __pyx_f[0], 430, 0, __PYX_ERR(0, 430, __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_process); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 430, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_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);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_o)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 430, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_o)};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 430, __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[2] = {__pyx_t_4, ((PyObject *)__pyx_v_o)};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 430, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 430, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_INCREF(((PyObject *)__pyx_v_o));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_o));
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_o));
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 430, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/runners/worker/operations.py":431
 * 
 *   def process(self, o):
 *     with self.scoped_process_state:             # <<<<<<<<<<<<<<
 *       if self.debug_logging_enabled:
 *         logging.debug('Processing [%s] in %s', o, self)
 */
  /*with:*/ {
    __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_process_state, __pyx_n_s_exit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 431, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __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, 431, __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);
      }
    }
    if (__pyx_t_3) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 431, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 431, __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":432
 *   def process(self, o):
 *     with self.scoped_process_state:
 *       if self.debug_logging_enabled:             # <<<<<<<<<<<<<<
 *         logging.debug('Processing [%s] in %s', o, self)
 *       key, values = o.value
 */
          __pyx_t_10 = (__pyx_v_self->__pyx_base.debug_logging_enabled != 0);
          if (__pyx_t_10) {

            /* "apache_beam/runners/worker/operations.py":433
 *     with self.scoped_process_state:
 *       if self.debug_logging_enabled:
 *         logging.debug('Processing [%s] in %s', o, self)             # <<<<<<<<<<<<<<
 *       key, values = o.value
 *       self.output(
 */
            __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_logging); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 433, __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, 433, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_2 = NULL;
            __pyx_t_11 = 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_11 = 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_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 433, __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_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 433, __pyx_L7_error)
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_GOTREF(__pyx_t_1);
            } else
            #endif
            {
              __pyx_t_5 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 433, __pyx_L7_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_kp_u_Processing_s_in_s);
              __Pyx_GIVEREF(__pyx_kp_u_Processing_s_in_s);
              PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_11, __pyx_kp_u_Processing_s_in_s);
              __Pyx_INCREF(((PyObject *)__pyx_v_o));
              __Pyx_GIVEREF(((PyObject *)__pyx_v_o));
              PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_11, ((PyObject *)__pyx_v_o));
              __Pyx_INCREF(((PyObject *)__pyx_v_self));
              __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
              PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_11, ((PyObject *)__pyx_v_self));
              __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 433, __pyx_L7_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":432
 *   def process(self, o):
 *     with self.scoped_process_state:
 *       if self.debug_logging_enabled:             # <<<<<<<<<<<<<<
 *         logging.debug('Processing [%s] in %s', o, self)
 *       key, values = o.value
 */
          }

          /* "apache_beam/runners/worker/operations.py":434
 *       if self.debug_logging_enabled:
 *         logging.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, 434, __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_5 = PyTuple_GET_ITEM(sequence, 1); 
            } else {
              __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
              __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
            }
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_5);
            #else
            __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 434, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 434, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_5);
            #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, 434, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __pyx_t_12 = Py_TYPE(__pyx_t_2)->tp_iternext;
            index = 0; __pyx_t_3 = __pyx_t_12(__pyx_t_2); if (unlikely(!__pyx_t_3)) goto __pyx_L14_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_3);
            index = 1; __pyx_t_5 = __pyx_t_12(__pyx_t_2); if (unlikely(!__pyx_t_5)) goto __pyx_L14_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_5);
            if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_2), 2) < 0) __PYX_ERR(0, 434, __pyx_L7_error)
            __pyx_t_12 = 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_12 = NULL;
            if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
            __PYX_ERR(0, 434, __pyx_L7_error)
            __pyx_L15_unpacking_done:;
          }
          __pyx_v_key = __pyx_t_3;
          __pyx_t_3 = 0;
          __pyx_v_values = __pyx_t_5;
          __pyx_t_5 = 0;

          /* "apache_beam/runners/worker/operations.py":436
 *       key, values = o.value
 *       self.output(
 *           o.with_value((key, self.phased_combine_fn.apply(values))))             # <<<<<<<<<<<<<<
 * 
 *   def finish(self):
 */
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->phased_combine_fn, __pyx_n_s_apply); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 436, __pyx_L7_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);
            }
          }
          if (!__pyx_t_3) {
            __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 436, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_1);
          } else {
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_5)) {
              PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_values};
              __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 436, __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_5)) {
              PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_values};
              __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 436, __pyx_L7_error)
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_GOTREF(__pyx_t_1);
            } else
            #endif
            {
              __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 436, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __pyx_t_3 = NULL;
              __Pyx_INCREF(__pyx_v_values);
              __Pyx_GIVEREF(__pyx_v_values);
              PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_values);
              __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 436, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            }
          }
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 436, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_INCREF(__pyx_v_key);
          __Pyx_GIVEREF(__pyx_v_key);
          PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_key);
          __Pyx_GIVEREF(__pyx_t_1);
          PyTuple_SET_ITEM(__pyx_t_5, 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_5, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 436, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

          /* "apache_beam/runners/worker/operations.py":435
 *         logging.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_5 = ((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_5)) __PYX_ERR(0, 435, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

          /* "apache_beam/runners/worker/operations.py":431
 * 
 *   def process(self, o):
 *     with self.scoped_process_state:             # <<<<<<<<<<<<<<
 *       if self.debug_logging_enabled:
 *         logging.debug('Processing [%s] in %s', o, self)
 */
        }
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L12_try_end;
        __pyx_L7_error:;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        /*except:*/ {
          __Pyx_AddTraceback("apache_beam.runners.worker.operations.CombineOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_1, &__pyx_t_2) < 0) __PYX_ERR(0, 431, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_3 = PyTuple_Pack(3, __pyx_t_5, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 431, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 431, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_13);
          __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_13);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          if (__pyx_t_10 < 0) __PYX_ERR(0, 431, __pyx_L9_except_error)
          __pyx_t_14 = ((!(__pyx_t_10 != 0)) != 0);
          if (__pyx_t_14) {
            __Pyx_GIVEREF(__pyx_t_5);
            __Pyx_GIVEREF(__pyx_t_1);
            __Pyx_XGIVEREF(__pyx_t_2);
            __Pyx_ErrRestoreWithState(__pyx_t_5, __pyx_t_1, __pyx_t_2);
            __pyx_t_5 = 0; __pyx_t_1 = 0; __pyx_t_2 = 0; 
            __PYX_ERR(0, 431, __pyx_L9_except_error)
          }
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__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__45, NULL);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 431, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        }
        goto __pyx_L6;
      }
      __pyx_L6:;
    }
    goto __pyx_L19;
    __pyx_L3_error:;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L1_error;
    __pyx_L19:;
  }

  /* "apache_beam/runners/worker/operations.py":430
 *         PhasedCombineFnExecutor(self.spec.phase, fn, args, kwargs))
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     with self.scoped_process_state:
 *       if self.debug_logging_enabled:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.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_3process(PyObject *__pyx_v_self, PyObject *__pyx_v_o); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_16CombineOperation_3process = {"process", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_3process, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_3process(PyObject *__pyx_v_self, PyObject *__pyx_v_o) {
  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, 430, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_16CombineOperation_2process(((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_2process(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;
  __Pyx_TraceFrameInit(__pyx_codeobj__44)
  __Pyx_RefNannySetupContext("process", 0);
  __Pyx_TraceCall("process (wrapper)", __pyx_f[0], 430, 0, __PYX_ERR(0, 430, __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, 430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":438
 *           o.with_value((key, self.phased_combine_fn.apply(values))))
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     logging.debug('Finishing %s', self)
 * 
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_5finish(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;
  __Pyx_TraceFrameInit(__pyx_codeobj__46)
  __Pyx_RefNannySetupContext("finish", 0);
  __Pyx_TraceCall("finish", __pyx_f[0], 438, 0, __PYX_ERR(0, 438, __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_finish); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 438, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_5finish)) {
      __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);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 438, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 438, __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;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/runners/worker/operations.py":439
 * 
 *   def finish(self):
 *     logging.debug('Finishing %s', self)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_logging); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 439, __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, 439, __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, 439, __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, 439, __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, 439, __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, 439, __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":438
 *           o.with_value((key, self.phased_combine_fn.apply(values))))
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     logging.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_5finish(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_16CombineOperation_5finish = {"finish", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_5finish, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_5finish(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_4finish(((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_4finish(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;
  __Pyx_TraceFrameInit(__pyx_codeobj__46)
  __Pyx_RefNannySetupContext("finish", 0);
  __Pyx_TraceCall("finish (wrapper)", __pyx_f[0], 438, 0, __PYX_ERR(0, 438, __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, 438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.metrics_container, self.name_context, self.operation_name, self.phased_combine_fn, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, self.spec, self.state_sampler, self.step_name)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_16CombineOperation_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_7__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_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_16CombineOperation_6__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_6__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self) {
  int __pyx_v_use_setstate;
  PyObject *__pyx_v_state = NULL;
  PyObject *__pyx_v__dict = 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;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__47)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error));

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     cdef bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.metrics_container, self.name_context, self.operation_name, self.phased_combine_fn, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, 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, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(15); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.consumers);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.consumers);
  PyTuple_SET_ITEM(__pyx_t_2, 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_2, 1, __pyx_v_self->__pyx_base.counter_factory);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.metrics_container);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.metrics_container);
  PyTuple_SET_ITEM(__pyx_t_2, 3, __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_2, 4, __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_2, 5, __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_2, 6, __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_2, 7, __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_2, 8, __pyx_v_self->__pyx_base.scoped_finish_state);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.scoped_metrics_container));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.scoped_metrics_container));
  PyTuple_SET_ITEM(__pyx_t_2, 9, ((PyObject *)__pyx_v_self->__pyx_base.scoped_metrics_container));
  __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_2, 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_2, 11, __pyx_v_self->__pyx_base.scoped_start_state);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.spec);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.spec);
  PyTuple_SET_ITEM(__pyx_t_2, 12, __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_2, 13, __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_2, 14, __pyx_v_self->__pyx_base.step_name);
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":4
 *     cdef bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.metrics_container, self.name_context, self.operation_name, self.phased_combine_fn, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, self.spec, self.state_sampler, 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, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":5
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.metrics_container, self.name_context, self.operation_name, self.phased_combine_fn, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, 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_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":6
 *     _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, 6, __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, 6, __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)":7
 *     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.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_metrics_container 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)":5
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.metrics_container, self.name_context, self.operation_name, self.phased_combine_fn, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, 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)":9
 *         use_setstate = True
 *     else:
 *         use_setstate = self.consumers is not None or self.counter_factory 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_metrics_container 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), 0xdd72a47, None), state
 */
  /*else*/ {
    __pyx_t_3 = (__pyx_v_self->__pyx_base.consumers != 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.counter_factory != 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.metrics_container != 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.name_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 = (__pyx_v_self->__pyx_base.operation_name != 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->phased_combine_fn != Py_None);
    __pyx_t_3 = (__pyx_t_5 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_4 = __pyx_t_3;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_3 = (__pyx_v_self->__pyx_base.receivers != ((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.scoped_finish_state != 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.scoped_metrics_container) != 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.scoped_process_state != 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.scoped_start_state != 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.spec != 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.state_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.step_name != Py_None);
    __pyx_t_3 = (__pyx_t_5 != 0);
    __pyx_t_4 = __pyx_t_3;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":10
 *     else:
 *         use_setstate = self.consumers is not None or self.counter_factory 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_metrics_container 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), 0xdd72a47, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":11
 *         use_setstate = self.consumers is not None or self.counter_factory 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_metrics_container 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), 0xdd72a47, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_CombineOperation, (type(self), 0xdd72a47, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_CombineOperation); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 11, __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_232204871);
    __Pyx_GIVEREF(__pyx_int_232204871);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_232204871);
    __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, 11, __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)":10
 *     else:
 *         use_setstate = self.consumers is not None or self.counter_factory 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_metrics_container 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), 0xdd72a47, None), state
 *     else:
 */
  }

  /* "(tree fragment)":13
 *         return __pyx_unpickle_CombineOperation, (type(self), 0xdd72a47, None), state
 *     else:
 *         return __pyx_unpickle_CombineOperation, (type(self), 0xdd72a47, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_CombineOperation__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_CombineOperation); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __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_232204871);
    __Pyx_GIVEREF(__pyx_int_232204871);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_232204871);
    __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, 13, __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 bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.metrics_container, self.name_context, self.operation_name, self.phased_combine_fn, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, self.spec, self.state_sampler, self.step_name)
 */

  /* 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.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)":14
 *     else:
 *         return __pyx_unpickle_CombineOperation, (type(self), 0xdd72a47, 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_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_16CombineOperation_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_9__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_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_16CombineOperation_8__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_8__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;
  __Pyx_TraceFrameInit(__pyx_codeobj__48)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[2], 14, 0, __PYX_ERR(2, 14, __pyx_L1_error));

  /* "(tree fragment)":15
 *         return __pyx_unpickle_CombineOperation, (type(self), 0xdd72a47, 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)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 15, __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, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_CombineOperation, (type(self), 0xdd72a47, 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":442
 * 
 * 
 * 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_1create_pgbk_op(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_1create_pgbk_op = {"create_pgbk_op", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_1create_pgbk_op, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_1create_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;
  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, 442, __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, 442, __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, 442, __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, 442, __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, 442, __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_create_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_create_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;
  __Pyx_TraceFrameInit(__pyx_codeobj__49)
  __Pyx_RefNannySetupContext("create_pgbk_op", 0);
  __Pyx_TraceCall("create_pgbk_op", __pyx_f[0], 442, 0, __PYX_ERR(0, 442, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":443
 * 
 * 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, 443, __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, 443, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "apache_beam/runners/worker/operations.py":444
 * 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, 444, __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, 444, __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":443
 * 
 * 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":446
 *     return PGBKCVOperation(step_name, spec, counter_factory, state_sampler)
 *   else:
 *     return PGBKOperation(step_name, spec, counter_factory, state_sampler)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_PGBKOperation); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 446, __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, 446, __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, 446, __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, 446, __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, 446, __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":442
 * 
 * 
 * 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":457
 *   """
 * 
 *   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)__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;
  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, 457, __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, 457, __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, 457, __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, 457, __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, 457, __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, 457, __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;
  __Pyx_TraceFrameInit(__pyx_codeobj__50)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 457, 0, __PYX_ERR(0, 457, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":458
 * 
 *   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_GetModuleGlobalName(__pyx_n_s_PGBKOperation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 458, __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, 458, __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_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":459
 *   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_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, 458, __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, 458, __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, 458, __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, 458, __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":460
 *     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(!Py_OptimizeFlag)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_spec); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 460, __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, 460, __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, 460, __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, 460, __pyx_L1_error)
    }
  }
  #endif

  /* "apache_beam/runners/worker/operations.py":461
 *         name_context, spec, counter_factory, state_sampler)
 *     assert not self.spec.combine_fn
 *     self.table = collections.defaultdict(list)             # <<<<<<<<<<<<<<
 *     self.size = 0
 *     # TODO(robertwb) Make this configurable.
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_collections); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 461, __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, 461, __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);
    }
  }
  if (!__pyx_t_1) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, ((PyObject *)(&PyList_Type))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 461, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_1, ((PyObject *)(&PyList_Type))};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 461, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_1, ((PyObject *)(&PyList_Type))};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 461, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    {
      __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 461, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = NULL;
      __Pyx_INCREF(((PyObject *)(&PyList_Type)));
      __Pyx_GIVEREF(((PyObject *)(&PyList_Type)));
      PyTuple_SET_ITEM(__pyx_t_2, 0+1, ((PyObject *)(&PyList_Type)));
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 461, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
  }
  __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, 461, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "apache_beam/runners/worker/operations.py":462
 *     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, 462, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":464
 *     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, 464, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":457
 *   """
 * 
 *   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":466
 *     self.max_size = 10 * 1000
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     with self.scoped_process_state:
 *       # TODO(robertwb): Structural (hashable) values.
 */

/* 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)__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;
  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, 466, __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, 466, __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, 466, __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;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  __Pyx_TraceFrameInit(__pyx_codeobj__51)
  __Pyx_RefNannySetupContext("process", 0);
  __Pyx_TraceCall("process", __pyx_f[0], 466, 0, __PYX_ERR(0, 466, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":467
 * 
 *   def process(self, o):
 *     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, 467, __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, 467, __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, 467, __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);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 467, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 467, __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":469
 *     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, 469, __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, 469, __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, 469, __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, 469, __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, 469, __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":470
 *       # 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, 470, __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, 470, __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, 470, __pyx_L7_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "apache_beam/runners/worker/operations.py":471
 *       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, 471, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 471, __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, 471, __pyx_L7_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "apache_beam/runners/worker/operations.py":472
 *       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, 472, __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, 472, __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, 472, __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, 472, __pyx_L7_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (__pyx_t_10) {

            /* "apache_beam/runners/worker/operations.py":473
 *       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, 473, __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, 473, __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, 473, __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); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 473, __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);
              }
            }
            if (!__pyx_t_5) {
              __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 473, __pyx_L7_error)
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              __Pyx_GOTREF(__pyx_t_3);
            } else {
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_4)) {
                PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_1};
                __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 473, __pyx_L7_error)
                __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
                PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_1};
                __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 473, __pyx_L7_error)
                __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              } else
              #endif
              {
                __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 473, __pyx_L7_error)
                __Pyx_GOTREF(__pyx_t_11);
                __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_5); __pyx_t_5 = NULL;
                __Pyx_GIVEREF(__pyx_t_1);
                PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_1);
                __pyx_t_1 = 0;
                __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 473, __pyx_L7_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
              }
            }
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

            /* "apache_beam/runners/worker/operations.py":472
 *       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":467
 * 
 *   def process(self, o):
 *     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_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        /*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_11) < 0) __PYX_ERR(0, 467, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_1 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_4, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 467, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 467, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (__pyx_t_10 < 0) __PYX_ERR(0, 467, __pyx_L9_except_error)
          __pyx_t_13 = ((!(__pyx_t_10 != 0)) != 0);
          if (__pyx_t_13) {
            __Pyx_GIVEREF(__pyx_t_3);
            __Pyx_GIVEREF(__pyx_t_4);
            __Pyx_XGIVEREF(__pyx_t_11);
            __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_4, __pyx_t_11);
            __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_11 = 0; 
            __PYX_ERR(0, 467, __pyx_L9_except_error)
          }
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__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_2) {
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__52, NULL);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 467, __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":466
 *     self.max_size = 10 * 1000
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     with self.scoped_process_state:
 *       # TODO(robertwb): Structural (hashable) 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_11);
  __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":475
 *         self.flush(9 * self.max_size // 10)
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     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;
  __Pyx_TraceFrameInit(__pyx_codeobj__53)
  __Pyx_RefNannySetupContext("finish", 0);
  __Pyx_TraceCall("finish", __pyx_f[0], 475, 0, __PYX_ERR(0, 475, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":476
 * 
 *   def finish(self):
 *     self.flush(0)             # <<<<<<<<<<<<<<
 * 
 *   def flush(self, target):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_flush); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 476, __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":475
 *         self.flush(9 * self.max_size // 10)
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     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_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":478
 *     self.flush(0)
 * 
 *   def flush(self, target):             # <<<<<<<<<<<<<<
 *     limit = self.size - target
 *     for ix, (kw, vs) in enumerate(self.table.items()):
 */

/* 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)__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;
  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, 478, __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, 478, __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, 478, __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_8genexpr2__pyx_v_v = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  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)(PyObject *);
  Py_ssize_t __pyx_t_12;
  PyObject *(*__pyx_t_13)(PyObject *);
  PyObject *__pyx_t_14 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__55)
  __Pyx_RefNannySetupContext("flush", 0);
  __Pyx_TraceCall("flush", __pyx_f[0], 478, 0, __PYX_ERR(0, 478, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":479
 * 
 *   def flush(self, target):
 *     limit = self.size - target             # <<<<<<<<<<<<<<
 *     for ix, (kw, vs) in enumerate(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, 479, __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, 479, __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":480
 *   def flush(self, target):
 *     limit = self.size - target
 *     for ix, (kw, vs) in enumerate(self.table.items()):             # <<<<<<<<<<<<<<
 *       if ix >= limit:
 *         break
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_t_2 = __pyx_int_0;
  __pyx_t_3 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_table); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (unlikely(__pyx_t_6 == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
    __PYX_ERR(0, 480, __pyx_L1_error)
  }
  __pyx_t_7 = __Pyx_dict_iterator(__pyx_t_6, 0, __pyx_n_s_items, (&__pyx_t_4), (&__pyx_t_5)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_XDECREF(__pyx_t_1);
  __pyx_t_1 = __pyx_t_7;
  __pyx_t_7 = 0;
  while (1) {
    __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_4, &__pyx_t_3, &__pyx_t_7, &__pyx_t_6, NULL, __pyx_t_5);
    if (unlikely(__pyx_t_8 == 0)) break;
    if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 480, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_XDECREF_SET(__pyx_v_kw, __pyx_t_7);
    __pyx_t_7 = 0;
    __Pyx_XDECREF_SET(__pyx_v_vs, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_ix, __pyx_t_2);
    __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 480, __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":481
 *     limit = self.size - target
 *     for ix, (kw, vs) in enumerate(self.table.items()):
 *       if ix >= limit:             # <<<<<<<<<<<<<<
 *         break
 *       del self.table[kw]
 */
    __pyx_t_6 = PyObject_RichCompare(__pyx_v_ix, __pyx_v_limit, Py_GE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 481, __pyx_L1_error)
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 481, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_9) {

      /* "apache_beam/runners/worker/operations.py":482
 *     for ix, (kw, vs) in enumerate(self.table.items()):
 *       if ix >= limit:
 *         break             # <<<<<<<<<<<<<<
 *       del self.table[kw]
 *       key, windows = kw
 */
      goto __pyx_L4_break;

      /* "apache_beam/runners/worker/operations.py":481
 *     limit = self.size - target
 *     for ix, (kw, vs) in enumerate(self.table.items()):
 *       if ix >= limit:             # <<<<<<<<<<<<<<
 *         break
 *       del self.table[kw]
 */
    }

    /* "apache_beam/runners/worker/operations.py":483
 *       if ix >= limit:
 *         break
 *       del self.table[kw]             # <<<<<<<<<<<<<<
 *       key, windows = kw
 *       output_value = [v.value[1] for v in vs]
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_table); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 483, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (unlikely(PyObject_DelItem(__pyx_t_6, __pyx_v_kw) < 0)) __PYX_ERR(0, 483, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "apache_beam/runners/worker/operations.py":484
 *         break
 *       del self.table[kw]
 *       key, windows = kw             # <<<<<<<<<<<<<<
 *       output_value = [v.value[1] for v in vs]
 *       windowed_value = WindowedValue(
 */
    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, 484, __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, 484, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 484, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      #endif
    } else {
      Py_ssize_t index = -1;
      __pyx_t_10 = PyObject_GetIter(__pyx_v_kw); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 484, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext;
      index = 0; __pyx_t_6 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      index = 1; __pyx_t_7 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) __PYX_ERR(0, 484, __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, 484, __pyx_L1_error)
      __pyx_L7_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_XDECREF_SET(__pyx_v_windows, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "apache_beam/runners/worker/operations.py":485
 *       del self.table[kw]
 *       key, windows = kw
 *       output_value = [v.value[1] for v in vs]             # <<<<<<<<<<<<<<
 *       windowed_value = WindowedValue(
 *           (key, output_value),
 */
    { /* enter inner scope */
      __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 485, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (likely(PyList_CheckExact(__pyx_v_vs)) || PyTuple_CheckExact(__pyx_v_vs)) {
        __pyx_t_6 = __pyx_v_vs; __Pyx_INCREF(__pyx_t_6); __pyx_t_12 = 0;
        __pyx_t_13 = NULL;
      } else {
        __pyx_t_12 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_vs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 485, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_13 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 485, __pyx_L10_error)
      }
      for (;;) {
        if (likely(!__pyx_t_13)) {
          if (likely(PyList_CheckExact(__pyx_t_6))) {
            if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_6)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_10 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_12); __Pyx_INCREF(__pyx_t_10); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 485, __pyx_L10_error)
            #else
            __pyx_t_10 = PySequence_ITEM(__pyx_t_6, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 485, __pyx_L10_error)
            __Pyx_GOTREF(__pyx_t_10);
            #endif
          } else {
            if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_12); __Pyx_INCREF(__pyx_t_10); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 485, __pyx_L10_error)
            #else
            __pyx_t_10 = PySequence_ITEM(__pyx_t_6, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 485, __pyx_L10_error)
            __Pyx_GOTREF(__pyx_t_10);
            #endif
          }
        } else {
          __pyx_t_10 = __pyx_t_13(__pyx_t_6);
          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, 485, __pyx_L10_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_10);
        }
        __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_v, __pyx_t_10);
        __pyx_t_10 = 0;
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr2__pyx_v_v, __pyx_n_s_value); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 485, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_14 = __Pyx_GetItemInt(__pyx_t_10, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 485, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_14))) __PYX_ERR(0, 485, __pyx_L10_error)
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_v); __pyx_8genexpr2__pyx_v_v = 0;
      goto __pyx_L13_exit_scope;
      __pyx_L10_error:;
      __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_v); __pyx_8genexpr2__pyx_v_v = 0;
      goto __pyx_L1_error;
      __pyx_L13_exit_scope:;
    } /* exit inner scope */
    __Pyx_XDECREF_SET(__pyx_v_output_value, ((PyObject*)__pyx_t_7));
    __pyx_t_7 = 0;

    /* "apache_beam/runners/worker/operations.py":487
 *       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_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 487, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_v_key);
    __Pyx_GIVEREF(__pyx_v_key);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_key);
    __Pyx_INCREF(__pyx_v_output_value);
    __Pyx_GIVEREF(__pyx_v_output_value);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_output_value);

    /* "apache_beam/runners/worker/operations.py":488
 *       windowed_value = WindowedValue(
 *           (key, output_value),
 *           vs[0].timestamp, windows)             # <<<<<<<<<<<<<<
 *       self.output(windowed_value)
 * 
 */
    __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_vs, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 488, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_timestamp); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 488, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "apache_beam/runners/worker/operations.py":486
 *       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(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 486, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_14);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_14);
    __Pyx_INCREF(__pyx_v_windows);
    __Pyx_GIVEREF(__pyx_v_windows);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_windows);
    __pyx_t_7 = 0;
    __pyx_t_14 = 0;
    __pyx_t_14 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue), __pyx_t_6, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 486, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF_SET(__pyx_v_windowed_value, ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_t_14));
    __pyx_t_14 = 0;

    /* "apache_beam/runners/worker/operations.py":489
 *           (key, output_value),
 *           vs[0].timestamp, windows)
 *       self.output(windowed_value)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_output); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 489, __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);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_14 = __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_windowed_value)); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 489, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, ((PyObject *)__pyx_v_windowed_value)};
        __pyx_t_14 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 489, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_14);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, ((PyObject *)__pyx_v_windowed_value)};
        __pyx_t_14 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 489, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_14);
      } else
      #endif
      {
        __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 489, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_INCREF(((PyObject *)__pyx_v_windowed_value));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_windowed_value));
        PyTuple_SET_ITEM(__pyx_t_10, 0+1, ((PyObject *)__pyx_v_windowed_value));
        __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 489, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  }
  __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":478
 *     self.flush(0)
 * 
 *   def flush(self, target):             # <<<<<<<<<<<<<<
 *     limit = self.size - target
 *     for ix, (kw, vs) in enumerate(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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_14);
  __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_8genexpr2__pyx_v_v);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name_context = 0;
  PyObject *__pyx_v_spec = 0;
  PyObject *__pyx_v_counter_factory = 0;
  PyObject *__pyx_v_state_sampler = 0;
  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, 494, __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, 494, __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, 494, __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, 494, __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, 494, __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);

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

/* "apache_beam/runners/worker/operations.py":506
 *       # Old versions of the SDK have CombineFns that don't implement add_input.
 *       self.combine_fn_add_input = (
 *           lambda a, e: self.combine_fn.add_inputs(a, [e]))             # <<<<<<<<<<<<<<
 *     else:
 *       self.combine_fn_add_input = self.combine_fn.add_input
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_8__init___lambda1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_8__init___lambda1 = {"lambda1", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_8__init___lambda1, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_8__init___lambda1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_a = 0;
  PyObject *__pyx_v_e = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_e,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_a)) != 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_e)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("lambda1", 1, 2, 2, 1); __PYX_ERR(0, 506, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lambda1") < 0)) __PYX_ERR(0, 506, __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_a = values[0];
    __pyx_v_e = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lambda1", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 506, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.__init__.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_lambda_funcdef_lambda1(__pyx_self, __pyx_v_a, __pyx_v_e);

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

static PyObject *__pyx_lambda_funcdef_lambda1(PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_e) {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__ *__pyx_cur_scope;
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__ *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("lambda1", 0);
  __pyx_outer_scope = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__ *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_TraceCall("lambda1", __pyx_f[0], 506, 0, __PYX_ERR(0, 506, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 506, __pyx_L1_error) }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->combine_fn, __pyx_n_s_add_inputs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_e);
  __Pyx_GIVEREF(__pyx_v_e);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_e);
  __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[3] = {__pyx_t_4, __pyx_v_a, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __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[3] = {__pyx_t_4, __pyx_v_a, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __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(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 506, __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_a);
    __Pyx_GIVEREF(__pyx_v_a);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_a);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_3);
    __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, 506, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function 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.PGBKCVOperation.__init__.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":494
 * class PGBKCVOperation(Operation):
 * 
 *   def __init__(self, name_context, spec, counter_factory, state_sampler):             # <<<<<<<<<<<<<<
 *     super(PGBKCVOperation, self).__init__(
 *         name_context, spec, counter_factory, state_sampler)
 */

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) {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__ *__pyx_cur_scope;
  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_t_8;
  int __pyx_t_9;
  long __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  __Pyx_RefNannySetupContext("__init__", 0);
  __pyx_cur_scope = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__ *)__pyx_tp_new_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__(__pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__ *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 494, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("__init__", __pyx_f[0], 494, 0, __PYX_ERR(0, 494, __pyx_L1_error));
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);

  /* "apache_beam/runners/worker/operations.py":495
 * 
 *   def __init__(self, name_context, spec, counter_factory, state_sampler):
 *     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, 495, __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_cur_scope->__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_cur_scope->__pyx_v_self));
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 495, __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, 495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "apache_beam/runners/worker/operations.py":496
 *   def __init__(self, name_context, spec, counter_factory, state_sampler):
 *     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_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, 495, __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, 495, __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, 495, __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, 495, __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":500
 *     # 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)
 *     if (getattr(fn.add_input, 'im_func', None)
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_pickler); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __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, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->__pyx_base.spec, __pyx_n_s_combine_fn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __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);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 500, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 3, NULL, NULL, &__pyx_slice__56, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 500, __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, 500, __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_6 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 2); 
    } else {
      __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 2); 
    }
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_2);
    #else
    __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 500, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_3 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 500, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext;
    index = 0; __pyx_t_1 = __pyx_t_7(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    index = 1; __pyx_t_6 = __pyx_t_7(__pyx_t_3); if (unlikely(!__pyx_t_6)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_6);
    index = 2; __pyx_t_2 = __pyx_t_7(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_3), 3) < 0) __PYX_ERR(0, 500, __pyx_L1_error)
    __pyx_t_7 = NULL;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 500, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_fn = __pyx_t_1;
  __pyx_t_1 = 0;
  __pyx_v_args = __pyx_t_6;
  __pyx_t_6 = 0;
  __pyx_v_kwargs = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":501
 *     # 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)             # <<<<<<<<<<<<<<
 *     if (getattr(fn.add_input, 'im_func', None)
 *         is core.CombineFn.add_input.__func__):
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_curry_combine_fn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_fn, __pyx_v_args, __pyx_v_kwargs};
    __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 501, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_5);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_fn, __pyx_v_args, __pyx_v_kwargs};
    __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 501, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 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, 501, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __pyx_t_6 = 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_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 501, __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_GIVEREF(__pyx_t_5);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_self->combine_fn);
  __Pyx_DECREF(__pyx_cur_scope->__pyx_v_self->combine_fn);
  __pyx_cur_scope->__pyx_v_self->combine_fn = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "apache_beam/runners/worker/operations.py":502
 *     fn, args, kwargs = pickler.loads(self.spec.combine_fn)[:3]
 *     self.combine_fn = curry_combine_fn(fn, args, kwargs)
 *     if (getattr(fn.add_input, 'im_func', None)             # <<<<<<<<<<<<<<
 *         is core.CombineFn.add_input.__func__):
 *       # Old versions of the SDK have CombineFns that don't implement add_input.
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_fn, __pyx_n_s_add_input); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_GetAttr3(__pyx_t_5, __pyx_n_u_im_func, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "apache_beam/runners/worker/operations.py":503
 *     self.combine_fn = curry_combine_fn(fn, args, kwargs)
 *     if (getattr(fn.add_input, 'im_func', None)
 *         is core.CombineFn.add_input.__func__):             # <<<<<<<<<<<<<<
 *       # Old versions of the SDK have CombineFns that don't implement add_input.
 *       self.combine_fn_add_input = (
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_core); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 503, __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, 503, __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_add_input); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_func); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_8 = (__pyx_t_2 == __pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_9 = (__pyx_t_8 != 0);

  /* "apache_beam/runners/worker/operations.py":502
 *     fn, args, kwargs = pickler.loads(self.spec.combine_fn)[:3]
 *     self.combine_fn = curry_combine_fn(fn, args, kwargs)
 *     if (getattr(fn.add_input, 'im_func', None)             # <<<<<<<<<<<<<<
 *         is core.CombineFn.add_input.__func__):
 *       # Old versions of the SDK have CombineFns that don't implement add_input.
 */
  if (__pyx_t_9) {

    /* "apache_beam/runners/worker/operations.py":506
 *       # Old versions of the SDK have CombineFns that don't implement add_input.
 *       self.combine_fn_add_input = (
 *           lambda a, e: self.combine_fn.add_inputs(a, [e]))             # <<<<<<<<<<<<<<
 *     else:
 *       self.combine_fn_add_input = self.combine_fn.add_input
 */
    __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_8__init___lambda1, 0, __pyx_n_s_init___locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "apache_beam/runners/worker/operations.py":505
 *         is core.CombineFn.add_input.__func__):
 *       # Old versions of the SDK have CombineFns that don't implement add_input.
 *       self.combine_fn_add_input = (             # <<<<<<<<<<<<<<
 *           lambda a, e: self.combine_fn.add_inputs(a, [e]))
 *     else:
 */
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_self->combine_fn_add_input);
    __Pyx_DECREF(__pyx_cur_scope->__pyx_v_self->combine_fn_add_input);
    __pyx_cur_scope->__pyx_v_self->combine_fn_add_input = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "apache_beam/runners/worker/operations.py":502
 *     fn, args, kwargs = pickler.loads(self.spec.combine_fn)[:3]
 *     self.combine_fn = curry_combine_fn(fn, args, kwargs)
 *     if (getattr(fn.add_input, 'im_func', None)             # <<<<<<<<<<<<<<
 *         is core.CombineFn.add_input.__func__):
 *       # Old versions of the SDK have CombineFns that don't implement add_input.
 */
    goto __pyx_L5;
  }

  /* "apache_beam/runners/worker/operations.py":508
 *           lambda a, e: self.combine_fn.add_inputs(a, [e]))
 *     else:
 *       self.combine_fn_add_input = self.combine_fn.add_input             # <<<<<<<<<<<<<<
 *     # Optimization for the (known tiny accumulator, often wide keyspace)
 *     # combine functions.
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->combine_fn, __pyx_n_s_add_input); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_self->combine_fn_add_input);
    __Pyx_DECREF(__pyx_cur_scope->__pyx_v_self->combine_fn_add_input);
    __pyx_cur_scope->__pyx_v_self->combine_fn_add_input = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_L5:;

  /* "apache_beam/runners/worker/operations.py":514
 *     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_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_combiners); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_CountCombineFn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_combiners); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_MeanCombineFn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_11 = PyObject_IsInstance(__pyx_v_fn, __pyx_t_2); 
  __pyx_t_12 = (__pyx_t_11 != 0);
  if (!__pyx_t_12) {
  } else {
    __pyx_t_8 = __pyx_t_12;
    goto __pyx_L8_bool_binop_done;
  }
  __pyx_t_12 = PyObject_IsInstance(__pyx_v_fn, __pyx_t_5); 
  __pyx_t_11 = (__pyx_t_12 != 0);
  __pyx_t_8 = __pyx_t_11;
  __pyx_L8_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_11 = (__pyx_t_8 != 0);
  if (!__pyx_t_11) {
  } else {
    __pyx_t_9 = __pyx_t_11;
    goto __pyx_L6_bool_binop_done;
  }

  /* "apache_beam/runners/worker/operations.py":517
 *         # TODO(b/36597732): Replace this 'or' part by adding the 'cy' optimized
 *         # 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_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_core); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_CallableWrapperCombineFn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_11 = PyObject_IsInstance(__pyx_v_fn, __pyx_t_5); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 517, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_8 = (__pyx_t_11 != 0);
  if (__pyx_t_8) {
  } else {
    __pyx_t_9 = __pyx_t_8;
    goto __pyx_L6_bool_binop_done;
  }

  /* "apache_beam/runners/worker/operations.py":518
 *         # 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
 *     self.table = {}
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_fn, __pyx_n_s_fn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_5, __pyx_builtin_min, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 518, __pyx_L1_error)
  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 518, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!__pyx_t_11) {
  } else {
    __pyx_t_8 = __pyx_t_11;
    goto __pyx_L11_bool_binop_done;
  }
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_5, __pyx_builtin_max, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 518, __pyx_L1_error)
  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 518, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!__pyx_t_11) {
  } else {
    __pyx_t_8 = __pyx_t_11;
    goto __pyx_L11_bool_binop_done;
  }
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_5, __pyx_builtin_sum, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 518, __pyx_L1_error)
  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 518, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_8 = __pyx_t_11;
  __pyx_L11_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_11 = (__pyx_t_8 != 0);
  __pyx_t_9 = __pyx_t_11;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_9) {
    __pyx_t_10 = 0xF4240;
  } else {
    __pyx_t_10 = 0x186A0;
  }

  /* "apache_beam/runners/worker/operations.py":512
 *     # 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_cur_scope->__pyx_v_self->max_keys = __pyx_t_10;

  /* "apache_beam/runners/worker/operations.py":519
 *         (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_cur_scope->__pyx_v_self->key_count = 0;

  /* "apache_beam/runners/worker/operations.py":520
 *          fn._fn in (min, max, sum)) else 100 * 1000)  # pylint: disable=protected-access
 *     self.key_count = 0
 *     self.table = {}             # <<<<<<<<<<<<<<
 * 
 *   def process(self, wkv):
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_self->table);
  __Pyx_DECREF(__pyx_cur_scope->__pyx_v_self->table);
  __pyx_cur_scope->__pyx_v_self->table = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

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

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fn);
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/runners/worker/operations.py":522
 *     self.table = {}
 * 
 *   def process(self, wkv):             # <<<<<<<<<<<<<<
 *     with self.scoped_process_state:
 *       key, value = wkv.value
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_3process(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 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  int __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  int __pyx_t_16;
  int __pyx_t_17;
  int __pyx_t_18;
  PyObject *__pyx_t_19 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__57)
  __Pyx_RefNannySetupContext("process", 0);
  __Pyx_TraceCall("process", __pyx_f[0], 522, 0, __PYX_ERR(0, 522, __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_process); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 522, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_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);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_wkv)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 522, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_wkv)};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 522, __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[2] = {__pyx_t_4, ((PyObject *)__pyx_v_wkv)};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 522, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 522, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_INCREF(((PyObject *)__pyx_v_wkv));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_wkv));
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_wkv));
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 522, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/runners/worker/operations.py":523
 * 
 *   def process(self, wkv):
 *     with self.scoped_process_state:             # <<<<<<<<<<<<<<
 *       key, value = wkv.value
 *       # pylint: disable=unidiomatic-typecheck
 */
  /*with:*/ {
    __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_process_state, __pyx_n_s_exit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __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, 523, __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);
      }
    }
    if (__pyx_t_3) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __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":524
 *   def process(self, wkv):
 *     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, 524, __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, 524, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 524, __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_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 524, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __pyx_t_10 = Py_TYPE(__pyx_t_5)->tp_iternext;
            index = 0; __pyx_t_2 = __pyx_t_10(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L13_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_2);
            index = 1; __pyx_t_3 = __pyx_t_10(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L13_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_3);
            if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_5), 2) < 0) __PYX_ERR(0, 524, __pyx_L7_error)
            __pyx_t_10 = NULL;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            goto __pyx_L14_unpacking_done;
            __pyx_L13_unpacking_failed:;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __pyx_t_10 = NULL;
            if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
            __PYX_ERR(0, 524, __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":527
 *       # pylint: disable=unidiomatic-typecheck
 *       # Optimization for the global window case.
 *       if len(wkv.windows) == 1 and type(wkv.windows[0]) is _global_window_type:             # <<<<<<<<<<<<<<
 *         wkey = 0, key
 *       else:
 */
          __pyx_t_1 = __pyx_v_wkv->windows;
          __Pyx_INCREF(__pyx_t_1);
          __pyx_t_12 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 527, __pyx_L7_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_13 = ((__pyx_t_12 == 1) != 0);
          if (__pyx_t_13) {
          } else {
            __pyx_t_11 = __pyx_t_13;
            goto __pyx_L16_bool_binop_done;
          }
          __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_wkv->windows, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 527, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_13 = (((PyObject *)Py_TYPE(__pyx_t_1)) == ((PyObject *)__pyx_v_11apache_beam_7runners_6worker_10operations__global_window_type));
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_14 = (__pyx_t_13 != 0);
          __pyx_t_11 = __pyx_t_14;
          __pyx_L16_bool_binop_done:;
          if (__pyx_t_11) {

            /* "apache_beam/runners/worker/operations.py":528
 *       # Optimization for the global window case.
 *       if len(wkv.windows) == 1 and type(wkv.windows[0]) is _global_window_type:
 *         wkey = 0, key             # <<<<<<<<<<<<<<
 *       else:
 *         wkey = tuple(wkv.windows), key
 */
            __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 528, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_INCREF(__pyx_int_0);
            __Pyx_GIVEREF(__pyx_int_0);
            PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_int_0);
            __Pyx_INCREF(__pyx_v_key);
            __Pyx_GIVEREF(__pyx_v_key);
            PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_key);
            __pyx_v_wkey = ((PyObject*)__pyx_t_1);
            __pyx_t_1 = 0;

            /* "apache_beam/runners/worker/operations.py":527
 *       # pylint: disable=unidiomatic-typecheck
 *       # Optimization for the global window case.
 *       if len(wkv.windows) == 1 and type(wkv.windows[0]) is _global_window_type:             # <<<<<<<<<<<<<<
 *         wkey = 0, key
 *       else:
 */
            goto __pyx_L15;
          }

          /* "apache_beam/runners/worker/operations.py":530
 *         wkey = 0, key
 *       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, 530, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 530, __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 = ((PyObject*)__pyx_t_3);
            __pyx_t_3 = 0;
          }
          __pyx_L15:;

          /* "apache_beam/runners/worker/operations.py":531
 *       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, 531, __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, 531, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_v_entry = __pyx_t_3;
          __pyx_t_3 = 0;

          /* "apache_beam/runners/worker/operations.py":532
 *         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_11 = (__pyx_v_entry == Py_None);
          __pyx_t_14 = (__pyx_t_11 != 0);
          if (__pyx_t_14) {

            /* "apache_beam/runners/worker/operations.py":533
 *       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_14 = ((__pyx_v_self->key_count >= __pyx_v_self->max_keys) != 0);
            if (__pyx_t_14) {

              /* "apache_beam/runners/worker/operations.py":534
 *       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":535
 *         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, 535, __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":537
 *           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])
 */
              __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, 537, __pyx_L7_error)
              }
              __pyx_t_1 = __Pyx_dict_iterator(__pyx_v_self->table, 1, __pyx_n_s_items, (&__pyx_t_15), (&__pyx_t_16)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 537, __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_17 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_15, &__pyx_t_12, &__pyx_t_1, &__pyx_t_2, NULL, __pyx_t_16);
                if (unlikely(__pyx_t_17 == 0)) break;
                if (unlikely(__pyx_t_17 == -1)) __PYX_ERR(0, 537, __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":538
 *           # 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])
 *             self.key_count -= 1
 */
                __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_old_wkeys, __pyx_v_old_wkey); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 538, __pyx_L7_error)

                /* "apache_beam/runners/worker/operations.py":539
 *           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])             # <<<<<<<<<<<<<<
 *             self.key_count -= 1
 *             if self.key_count <= target:
 */
                if (!(likely(PyTuple_CheckExact(__pyx_v_old_wkey))||((__pyx_v_old_wkey) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_old_wkey)->tp_name), 0))) __PYX_ERR(0, 539, __pyx_L7_error)
                __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, 539, __pyx_L7_error)
                __Pyx_GOTREF(__pyx_t_2);
                __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self->__pyx_base.__pyx_vtab)->output_key(__pyx_v_self, ((PyObject*)__pyx_v_old_wkey), __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 539, __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":540
 *             old_wkeys.append(old_wkey)  # Can't mutate while iterating.
 *             self.output_key(old_wkey, old_wvalue[0])
 *             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":541
 *             self.output_key(old_wkey, old_wvalue[0])
 *             self.key_count -= 1
 *             if self.key_count <= target:             # <<<<<<<<<<<<<<
 *               break
 *           for old_wkey in reversed(old_wkeys):
 */
                __pyx_t_14 = ((__pyx_v_self->key_count <= __pyx_v_target) != 0);
                if (__pyx_t_14) {

                  /* "apache_beam/runners/worker/operations.py":542
 *             self.key_count -= 1
 *             if self.key_count <= target:
 *               break             # <<<<<<<<<<<<<<
 *           for old_wkey in reversed(old_wkeys):
 *             del self.table[old_wkey]
 */
                  goto __pyx_L21_break;

                  /* "apache_beam/runners/worker/operations.py":541
 *             self.output_key(old_wkey, old_wvalue[0])
 *             self.key_count -= 1
 *             if self.key_count <= target:             # <<<<<<<<<<<<<<
 *               break
 *           for old_wkey in reversed(old_wkeys):
 */
                }
              }
              __pyx_L21_break:;
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

              /* "apache_beam/runners/worker/operations.py":543
 *             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_15 = PyList_GET_SIZE(__pyx_t_3) - 1;
              for (;;) {
                if (__pyx_t_15 < 0) break;
                if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_3)) break;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_15); __Pyx_INCREF(__pyx_t_1); __pyx_t_15--; if (unlikely(0 < 0)) __PYX_ERR(0, 543, __pyx_L7_error)
                #else
                __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_15); __pyx_t_15--; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 543, __pyx_L7_error)
                __Pyx_GOTREF(__pyx_t_1);
                #endif
                __Pyx_XDECREF_SET(__pyx_v_old_wkey, __pyx_t_1);
                __pyx_t_1 = 0;

                /* "apache_beam/runners/worker/operations.py":544
 *               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, 544, __pyx_L7_error)
                }
                if (unlikely(PyDict_DelItem(__pyx_v_self->table, __pyx_v_old_wkey) < 0)) __PYX_ERR(0, 544, __pyx_L7_error)

                /* "apache_beam/runners/worker/operations.py":543
 *             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":533
 *       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":545
 *           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":548
 *         # 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()]             # <<<<<<<<<<<<<<
 *       entry[0] = self.combine_fn_add_input(entry[0], value)
 * 
 */
            __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->combine_fn, __pyx_n_s_create_accumulator); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 548, __pyx_L7_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);
              }
            }
            if (__pyx_t_2) {
              __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 548, __pyx_L7_error)
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            } else {
              __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 548, __pyx_L7_error)
            }
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 548, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_GIVEREF(__pyx_t_3);
            PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
            __pyx_t_3 = 0;
            __Pyx_INCREF(__pyx_t_1);
            __Pyx_DECREF_SET(__pyx_v_entry, __pyx_t_1);
            if (unlikely(__pyx_v_self->table == Py_None)) {
              PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
              __PYX_ERR(0, 548, __pyx_L7_error)
            }
            if (unlikely(PyDict_SetItem(__pyx_v_self->table, __pyx_v_wkey, __pyx_t_1) < 0)) __PYX_ERR(0, 548, __pyx_L7_error)
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

            /* "apache_beam/runners/worker/operations.py":532
 *         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":549
 *         # mutate when new values are added without searching the cache again.
 *         entry = self.table[wkey] = [self.combine_fn.create_accumulator()]
 *       entry[0] = self.combine_fn_add_input(entry[0], value)             # <<<<<<<<<<<<<<
 * 
 *   def finish(self):
 */
          __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, 549, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_INCREF(__pyx_v_self->combine_fn_add_input);
          __pyx_t_2 = __pyx_v_self->combine_fn_add_input; __pyx_t_5 = NULL;
          __pyx_t_16 = 0;
          if (CYTHON_UNPACK_METHODS && likely(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_16 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_2)) {
            PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_v_value};
            __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 549, __pyx_L7_error)
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 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[3] = {__pyx_t_5, __pyx_t_3, __pyx_v_value};
            __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 549, __pyx_L7_error)
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          } else
          #endif
          {
            __pyx_t_4 = PyTuple_New(2+__pyx_t_16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 549, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_4);
            if (__pyx_t_5) {
              __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
            }
            __Pyx_GIVEREF(__pyx_t_3);
            PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_16, __pyx_t_3);
            __Pyx_INCREF(__pyx_v_value);
            __Pyx_GIVEREF(__pyx_v_value);
            PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_16, __pyx_v_value);
            __pyx_t_3 = 0;
            __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 549, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          }
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(__Pyx_SetItemInt(__pyx_v_entry, 0, __pyx_t_1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) __PYX_ERR(0, 549, __pyx_L7_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "apache_beam/runners/worker/operations.py":523
 * 
 *   def process(self, wkv):
 *     with self.scoped_process_state:             # <<<<<<<<<<<<<<
 *       key, value = wkv.value
 *       # pylint: disable=unidiomatic-typecheck
 */
        }
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L12_try_end;
        __pyx_L7_error:;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        /*except:*/ {
          __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_4) < 0) __PYX_ERR(0, 523, __pyx_L9_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, 523, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_19 = __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_19)) __PYX_ERR(0, 523, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_19);
          __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_19);
          __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
          if (__pyx_t_14 < 0) __PYX_ERR(0, 523, __pyx_L9_except_error)
          __pyx_t_11 = ((!(__pyx_t_14 != 0)) != 0);
          if (__pyx_t_11) {
            __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, 523, __pyx_L9_except_error)
          }
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          goto __pyx_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__58, NULL);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 523, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        }
        goto __pyx_L6;
      }
      __pyx_L6:;
    }
    goto __pyx_L28;
    __pyx_L3_error:;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L1_error;
    __pyx_L28:;
  }

  /* "apache_beam/runners/worker/operations.py":522
 *     self.table = {}
 * 
 *   def process(self, wkv):             # <<<<<<<<<<<<<<
 *     with self.scoped_process_state:
 *       key, value = wkv.value
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.runners.worker.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_3process(PyObject *__pyx_v_self, PyObject *__pyx_v_wkv); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_3process = {"process", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_3process, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_3process(PyObject *__pyx_v_self, PyObject *__pyx_v_wkv) {
  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, 522, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_2process(((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_2process(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;
  __Pyx_TraceFrameInit(__pyx_codeobj__57)
  __Pyx_RefNannySetupContext("process", 0);
  __Pyx_TraceCall("process (wrapper)", __pyx_f[0], 522, 0, __PYX_ERR(0, 522, __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, 522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":551
 *       entry[0] = self.combine_fn_add_input(entry[0], value)
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     for wkey, value in self.table.items():
 *       self.output_key(wkey, value[0])
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_5finish(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;
  __Pyx_TraceFrameInit(__pyx_codeobj__59)
  __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)) {
    __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)__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_5finish)) {
      __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);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 551, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); 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;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/runners/worker/operations.py":552
 * 
 *   def finish(self):
 *     for wkey, value in self.table.items():             # <<<<<<<<<<<<<<
 *       self.output_key(wkey, value[0])
 *     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, 552, __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, 552, __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, 552, __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":553
 *   def finish(self):
 *     for wkey, value in self.table.items():
 *       self.output_key(wkey, value[0])             # <<<<<<<<<<<<<<
 *     self.table = {}
 *     self.key_count = 0
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v_wkey))||((__pyx_v_wkey) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_wkey)->tp_name), 0))) __PYX_ERR(0, 553, __pyx_L1_error)
    __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, 553, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self->__pyx_base.__pyx_vtab)->output_key(__pyx_v_self, ((PyObject*)__pyx_v_wkey), __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 553, __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;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":554
 *     for wkey, value in self.table.items():
 *       self.output_key(wkey, value[0])
 *     self.table = {}             # <<<<<<<<<<<<<<
 *     self.key_count = 0
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __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":555
 *       self.output_key(wkey, value[0])
 *     self.table = {}
 *     self.key_count = 0             # <<<<<<<<<<<<<<
 * 
 *   def output_key(self, wkey, value):
 */
  __pyx_v_self->key_count = 0;

  /* "apache_beam/runners/worker/operations.py":551
 *       entry[0] = self.combine_fn_add_input(entry[0], value)
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     for wkey, value in self.table.items():
 *       self.output_key(wkey, value[0])
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_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_5finish(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_5finish = {"finish", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_5finish, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_5finish(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_4finish(((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_4finish(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;
  __Pyx_TraceFrameInit(__pyx_codeobj__59)
  __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_15PGBKCVOperation_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.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":557
 *     self.key_count = 0
 * 
 *   def output_key(self, wkey, value):             # <<<<<<<<<<<<<<
 *     windows, key = wkey
 *     if windows is 0:
 */

static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_7output_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_value, int __pyx_skip_dispatch) {
  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;
  __Pyx_TraceFrameInit(__pyx_codeobj__60)
  __Pyx_RefNannySetupContext("output_key", 0);
  __Pyx_TraceCall("output_key", __pyx_f[0], 557, 0, __PYX_ERR(0, 557, __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_output_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 557, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_7output_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[3] = {__pyx_t_4, __pyx_v_wkey, __pyx_v_value};
        __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, 557, __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_wkey, __pyx_v_value};
        __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, 557, __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, 557, __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_value);
        __Pyx_GIVEREF(__pyx_v_value);
        PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_value);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 557, __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;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/runners/worker/operations.py":558
 * 
 *   def output_key(self, wkey, value):
 *     windows, key = wkey             # <<<<<<<<<<<<<<
 *     if windows is 0:
 *       self.output(_globally_windowed_value.with_value((key, value)))
 */
  if (likely(__pyx_v_wkey != Py_None)) {
    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, 558, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
    __pyx_t_2 = PyTuple_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, 558, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 558, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 558, __pyx_L1_error)
  }
  __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":559
 *   def output_key(self, wkey, value):
 *     windows, key = wkey
 *     if windows is 0:             # <<<<<<<<<<<<<<
 *       self.output(_globally_windowed_value.with_value((key, value)))
 *     else:
 */
  __pyx_t_7 = (__pyx_v_windows == __pyx_int_0);
  __pyx_t_8 = (__pyx_t_7 != 0);
  if (__pyx_t_8) {

    /* "apache_beam/runners/worker/operations.py":560
 *     windows, key = wkey
 *     if windows is 0:
 *       self.output(_globally_windowed_value.with_value((key, value)))             # <<<<<<<<<<<<<<
 *     else:
 *       self.output(WindowedValue((key, value), windows[0].end, windows))
 */
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 560, __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_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_t_2, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 560, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = ((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_1), 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 560, __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":559
 *   def output_key(self, wkey, value):
 *     windows, key = wkey
 *     if windows is 0:             # <<<<<<<<<<<<<<
 *       self.output(_globally_windowed_value.with_value((key, value)))
 *     else:
 */
    goto __pyx_L3;
  }

  /* "apache_beam/runners/worker/operations.py":562
 *       self.output(_globally_windowed_value.with_value((key, value)))
 *     else:
 *       self.output(WindowedValue((key, value), windows[0].end, windows))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 562, __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_1 = __Pyx_GetItemInt(__pyx_v_windows, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 562, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_end); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 562, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 562, __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_windows);
    __Pyx_GIVEREF(__pyx_v_windows);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_windows);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 562, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __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_3), 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 562, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "apache_beam/runners/worker/operations.py":557
 *     self.key_count = 0
 * 
 *   def output_key(self, wkey, value):             # <<<<<<<<<<<<<<
 *     windows, key = wkey
 *     if windows is 0:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_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_windows);
  __Pyx_XDECREF(__pyx_v_key);
  __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_7output_key(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_7output_key = {"output_key", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_7output_key, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_7output_key(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_wkey = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("output_key (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_wkey,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_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_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("output_key", 1, 2, 2, 1); __PYX_ERR(0, 557, __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, 557, __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_wkey = ((PyObject*)values[0]);
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("output_key", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 557, __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:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_wkey), (&PyTuple_Type), 1, "wkey", 1))) __PYX_ERR(0, 557, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_6output_key(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self), __pyx_v_wkey, __pyx_v_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_15PGBKCVOperation_6output_key(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_wkey, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__60)
  __Pyx_RefNannySetupContext("output_key", 0);
  __Pyx_TraceCall("output_key (wrapper)", __pyx_f[0], 557, 0, __PYX_ERR(0, 557, __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_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":87
 * 
 * cdef class PGBKCVOperation(Operation):
 *   cdef public object combine_fn             # <<<<<<<<<<<<<<
 *   cdef public object combine_fn_add_input
 *   cdef dict table
 */

/* 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
  __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->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
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 87, 0, __PYX_ERR(1, 87, __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
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[1], 87, 0, __PYX_ERR(1, 87, __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":88
 * cdef class PGBKCVOperation(Operation):
 *   cdef public object combine_fn
 *   cdef public object combine_fn_add_input             # <<<<<<<<<<<<<<
 *   cdef dict table
 *   cdef long max_keys
 */

/* 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
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 88, 0, __PYX_ERR(1, 88, __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
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 88, 0, __PYX_ERR(1, 88, __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
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[1], 88, 0, __PYX_ERR(1, 88, __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;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self.combine_fn, self.combine_fn_add_input, self.consumers, self.counter_factory, self.debug_logging_enabled, self.key_count, self.max_keys, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, self.spec, self.state_sampler, self.step_name, self.table)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_9__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_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_15PGBKCVOperation_8__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_8__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self) {
  int __pyx_v_use_setstate;
  PyObject *__pyx_v_state = NULL;
  PyObject *__pyx_v__dict = 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;
  __Pyx_TraceFrameInit(__pyx_codeobj__61)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error));

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     cdef bint use_setstate
 *     state = (self.combine_fn, self.combine_fn_add_input, self.consumers, self.counter_factory, self.debug_logging_enabled, self.key_count, self.max_keys, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, self.spec, self.state_sampler, self.step_name, self.table)             # <<<<<<<<<<<<<<
 *     _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, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_self->key_count); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_self->max_keys); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(19); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_self->combine_fn);
  __Pyx_GIVEREF(__pyx_v_self->combine_fn);
  PyTuple_SET_ITEM(__pyx_t_4, 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_4, 1, __pyx_v_self->combine_fn_add_input);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.consumers);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.consumers);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __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_4, 3, __pyx_v_self->__pyx_base.counter_factory);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 6, __pyx_t_3);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.metrics_container);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.metrics_container);
  PyTuple_SET_ITEM(__pyx_t_4, 7, __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_4, 8, __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_4, 9, __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_4, 10, __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_4, 11, __pyx_v_self->__pyx_base.scoped_finish_state);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.scoped_metrics_container));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.scoped_metrics_container));
  PyTuple_SET_ITEM(__pyx_t_4, 12, ((PyObject *)__pyx_v_self->__pyx_base.scoped_metrics_container));
  __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_4, 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_4, 14, __pyx_v_self->__pyx_base.scoped_start_state);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.spec);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.spec);
  PyTuple_SET_ITEM(__pyx_t_4, 15, __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_4, 16, __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_4, 17, __pyx_v_self->__pyx_base.step_name);
  __Pyx_INCREF(__pyx_v_self->table);
  __Pyx_GIVEREF(__pyx_v_self->table);
  PyTuple_SET_ITEM(__pyx_t_4, 18, __pyx_v_self->table);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "(tree fragment)":4
 *     cdef bint use_setstate
 *     state = (self.combine_fn, self.combine_fn_add_input, self.consumers, self.counter_factory, self.debug_logging_enabled, self.key_count, self.max_keys, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, self.spec, self.state_sampler, self.step_name, self.table)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_4 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v__dict = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":5
 *     state = (self.combine_fn, self.combine_fn_add_input, self.consumers, self.counter_factory, self.debug_logging_enabled, self.key_count, self.max_keys, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, self.spec, self.state_sampler, self.step_name, self.table)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_5 = (__pyx_v__dict != Py_None);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":6
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v__dict);
    __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "(tree fragment)":7
 *     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.consumers is not None or self.counter_factory 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_metrics_container 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
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":5
 *     state = (self.combine_fn, self.combine_fn_add_input, self.consumers, self.counter_factory, self.debug_logging_enabled, self.key_count, self.max_keys, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, self.spec, self.state_sampler, self.step_name, self.table)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":9
 *         use_setstate = True
 *     else:
 *         use_setstate = self.combine_fn is not None or self.combine_fn_add_input is not None or self.consumers is not None or self.counter_factory 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_metrics_container 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             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_PGBKCVOperation, (type(self), 0xe750882, None), state
 */
  /*else*/ {
    __pyx_t_5 = (__pyx_v_self->combine_fn != Py_None);
    __pyx_t_7 = (__pyx_t_5 != 0);
    if (!__pyx_t_7) {
    } else {
      __pyx_t_6 = __pyx_t_7;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_7 = (__pyx_v_self->combine_fn_add_input != Py_None);
    __pyx_t_5 = (__pyx_t_7 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_6 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.consumers != Py_None);
    __pyx_t_7 = (__pyx_t_5 != 0);
    if (!__pyx_t_7) {
    } else {
      __pyx_t_6 = __pyx_t_7;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_7 = (__pyx_v_self->__pyx_base.counter_factory != Py_None);
    __pyx_t_5 = (__pyx_t_7 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_6 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.metrics_container != Py_None);
    __pyx_t_7 = (__pyx_t_5 != 0);
    if (!__pyx_t_7) {
    } else {
      __pyx_t_6 = __pyx_t_7;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_7 = (__pyx_v_self->__pyx_base.name_context != Py_None);
    __pyx_t_5 = (__pyx_t_7 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_6 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.operation_name != Py_None);
    __pyx_t_7 = (__pyx_t_5 != 0);
    if (!__pyx_t_7) {
    } else {
      __pyx_t_6 = __pyx_t_7;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_7 = (__pyx_v_self->__pyx_base.receivers != ((PyObject*)Py_None));
    __pyx_t_5 = (__pyx_t_7 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_6 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.scoped_finish_state != Py_None);
    __pyx_t_7 = (__pyx_t_5 != 0);
    if (!__pyx_t_7) {
    } else {
      __pyx_t_6 = __pyx_t_7;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_7 = (((PyObject *)__pyx_v_self->__pyx_base.scoped_metrics_container) != Py_None);
    __pyx_t_5 = (__pyx_t_7 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_6 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.scoped_process_state != Py_None);
    __pyx_t_7 = (__pyx_t_5 != 0);
    if (!__pyx_t_7) {
    } else {
      __pyx_t_6 = __pyx_t_7;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_7 = (__pyx_v_self->__pyx_base.scoped_start_state != Py_None);
    __pyx_t_5 = (__pyx_t_7 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_6 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.spec != Py_None);
    __pyx_t_7 = (__pyx_t_5 != 0);
    if (!__pyx_t_7) {
    } else {
      __pyx_t_6 = __pyx_t_7;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_7 = (__pyx_v_self->__pyx_base.state_sampler != Py_None);
    __pyx_t_5 = (__pyx_t_7 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_6 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.step_name != Py_None);
    __pyx_t_7 = (__pyx_t_5 != 0);
    if (!__pyx_t_7) {
    } else {
      __pyx_t_6 = __pyx_t_7;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_7 = (__pyx_v_self->table != ((PyObject*)Py_None));
    __pyx_t_5 = (__pyx_t_7 != 0);
    __pyx_t_6 = __pyx_t_5;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_6;
  }
  __pyx_L3:;

  /* "(tree fragment)":10
 *     else:
 *         use_setstate = self.combine_fn is not None or self.combine_fn_add_input is not None or self.consumers is not None or self.counter_factory 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_metrics_container 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
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_PGBKCVOperation, (type(self), 0xe750882, None), state
 *     else:
 */
  __pyx_t_6 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":11
 *         use_setstate = self.combine_fn is not None or self.combine_fn_add_input is not None or self.consumers is not None or self.counter_factory 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_metrics_container 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
 *     if use_setstate:
 *         return __pyx_unpickle_PGBKCVOperation, (type(self), 0xe750882, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_PGBKCVOperation, (type(self), 0xe750882, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_PGBKCVOperation); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_242550914);
    __Pyx_GIVEREF(__pyx_int_242550914);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_242550914);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_4, 2, Py_None);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":10
 *     else:
 *         use_setstate = self.combine_fn is not None or self.combine_fn_add_input is not None or self.consumers is not None or self.counter_factory 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_metrics_container 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
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_PGBKCVOperation, (type(self), 0xe750882, None), state
 *     else:
 */
  }

  /* "(tree fragment)":13
 *         return __pyx_unpickle_PGBKCVOperation, (type(self), 0xe750882, None), state
 *     else:
 *         return __pyx_unpickle_PGBKCVOperation, (type(self), 0xe750882, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_PGBKCVOperation__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_PGBKCVOperation); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_242550914);
    __Pyx_GIVEREF(__pyx_int_242550914);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_242550914);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __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_4);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
    __pyx_t_2 = 0;
    __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self.combine_fn, self.combine_fn_add_input, self.consumers, self.counter_factory, self.debug_logging_enabled, self.key_count, self.max_keys, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, self.spec, self.state_sampler, self.step_name, self.table)
 */

  /* function 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.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)":14
 *     else:
 *         return __pyx_unpickle_PGBKCVOperation, (type(self), 0xe750882, 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_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_11__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_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_15PGBKCVOperation_10__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_10__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;
  __Pyx_TraceFrameInit(__pyx_codeobj__62)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[2], 14, 0, __PYX_ERR(2, 14, __pyx_L1_error));

  /* "(tree fragment)":15
 *         return __pyx_unpickle_PGBKCVOperation, (type(self), 0xe750882, 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)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 15, __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, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_PGBKCVOperation, (type(self), 0xe750882, 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":572
 *   """
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     with self.scoped_process_state:
 *       if self.debug_logging_enabled:
 */

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;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  __Pyx_TraceFrameInit(__pyx_codeobj__63)
  __Pyx_RefNannySetupContext("process", 0);
  __Pyx_TraceCall("process", __pyx_f[0], 572, 0, __PYX_ERR(0, 572, __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_process); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__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);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_o)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 572, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_o)};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 572, __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[2] = {__pyx_t_4, ((PyObject *)__pyx_v_o)};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 572, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 572, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_INCREF(((PyObject *)__pyx_v_o));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_o));
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_o));
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 572, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/runners/worker/operations.py":573
 * 
 *   def process(self, o):
 *     with self.scoped_process_state:             # <<<<<<<<<<<<<<
 *       if self.debug_logging_enabled:
 *         logging.debug('Processing [%s] in %s', o, self)
 */
  /*with:*/ {
    __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_process_state, __pyx_n_s_exit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 573, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __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, 573, __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);
      }
    }
    if (__pyx_t_3) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 573, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 573, __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":574
 *   def process(self, o):
 *     with self.scoped_process_state:
 *       if self.debug_logging_enabled:             # <<<<<<<<<<<<<<
 *         logging.debug('Processing [%s] in %s', o, self)
 *       self.output(o)
 */
          __pyx_t_10 = (__pyx_v_self->__pyx_base.debug_logging_enabled != 0);
          if (__pyx_t_10) {

            /* "apache_beam/runners/worker/operations.py":575
 *     with self.scoped_process_state:
 *       if self.debug_logging_enabled:
 *         logging.debug('Processing [%s] in %s', o, self)             # <<<<<<<<<<<<<<
 *       self.output(o)
 * 
 */
            __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_logging); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 575, __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, 575, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_2 = NULL;
            __pyx_t_11 = 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_11 = 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_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 575, __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_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 575, __pyx_L7_error)
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_GOTREF(__pyx_t_1);
            } else
            #endif
            {
              __pyx_t_5 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 575, __pyx_L7_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_kp_u_Processing_s_in_s);
              __Pyx_GIVEREF(__pyx_kp_u_Processing_s_in_s);
              PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_11, __pyx_kp_u_Processing_s_in_s);
              __Pyx_INCREF(((PyObject *)__pyx_v_o));
              __Pyx_GIVEREF(((PyObject *)__pyx_v_o));
              PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_11, ((PyObject *)__pyx_v_o));
              __Pyx_INCREF(((PyObject *)__pyx_v_self));
              __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
              PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_11, ((PyObject *)__pyx_v_self));
              __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 575, __pyx_L7_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":574
 *   def process(self, o):
 *     with self.scoped_process_state:
 *       if self.debug_logging_enabled:             # <<<<<<<<<<<<<<
 *         logging.debug('Processing [%s] in %s', o, self)
 *       self.output(o)
 */
          }

          /* "apache_beam/runners/worker/operations.py":576
 *       if self.debug_logging_enabled:
 *         logging.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, 576, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "apache_beam/runners/worker/operations.py":573
 * 
 *   def process(self, o):
 *     with self.scoped_process_state:             # <<<<<<<<<<<<<<
 *       if self.debug_logging_enabled:
 *         logging.debug('Processing [%s] in %s', o, self)
 */
        }
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L12_try_end;
        __pyx_L7_error:;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 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_5) < 0) __PYX_ERR(0, 573, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_2 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 573, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_2, NULL);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 573, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (__pyx_t_10 < 0) __PYX_ERR(0, 573, __pyx_L9_except_error)
          __pyx_t_13 = ((!(__pyx_t_10 != 0)) != 0);
          if (__pyx_t_13) {
            __Pyx_GIVEREF(__pyx_t_1);
            __Pyx_GIVEREF(__pyx_t_3);
            __Pyx_XGIVEREF(__pyx_t_5);
            __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_3, __pyx_t_5);
            __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_5 = 0; 
            __PYX_ERR(0, 573, __pyx_L9_except_error)
          }
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          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__64, NULL);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 573, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        }
        goto __pyx_L6;
      }
      __pyx_L6:;
    }
    goto __pyx_L17;
    __pyx_L3_error:;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L1_error;
    __pyx_L17:;
  }

  /* "apache_beam/runners/worker/operations.py":572
 *   """
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     with self.scoped_process_state:
 *       if self.debug_logging_enabled:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.runners.worker.operations.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) {
  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, 572, __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;
  __Pyx_TraceFrameInit(__pyx_codeobj__63)
  __Pyx_RefNannySetupContext("process", 0);
  __Pyx_TraceCall("process (wrapper)", __pyx_f[0], 572, 0, __PYX_ERR(0, 572, __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, 572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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 bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, self.spec, self.state_sampler, self.step_name)
 */

/* 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) {
  int __pyx_v_use_setstate;
  PyObject *__pyx_v_state = NULL;
  PyObject *__pyx_v__dict = 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;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__65)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error));

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     cdef bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, 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, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(14); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.consumers);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.consumers);
  PyTuple_SET_ITEM(__pyx_t_2, 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_2, 1, __pyx_v_self->__pyx_base.counter_factory);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.metrics_container);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.metrics_container);
  PyTuple_SET_ITEM(__pyx_t_2, 3, __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_2, 4, __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_2, 5, __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_2, 6, __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_2, 7, __pyx_v_self->__pyx_base.scoped_finish_state);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.scoped_metrics_container));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.scoped_metrics_container));
  PyTuple_SET_ITEM(__pyx_t_2, 8, ((PyObject *)__pyx_v_self->__pyx_base.scoped_metrics_container));
  __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_2, 9, __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_2, 10, __pyx_v_self->__pyx_base.scoped_start_state);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.spec);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.spec);
  PyTuple_SET_ITEM(__pyx_t_2, 11, __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_2, 12, __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_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)":4
 *     cdef bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, self.spec, self.state_sampler, 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, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":5
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, 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_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":6
 *     _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, 6, __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, 6, __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)":7
 *     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.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_metrics_container 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)":5
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, 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)":9
 *         use_setstate = True
 *     else:
 *         use_setstate = self.consumers is not None or self.counter_factory 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_metrics_container 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), 0x31178f9, None), state
 */
  /*else*/ {
    __pyx_t_3 = (__pyx_v_self->__pyx_base.consumers != 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.counter_factory != 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.metrics_container != 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.name_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 = (__pyx_v_self->__pyx_base.operation_name != 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.receivers != ((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.scoped_finish_state != Py_None);
    __pyx_t_5 = (__pyx_t_3 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (((PyObject *)__pyx_v_self->__pyx_base.scoped_metrics_container) != 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.scoped_process_state != 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.scoped_start_state != 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.spec != 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.state_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->__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)":10
 *     else:
 *         use_setstate = self.consumers is not None or self.counter_factory 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_metrics_container 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), 0x31178f9, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":11
 *         use_setstate = self.consumers is not None or self.counter_factory 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_metrics_container 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), 0x31178f9, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_FlattenOperation, (type(self), 0x31178f9, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_FlattenOperation); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 11, __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_51476729);
    __Pyx_GIVEREF(__pyx_int_51476729);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_51476729);
    __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, 11, __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)":10
 *     else:
 *         use_setstate = self.consumers is not None or self.counter_factory 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_metrics_container 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), 0x31178f9, None), state
 *     else:
 */
  }

  /* "(tree fragment)":13
 *         return __pyx_unpickle_FlattenOperation, (type(self), 0x31178f9, None), state
 *     else:
 *         return __pyx_unpickle_FlattenOperation, (type(self), 0x31178f9, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_FlattenOperation__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_FlattenOperation); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __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_51476729);
    __Pyx_GIVEREF(__pyx_int_51476729);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_51476729);
    __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, 13, __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 bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, self.spec, self.state_sampler, self.step_name)
 */

  /* 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.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)":14
 *     else:
 *         return __pyx_unpickle_FlattenOperation, (type(self), 0x31178f9, 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;
  __Pyx_TraceFrameInit(__pyx_codeobj__66)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[2], 14, 0, __PYX_ERR(2, 14, __pyx_L1_error));

  /* "(tree fragment)":15
 *         return __pyx_unpickle_FlattenOperation, (type(self), 0x31178f9, 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)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 15, __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, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_FlattenOperation, (type(self), 0x31178f9, 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":579
 * 
 * 
 * def create_operation(name_context, spec, counter_factory, step_name,             # <<<<<<<<<<<<<<
 *                      state_sampler, test_shuffle_source=None,
 *                      test_shuffle_sink=None, is_streaming=False):
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_3create_operation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_11apache_beam_7runners_6worker_10operations_2create_operation[] = "Create Operation object for given operation specification.";
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_3create_operation = {"create_operation", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_3create_operation, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_2create_operation};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_3create_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;
  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;
  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":580
 * 
 * def create_operation(name_context, spec, counter_factory, step_name,
 *                      state_sampler, test_shuffle_source=None,             # <<<<<<<<<<<<<<
 *                      test_shuffle_sink=None, is_streaming=False):
 *   """Create Operation object for given operation specification."""
 */
    values[5] = ((PyObject *)((PyObject *)Py_None));

    /* "apache_beam/runners/worker/operations.py":581
 * def create_operation(name_context, spec, counter_factory, step_name,
 *                      state_sampler, test_shuffle_source=None,
 *                      test_shuffle_sink=None, is_streaming=False):             # <<<<<<<<<<<<<<
 *   """Create Operation object for given operation specification."""
 *   if not isinstance(name_context, common.NameContext):
 */
    values[6] = ((PyObject *)((PyObject *)Py_None));
    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, 5, 8, 1); __PYX_ERR(0, 579, __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, 5, 8, 2); __PYX_ERR(0, 579, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_step_name)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("create_operation", 0, 5, 8, 3); __PYX_ERR(0, 579, __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("create_operation", 0, 5, 8, 4); __PYX_ERR(0, 579, __pyx_L3_error)
        }
        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, 579, __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);
        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_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, 5, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 579, __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_2create_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":579
 * 
 * 
 * def create_operation(name_context, spec, counter_factory, step_name,             # <<<<<<<<<<<<<<
 *                      state_sampler, test_shuffle_source=None,
 *                      test_shuffle_sink=None, is_streaming=False):
 */

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

static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_2create_operation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name_context, PyObject *__pyx_v_spec, PyObject *__pyx_v_counter_factory, 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;
  __Pyx_TraceFrameInit(__pyx_codeobj__67)
  __Pyx_RefNannySetupContext("create_operation", 0);
  __Pyx_TraceCall("create_operation", __pyx_f[0], 579, 0, __PYX_ERR(0, 579, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_name_context);

  /* "apache_beam/runners/worker/operations.py":583
 *                      test_shuffle_sink=None, is_streaming=False):
 *   """Create Operation object for given operation specification."""
 *   if not isinstance(name_context, common.NameContext):             # <<<<<<<<<<<<<<
 *     # TODO(BEAM-4028): Remove ad-hoc NameContext once all has been migrated.
 *     name_context = common.DataflowNameContext(step_name=name_context,
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_common); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 583, __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, 583, __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, 583, __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":585
 *   if not isinstance(name_context, common.NameContext):
 *     # TODO(BEAM-4028): Remove ad-hoc NameContext once all has been migrated.
 *     name_context = common.DataflowNameContext(step_name=name_context,             # <<<<<<<<<<<<<<
 *                                               user_name=step_name,
 *                                               system_name=None)
 */
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_common); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 585, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_DataflowNameContext); 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_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 585, __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, 585, __pyx_L1_error)

    /* "apache_beam/runners/worker/operations.py":586
 *     # TODO(BEAM-4028): Remove ad-hoc NameContext once all has been migrated.
 *     name_context = common.DataflowNameContext(step_name=name_context,
 *                                               user_name=step_name,             # <<<<<<<<<<<<<<
 *                                               system_name=None)
 * 
 */
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_user_name, __pyx_v_step_name) < 0) __PYX_ERR(0, 585, __pyx_L1_error)

    /* "apache_beam/runners/worker/operations.py":587
 *     name_context = common.DataflowNameContext(step_name=name_context,
 *                                               user_name=step_name,
 *                                               system_name=None)             # <<<<<<<<<<<<<<
 * 
 *   if isinstance(spec, operation_specs.WorkerRead):
 */
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_system_name, Py_None) < 0) __PYX_ERR(0, 585, __pyx_L1_error)

    /* "apache_beam/runners/worker/operations.py":585
 *   if not isinstance(name_context, common.NameContext):
 *     # TODO(BEAM-4028): Remove ad-hoc NameContext once all has been migrated.
 *     name_context = common.DataflowNameContext(step_name=name_context,             # <<<<<<<<<<<<<<
 *                                               user_name=step_name,
 *                                               system_name=None)
 */
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 585, __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":583
 *                      test_shuffle_sink=None, is_streaming=False):
 *   """Create Operation object for given operation specification."""
 *   if not isinstance(name_context, common.NameContext):             # <<<<<<<<<<<<<<
 *     # TODO(BEAM-4028): Remove ad-hoc NameContext once all has been migrated.
 *     name_context = common.DataflowNameContext(step_name=name_context,
 */
  }

  /* "apache_beam/runners/worker/operations.py":589
 *                                               system_name=None)
 * 
 *   if isinstance(spec, operation_specs.WorkerRead):             # <<<<<<<<<<<<<<
 *     if isinstance(spec.source, iobase.SourceBundle):
 *       op = ReadOperation(
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_operation_specs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 589, __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, 589, __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, 589, __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":590
 * 
 *   if isinstance(spec, operation_specs.WorkerRead):
 *     if isinstance(spec.source, iobase.SourceBundle):             # <<<<<<<<<<<<<<
 *       op = ReadOperation(
 *           name_context, spec, counter_factory, state_sampler)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_spec, __pyx_n_s_source); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 590, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_iobase); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 590, __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, 590, __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, 590, __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":591
 *   if isinstance(spec, operation_specs.WorkerRead):
 *     if isinstance(spec.source, iobase.SourceBundle):
 *       op = ReadOperation(             # <<<<<<<<<<<<<<
 *           name_context, spec, counter_factory, state_sampler)
 *     else:
 */
      __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 591, __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, 591, __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":590
 * 
 *   if isinstance(spec, operation_specs.WorkerRead):
 *     if isinstance(spec.source, iobase.SourceBundle):             # <<<<<<<<<<<<<<
 *       op = ReadOperation(
 *           name_context, spec, counter_factory, state_sampler)
 */
      goto __pyx_L5;
    }

    /* "apache_beam/runners/worker/operations.py":594
 *           name_context, spec, counter_factory, state_sampler)
 *     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, 594, __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, 594, __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, 594, __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":596
 *       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, 595, __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, 595, __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, 595, __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, 595, __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":589
 *                                               system_name=None)
 * 
 *   if isinstance(spec, operation_specs.WorkerRead):             # <<<<<<<<<<<<<<
 *     if isinstance(spec.source, iobase.SourceBundle):
 *       op = ReadOperation(
 */
    goto __pyx_L4;
  }

  /* "apache_beam/runners/worker/operations.py":597
 *       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_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_operation_specs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 597, __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, 597, __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, 597, __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":598
 *           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, 598, __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, 598, __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, 598, __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":600
 *     from dataflow_worker.native_operations import NativeWriteOperation
 *     op = NativeWriteOperation(
 *         name_context, spec, counter_factory, state_sampler)             # <<<<<<<<<<<<<<
 *   elif isinstance(spec, operation_specs.WorkerCombineFn):
 *     op = CombineOperation(
 */
    __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, 599, __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, 599, __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, 599, __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, 599, __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":597
 *       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":601
 *     op = NativeWriteOperation(
 *         name_context, spec, counter_factory, state_sampler)
 *   elif isinstance(spec, operation_specs.WorkerCombineFn):             # <<<<<<<<<<<<<<
 *     op = CombineOperation(
 *         name_context, spec, counter_factory, state_sampler)
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_operation_specs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 601, __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, 601, __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, 601, __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":602
 *         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_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 602, __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, 602, __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":601
 *     op = NativeWriteOperation(
 *         name_context, spec, counter_factory, state_sampler)
 *   elif isinstance(spec, operation_specs.WorkerCombineFn):             # <<<<<<<<<<<<<<
 *     op = CombineOperation(
 *         name_context, spec, counter_factory, state_sampler)
 */
    goto __pyx_L4;
  }

  /* "apache_beam/runners/worker/operations.py":604
 *     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_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_operation_specs); 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_WorkerPartialGroupByKey); 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;
  __pyx_t_4 = PyObject_IsInstance(__pyx_v_spec, __pyx_t_2); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 604, __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":605
 *         name_context, spec, counter_factory, state_sampler)
 *   elif isinstance(spec, operation_specs.WorkerPartialGroupByKey):
 *     op = create_pgbk_op(name_context, spec, counter_factory, state_sampler)             # <<<<<<<<<<<<<<
 *   elif isinstance(spec, operation_specs.WorkerDoFn):
 *     op = DoOperation(name_context, spec, counter_factory, state_sampler)
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_create_pgbk_op); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 605, __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, 605, __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, 605, __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, 605, __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, 605, __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":604
 *     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":606
 *   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_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_operation_specs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 606, __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, 606, __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, 606, __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":607
 *     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, 607, __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, 607, __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":606
 *   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":608
 *   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_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_operation_specs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 608, __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, 608, __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, 608, __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":609
 *     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, spec, counter_factory, state_sampler,
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 609, __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, 609, __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, 609, __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":610
 *   elif isinstance(spec, operation_specs.WorkerGroupingShuffleRead):
 *     from dataflow_worker.shuffle_operations import GroupedShuffleReadOperation
 *     op = GroupedShuffleReadOperation(             # <<<<<<<<<<<<<<
 *         name_context, spec, counter_factory, state_sampler,
 *         shuffle_source=test_shuffle_source)
 */
    __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 610, __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":612
 *     op = GroupedShuffleReadOperation(
 *         name_context, spec, 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, 612, __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, 612, __pyx_L1_error)

    /* "apache_beam/runners/worker/operations.py":610
 *   elif isinstance(spec, operation_specs.WorkerGroupingShuffleRead):
 *     from dataflow_worker.shuffle_operations import GroupedShuffleReadOperation
 *     op = GroupedShuffleReadOperation(             # <<<<<<<<<<<<<<
 *         name_context, spec, counter_factory, state_sampler,
 *         shuffle_source=test_shuffle_source)
 */
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_v_GroupedShuffleReadOperation, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 610, __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":608
 *   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":613
 *         name_context, spec, counter_factory, state_sampler,
 *         shuffle_source=test_shuffle_source)
 *   elif isinstance(spec, operation_specs.WorkerUngroupedShuffleRead):             # <<<<<<<<<<<<<<
 *     from dataflow_worker.shuffle_operations import UngroupedShuffleReadOperation
 *     op = UngroupedShuffleReadOperation(
 */
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_operation_specs); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 613, __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, 613, __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, 613, __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":614
 *         shuffle_source=test_shuffle_source)
 *   elif isinstance(spec, operation_specs.WorkerUngroupedShuffleRead):
 *     from dataflow_worker.shuffle_operations import UngroupedShuffleReadOperation             # <<<<<<<<<<<<<<
 *     op = UngroupedShuffleReadOperation(
 *         name_context, spec, counter_factory, state_sampler,
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 614, __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, 614, __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, 614, __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":615
 *   elif isinstance(spec, operation_specs.WorkerUngroupedShuffleRead):
 *     from dataflow_worker.shuffle_operations import UngroupedShuffleReadOperation
 *     op = UngroupedShuffleReadOperation(             # <<<<<<<<<<<<<<
 *         name_context, spec, counter_factory, state_sampler,
 *         shuffle_source=test_shuffle_source)
 */
    __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 615, __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":617
 *     op = UngroupedShuffleReadOperation(
 *         name_context, spec, 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, 617, __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, 617, __pyx_L1_error)

    /* "apache_beam/runners/worker/operations.py":615
 *   elif isinstance(spec, operation_specs.WorkerUngroupedShuffleRead):
 *     from dataflow_worker.shuffle_operations import UngroupedShuffleReadOperation
 *     op = UngroupedShuffleReadOperation(             # <<<<<<<<<<<<<<
 *         name_context, spec, counter_factory, state_sampler,
 *         shuffle_source=test_shuffle_source)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_UngroupedShuffleReadOperation, __pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 615, __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":613
 *         name_context, spec, counter_factory, 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":618
 *         name_context, spec, counter_factory, state_sampler,
 *         shuffle_source=test_shuffle_source)
 *   elif isinstance(spec, operation_specs.WorkerInMemoryWrite):             # <<<<<<<<<<<<<<
 *     op = InMemoryWriteOperation(
 *         name_context, spec, counter_factory, state_sampler)
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_operation_specs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 618, __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, 618, __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, 618, __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":619
 *         shuffle_source=test_shuffle_source)
 *   elif isinstance(spec, operation_specs.WorkerInMemoryWrite):
 *     op = InMemoryWriteOperation(             # <<<<<<<<<<<<<<
 *         name_context, spec, counter_factory, state_sampler)
 *   elif isinstance(spec, operation_specs.WorkerShuffleWrite):
 */
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_InMemoryWriteOperation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 619, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "apache_beam/runners/worker/operations.py":620
 *   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, 619, __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, 619, __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, 619, __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, 619, __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":618
 *         name_context, spec, counter_factory, 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":621
 *     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_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_operation_specs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 621, __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, 621, __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, 621, __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":622
 *         name_context, spec, counter_factory, state_sampler)
 *   elif isinstance(spec, operation_specs.WorkerShuffleWrite):
 *     from dataflow_worker.shuffle_operations import ShuffleWriteOperation             # <<<<<<<<<<<<<<
 *     op = ShuffleWriteOperation(
 *         name_context, spec, counter_factory, state_sampler,
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 622, __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, 622, __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, 622, __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":623
 *   elif isinstance(spec, operation_specs.WorkerShuffleWrite):
 *     from dataflow_worker.shuffle_operations import ShuffleWriteOperation
 *     op = ShuffleWriteOperation(             # <<<<<<<<<<<<<<
 *         name_context, spec, counter_factory, state_sampler,
 *         shuffle_sink=test_shuffle_sink)
 */
    __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 623, __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":625
 *     op = ShuffleWriteOperation(
 *         name_context, spec, counter_factory, state_sampler,
 *         shuffle_sink=test_shuffle_sink)             # <<<<<<<<<<<<<<
 *   elif isinstance(spec, operation_specs.WorkerFlatten):
 *     op = FlattenOperation(
 */
    __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 625, __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, 625, __pyx_L1_error)

    /* "apache_beam/runners/worker/operations.py":623
 *   elif isinstance(spec, operation_specs.WorkerShuffleWrite):
 *     from dataflow_worker.shuffle_operations import ShuffleWriteOperation
 *     op = ShuffleWriteOperation(             # <<<<<<<<<<<<<<
 *         name_context, spec, counter_factory, state_sampler,
 *         shuffle_sink=test_shuffle_sink)
 */
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_ShuffleWriteOperation, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 623, __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":621
 *     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":626
 *         name_context, spec, 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_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_operation_specs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 626, __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, 626, __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, 626, __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":627
 *         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_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 627, __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, 627, __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":626
 *         name_context, spec, counter_factory, state_sampler,
 *         shuffle_sink=test_shuffle_sink)
 *   elif isinstance(spec, operation_specs.WorkerFlatten):             # <<<<<<<<<<<<<<
 *     op = FlattenOperation(
 *         name_context, spec, counter_factory, state_sampler)
 */
    goto __pyx_L4;
  }

  /* "apache_beam/runners/worker/operations.py":629
 *     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_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_operation_specs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 629, __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, 629, __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, 629, __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":630
 *         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, 630, __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, 630, __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, 630, __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":631
 *   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, 631, __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, 631, __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, 631, __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":632
 *     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, 632, __pyx_L1_error)
    if (__pyx_t_4) {

      /* "apache_beam/runners/worker/operations.py":634
 *     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, 633, __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, 633, __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, 633, __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, 633, __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":632
 *     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":636
 *           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":637
 *     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, 636, __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, 636, __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, 636, __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, 636, __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":629
 *     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":638
 *       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_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_operation_specs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 638, __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, 638, __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, 638, __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":639
 *           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, 639, __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, 639, __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, 639, __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":641
 *     from dataflow_worker.shuffle_operations import ReifyTimestampAndWindowsOperation
 *     op = ReifyTimestampAndWindowsOperation(
 *         name_context, spec, counter_factory, state_sampler)             # <<<<<<<<<<<<<<
 *   else:
 *     raise TypeError('Expected an instance of operation_specs.Worker* class '
 */
    __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, 640, __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, 640, __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, 640, __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, 640, __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":638
 *       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":643
 *         name_context, spec, counter_factory, state_sampler)
 *   else:
 *     raise TypeError('Expected an instance of operation_specs.Worker* class '             # <<<<<<<<<<<<<<
 *                     'instead of %s' % (spec,))
 *   return op
 */
  /*else*/ {

    /* "apache_beam/runners/worker/operations.py":644
 *   else:
 *     raise TypeError('Expected an instance of operation_specs.Worker* class '
 *                     'instead of %s' % (spec,))             # <<<<<<<<<<<<<<
 *   return op
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_spec), __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 644, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "apache_beam/runners/worker/operations.py":643
 *         name_context, spec, counter_factory, state_sampler)
 *   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, 643, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 643, __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, 643, __pyx_L1_error)
  }
  __pyx_L4:;

  /* "apache_beam/runners/worker/operations.py":645
 *     raise TypeError('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":579
 * 
 * 
 * def create_operation(name_context, spec, counter_factory, step_name,             # <<<<<<<<<<<<<<
 *                      state_sampler, test_shuffle_source=None,
 *                      test_shuffle_sink=None, is_streaming=False):
 */

  /* 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":655
 *   """
 * 
 *   def __init__(             # <<<<<<<<<<<<<<
 *       self, map_task, counter_factory, state_sampler,
 *       test_shuffle_source=None, test_shuffle_sink=None):
 */

/* 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)__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;
  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":657
 *   def __init__(
 *       self, map_task, counter_factory, state_sampler,
 *       test_shuffle_source=None, test_shuffle_sink=None):             # <<<<<<<<<<<<<<
 *     """Initializes SimpleMapTaskExecutor.
 * 
 */
    values[4] = ((PyObject *)((PyObject *)Py_None));
    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, 655, __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, 655, __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, 655, __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, 655, __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, 655, __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":655
 *   """
 * 
 *   def __init__(             # <<<<<<<<<<<<<<
 *       self, map_task, counter_factory, state_sampler,
 *       test_shuffle_source=None, test_shuffle_sink=None):
 */

  /* 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;
  __Pyx_TraceFrameInit(__pyx_codeobj__68)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 655, 0, __PYX_ERR(0, 655, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":672
 *     """
 * 
 *     self._map_task = map_task             # <<<<<<<<<<<<<<
 *     self._counter_factory = counter_factory
 *     self._ops = []
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_map_task_2, __pyx_v_map_task) < 0) __PYX_ERR(0, 672, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":673
 * 
 *     self._map_task = map_task
 *     self._counter_factory = counter_factory             # <<<<<<<<<<<<<<
 *     self._ops = []
 *     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, 673, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":674
 *     self._map_task = map_task
 *     self._counter_factory = counter_factory
 *     self._ops = []             # <<<<<<<<<<<<<<
 *     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, 674, __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, 674, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":675
 *     self._counter_factory = counter_factory
 *     self._ops = []
 *     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, 675, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":676
 *     self._ops = []
 *     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, 676, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":677
 *     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, 677, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":655
 *   """
 * 
 *   def __init__(             # <<<<<<<<<<<<<<
 *       self, map_task, counter_factory, state_sampler,
 *       test_shuffle_source=None, test_shuffle_sink=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.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":679
 *     self._test_shuffle_sink = test_shuffle_sink
 * 
 *   def operations(self):             # <<<<<<<<<<<<<<
 *     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;
  __Pyx_TraceFrameInit(__pyx_codeobj__69)
  __Pyx_RefNannySetupContext("operations", 0);
  __Pyx_TraceCall("operations", __pyx_f[0], 679, 0, __PYX_ERR(0, 679, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":680
 * 
 *   def operations(self):
 *     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, 680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 0, NULL, NULL, &__pyx_slice__70, 0, 0, 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_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "apache_beam/runners/worker/operations.py":679
 *     self._test_shuffle_sink = test_shuffle_sink
 * 
 *   def operations(self):             # <<<<<<<<<<<<<<
 *     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":682
 *     return self._ops[:]
 * 
 *   def execute(self):             # <<<<<<<<<<<<<<
 *     """Executes all the operation_specs.Worker* instructions in a map task.
 * 
 */

/* 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;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *(*__pyx_t_10)(PyObject *);
  int __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  PyObject *(*__pyx_t_15)(PyObject *);
  __Pyx_TraceFrameInit(__pyx_codeobj__71)
  __Pyx_RefNannySetupContext("execute", 0);
  __Pyx_TraceCall("execute", __pyx_f[0], 682, 0, __PYX_ERR(0, 682, __pyx_L1_error));

  /* "apache_beam/runners/worker/operations.py":696
 *     # The order of the elements is important because the inputs use
 *     # list indexes as references.
 *     for name_context, spec in zip(self._map_task.name_contexts,             # <<<<<<<<<<<<<<
 *                                   self._map_task.operations):
 *       # This is used for logging and assigning names to counters.
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_map_task_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name_contexts); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "apache_beam/runners/worker/operations.py":697
 *     # list indexes as references.
 *     for name_context, spec in zip(self._map_task.name_contexts,
 *                                   self._map_task.operations):             # <<<<<<<<<<<<<<
 *       # This is used for logging and assigning names to counters.
 *       op = create_operation(
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_map_task_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_operations); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_6 = 0;
  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_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_4, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_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_5); __pyx_t_5 = 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_5};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_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_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_5);
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __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;

  /* "apache_beam/runners/worker/operations.py":696
 *     # The order of the elements is important because the inputs use
 *     # list indexes as references.
 *     for name_context, spec in zip(self._map_task.name_contexts,             # <<<<<<<<<<<<<<
 *                                   self._map_task.operations):
 *       # This is used for logging and assigning names to counters.
 */
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_8 = 0;
    __pyx_t_9 = NULL;
  } else {
    __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_9 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 696, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_9)) {
      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_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 696, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_8 >= 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_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 696, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_9(__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, 696, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 696, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_7 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_5);
      #else
      __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 696, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 696, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 696, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_10 = Py_TYPE(__pyx_t_4)->tp_iternext;
      index = 0; __pyx_t_7 = __pyx_t_10(__pyx_t_4); if (unlikely(!__pyx_t_7)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      index = 1; __pyx_t_5 = __pyx_t_10(__pyx_t_4); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_4), 2) < 0) __PYX_ERR(0, 696, __pyx_L1_error)
      __pyx_t_10 = NULL;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_10 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 696, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_name_context, __pyx_t_7);
    __pyx_t_7 = 0;
    __Pyx_XDECREF_SET(__pyx_v_spec, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "apache_beam/runners/worker/operations.py":699
 *                                   self._map_task.operations):
 *       # This is used for logging and assigning names to counters.
 *       op = create_operation(             # <<<<<<<<<<<<<<
 *           name_context, spec, self._counter_factory, None,
 *           self._state_sampler,
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_create_operation); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 699, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "apache_beam/runners/worker/operations.py":700
 *       # This is used for logging and assigning names to counters.
 *       op = create_operation(
 *           name_context, spec, self._counter_factory, None,             # <<<<<<<<<<<<<<
 *           self._state_sampler,
 *           test_shuffle_source=self._test_shuffle_source,
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_counter_factory_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 700, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);

    /* "apache_beam/runners/worker/operations.py":701
 *       op = create_operation(
 *           name_context, spec, self._counter_factory, None,
 *           self._state_sampler,             # <<<<<<<<<<<<<<
 *           test_shuffle_source=self._test_shuffle_source,
 *           test_shuffle_sink=self._test_shuffle_sink)
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_state_sampler_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 701, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);

    /* "apache_beam/runners/worker/operations.py":699
 *                                   self._map_task.operations):
 *       # This is used for logging and assigning names to counters.
 *       op = create_operation(             # <<<<<<<<<<<<<<
 *           name_context, spec, self._counter_factory, None,
 *           self._state_sampler,
 */
    __pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 699, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_name_context);
    __Pyx_GIVEREF(__pyx_v_name_context);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_name_context);
    __Pyx_INCREF(__pyx_v_spec);
    __Pyx_GIVEREF(__pyx_v_spec);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_spec);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_5);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_4, 3, Py_None);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_t_7);
    __pyx_t_5 = 0;
    __pyx_t_7 = 0;

    /* "apache_beam/runners/worker/operations.py":702
 *           name_context, spec, self._counter_factory, None,
 *           self._state_sampler,
 *           test_shuffle_source=self._test_shuffle_source,             # <<<<<<<<<<<<<<
 *           test_shuffle_sink=self._test_shuffle_sink)
 *       self._ops.append(op)
 */
    __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 702, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_test_shuffle_source_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 702, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_test_shuffle_source, __pyx_t_5) < 0) __PYX_ERR(0, 702, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "apache_beam/runners/worker/operations.py":703
 *           self._state_sampler,
 *           test_shuffle_source=self._test_shuffle_source,
 *           test_shuffle_sink=self._test_shuffle_sink)             # <<<<<<<<<<<<<<
 *       self._ops.append(op)
 * 
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_test_shuffle_sink_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 703, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_test_shuffle_sink, __pyx_t_5) < 0) __PYX_ERR(0, 702, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "apache_beam/runners/worker/operations.py":699
 *                                   self._map_task.operations):
 *       # This is used for logging and assigning names to counters.
 *       op = create_operation(             # <<<<<<<<<<<<<<
 *           name_context, spec, self._counter_factory, None,
 *           self._state_sampler,
 */
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 699, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF_SET(__pyx_v_op, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "apache_beam/runners/worker/operations.py":704
 *           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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ops); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 704, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_11 = __Pyx_PyObject_Append(__pyx_t_5, __pyx_v_op); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 704, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "apache_beam/runners/worker/operations.py":707
 * 
 *       # 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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_op, __pyx_n_s_spec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 707, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_12 = __Pyx_HasAttr(__pyx_t_5, __pyx_n_u_input); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 707, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_13 = (__pyx_t_12 != 0);
    if (__pyx_t_13) {

      /* "apache_beam/runners/worker/operations.py":708
 *       # 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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_op, __pyx_n_s_spec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 708, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_input); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 708, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) {
        PyObject* sequence = __pyx_t_7;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 708, __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_4 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        #else
        __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 708, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 708, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_1 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 708, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_10 = Py_TYPE(__pyx_t_1)->tp_iternext;
        index = 0; __pyx_t_5 = __pyx_t_10(__pyx_t_1); if (unlikely(!__pyx_t_5)) goto __pyx_L8_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_5);
        index = 1; __pyx_t_4 = __pyx_t_10(__pyx_t_1); if (unlikely(!__pyx_t_4)) goto __pyx_L8_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_4);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_1), 2) < 0) __PYX_ERR(0, 708, __pyx_L1_error)
        __pyx_t_10 = NULL;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L9_unpacking_done;
        __pyx_L8_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_10 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 708, __pyx_L1_error)
        __pyx_L9_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_producer, __pyx_t_5);
      __pyx_t_5 = 0;
      __Pyx_XDECREF_SET(__pyx_v_output_index, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "apache_beam/runners/worker/operations.py":709
 *       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_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ops); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 709, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_v_producer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 709, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_add_receiver); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 709, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __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_v_op, __pyx_v_output_index};
        __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 709, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_7);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_op, __pyx_v_output_index};
        __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 709, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_7);
      } else
      #endif
      {
        __pyx_t_1 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 709, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        if (__pyx_t_5) {
          __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); __pyx_t_5 = NULL;
        }
        __Pyx_INCREF(__pyx_v_op);
        __Pyx_GIVEREF(__pyx_v_op);
        PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_6, __pyx_v_op);
        __Pyx_INCREF(__pyx_v_output_index);
        __Pyx_GIVEREF(__pyx_v_output_index);
        PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_6, __pyx_v_output_index);
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 709, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "apache_beam/runners/worker/operations.py":707
 * 
 *       # 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":711
 *         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_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_op, __pyx_n_s_spec); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 711, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_13 = __Pyx_HasAttr(__pyx_t_7, __pyx_n_u_inputs); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 711, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_12 = (__pyx_t_13 != 0);
    if (__pyx_t_12) {

      /* "apache_beam/runners/worker/operations.py":712
 *       # 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_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_op, __pyx_n_s_spec); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 712, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_inputs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 712, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
        __pyx_t_7 = __pyx_t_4; __Pyx_INCREF(__pyx_t_7); __pyx_t_14 = 0;
        __pyx_t_15 = NULL;
      } else {
        __pyx_t_14 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 712, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_15 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 712, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      for (;;) {
        if (likely(!__pyx_t_15)) {
          if (likely(PyList_CheckExact(__pyx_t_7))) {
            if (__pyx_t_14 >= 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_14); __Pyx_INCREF(__pyx_t_4); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 712, __pyx_L1_error)
            #else
            __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 712, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
          } else {
            if (__pyx_t_14 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_14); __Pyx_INCREF(__pyx_t_4); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 712, __pyx_L1_error)
            #else
            __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 712, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
          }
        } else {
          __pyx_t_4 = __pyx_t_15(__pyx_t_7);
          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, 712, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_4);
        }
        if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
          PyObject* sequence = __pyx_t_4;
          Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
          if (unlikely(size != 2)) {
            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            __PYX_ERR(0, 712, __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_5 = PyTuple_GET_ITEM(sequence, 1); 
          } else {
            __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
          }
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_5);
          #else
          __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 712, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 712, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 712, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_10 = Py_TYPE(__pyx_t_3)->tp_iternext;
          index = 0; __pyx_t_1 = __pyx_t_10(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L13_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_1);
          index = 1; __pyx_t_5 = __pyx_t_10(__pyx_t_3); if (unlikely(!__pyx_t_5)) goto __pyx_L13_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_5);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_3), 2) < 0) __PYX_ERR(0, 712, __pyx_L1_error)
          __pyx_t_10 = NULL;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          goto __pyx_L14_unpacking_done;
          __pyx_L13_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_10 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(0, 712, __pyx_L1_error)
          __pyx_L14_unpacking_done:;
        }
        __Pyx_XDECREF_SET(__pyx_v_producer, __pyx_t_1);
        __pyx_t_1 = 0;
        __Pyx_XDECREF_SET(__pyx_v_output_index, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "apache_beam/runners/worker/operations.py":713
 *       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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ops); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 713, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_v_producer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 713, __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_add_receiver); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 713, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = NULL;
        __pyx_t_6 = 0;
        if (CYTHON_UNPACK_METHODS && likely(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[3] = {__pyx_t_1, __pyx_v_op, __pyx_v_output_index};
          __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 713, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_GOTREF(__pyx_t_4);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_op, __pyx_v_output_index};
          __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 713, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_GOTREF(__pyx_t_4);
        } else
        #endif
        {
          __pyx_t_3 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 713, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          if (__pyx_t_1) {
            __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __pyx_t_1 = NULL;
          }
          __Pyx_INCREF(__pyx_v_op);
          __Pyx_GIVEREF(__pyx_v_op);
          PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_6, __pyx_v_op);
          __Pyx_INCREF(__pyx_v_output_index);
          __Pyx_GIVEREF(__pyx_v_output_index);
          PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_6, __pyx_v_output_index);
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 713, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __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;

        /* "apache_beam/runners/worker/operations.py":712
 *       # 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_7); __pyx_t_7 = 0;

      /* "apache_beam/runners/worker/operations.py":711
 *         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":696
 *     # 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_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":715
 *           self._ops[producer].add_receiver(op, output_index)
 * 
 *     for ix, op in reversed(list(enumerate(self._ops))):             # <<<<<<<<<<<<<<
 *       logging.debug('Starting op %d %s', ix, op)
 *       op.start()
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ops); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_enumerate, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PySequence_List(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __pyx_t_2; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = PyList_GET_SIZE(__pyx_t_7) - 1;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_8 < 0) break;
    if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_2 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8--; if (unlikely(0 < 0)) __PYX_ERR(0, 715, __pyx_L1_error)
    #else
    __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8--; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 715, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    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, 715, __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_5 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      #else
      __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 715, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 715, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 715, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_10 = Py_TYPE(__pyx_t_3)->tp_iternext;
      index = 0; __pyx_t_4 = __pyx_t_10(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L17_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      index = 1; __pyx_t_5 = __pyx_t_10(__pyx_t_3); if (unlikely(!__pyx_t_5)) goto __pyx_L17_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_3), 2) < 0) __PYX_ERR(0, 715, __pyx_L1_error)
      __pyx_t_10 = NULL;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L18_unpacking_done;
      __pyx_L17_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_10 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 715, __pyx_L1_error)
      __pyx_L18_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_ix, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_op, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "apache_beam/runners/worker/operations.py":716
 * 
 *     for ix, op in reversed(list(enumerate(self._ops))):
 *       logging.debug('Starting op %d %s', ix, op)             # <<<<<<<<<<<<<<
 *       op.start()
 *     for op in self._ops:
 */
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_logging); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 716, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_debug); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 716, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __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[4] = {__pyx_t_5, __pyx_kp_u_Starting_op_d_s, __pyx_v_ix, __pyx_v_op};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 716, __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_4)) {
      PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_kp_u_Starting_op_d_s, __pyx_v_ix, __pyx_v_op};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 716, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_3 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 716, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_u_Starting_op_d_s);
      __Pyx_GIVEREF(__pyx_kp_u_Starting_op_d_s);
      PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_6, __pyx_kp_u_Starting_op_d_s);
      __Pyx_INCREF(__pyx_v_ix);
      __Pyx_GIVEREF(__pyx_v_ix);
      PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_6, __pyx_v_ix);
      __Pyx_INCREF(__pyx_v_op);
      __Pyx_GIVEREF(__pyx_v_op);
      PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_6, __pyx_v_op);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 716, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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":717
 *     for ix, op in reversed(list(enumerate(self._ops))):
 *       logging.debug('Starting op %d %s', ix, op)
 *       op.start()             # <<<<<<<<<<<<<<
 *     for op in self._ops:
 *       op.finish()
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_op, __pyx_n_s_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 717, __pyx_L1_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);
      }
    }
    if (__pyx_t_3) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 717, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 717, __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":715
 *           self._ops[producer].add_receiver(op, output_index)
 * 
 *     for ix, op in reversed(list(enumerate(self._ops))):             # <<<<<<<<<<<<<<
 *       logging.debug('Starting op %d %s', ix, op)
 *       op.start()
 */
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "apache_beam/runners/worker/operations.py":718
 *       logging.debug('Starting op %d %s', ix, op)
 *       op.start()
 *     for op in self._ops:             # <<<<<<<<<<<<<<
 *       op.finish()
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ops); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  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_8 = 0;
    __pyx_t_9 = NULL;
  } else {
    __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 718, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_9 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 718, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  for (;;) {
    if (likely(!__pyx_t_9)) {
      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_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 718, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 718, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      } else {
        if (__pyx_t_8 >= 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_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 718, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 718, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      }
    } else {
      __pyx_t_7 = __pyx_t_9(__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, 718, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_7);
    }
    __Pyx_XDECREF_SET(__pyx_v_op, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "apache_beam/runners/worker/operations.py":719
 *       op.start()
 *     for op in self._ops:
 *       op.finish()             # <<<<<<<<<<<<<<
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_op, __pyx_n_s_finish); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 719, __pyx_L1_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);
      }
    }
    if (__pyx_t_3) {
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 719, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 719, __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":718
 *       logging.debug('Starting op %d %s', ix, op)
 *       op.start()
 *     for op in self._ops:             # <<<<<<<<<<<<<<
 *       op.finish()
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":682
 *     return self._ops[:]
 * 
 *   def execute(self):             # <<<<<<<<<<<<<<
 *     """Executes all the operation_specs.Worker* instructions in a 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_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.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):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0xe53e5b7:
 *         from pickle import PickleError as __pyx_PickleError
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_5__pyx_unpickle_ConsumerSet(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_5__pyx_unpickle_ConsumerSet = {"__pyx_unpickle_ConsumerSet", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_5__pyx_unpickle_ConsumerSet, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_5__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;
  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_4__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_4__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 = NULL;
  PyObject *__pyx_v___pyx_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_TraceFrameInit(__pyx_codeobj__72)
  __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)":2
 * def __pyx_unpickle_ConsumerSet(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0xe53e5b7:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xe53e5b7 = (coder, consumers, opcounter, output_index, step_name))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xe53e5b7) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":3
 * def __pyx_unpickle_ConsumerSet(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0xe53e5b7:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xe53e5b7 = (coder, consumers, opcounter, output_index, step_name))" % __pyx_checksum)
 *     __pyx_result = ConsumerSet.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":4
 *     if __pyx_checksum != 0xe53e5b7:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xe53e5b7 = (coder, consumers, opcounter, output_index, step_name))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = ConsumerSet.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xe5, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    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);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(2, 4, __pyx_L1_error)

    /* "(tree fragment)":2
 * def __pyx_unpickle_ConsumerSet(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0xe53e5b7:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xe53e5b7 = (coder, consumers, opcounter, output_index, step_name))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":5
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xe53e5b7 = (coder, consumers, opcounter, output_index, 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_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __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);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_INCREF(__pyx_v___pyx_type);
      __Pyx_GIVEREF(__pyx_v___pyx_type);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v___pyx_type);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v___pyx_result = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xe53e5b7 = (coder, consumers, opcounter, output_index, 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_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_7 = (__pyx_t_1 != 0);
  if (__pyx_t_7) {

    /* "(tree fragment)":7
 *     __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)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 7, __pyx_L1_error)
    __pyx_t_3 = __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_3)) __PYX_ERR(2, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xe53e5b7 = (coder, consumers, opcounter, output_index, 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)":8
 *     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.opcounter = __pyx_state[2]; __pyx_result.output_index = __pyx_state[3]; __pyx_result.step_name = __pyx_state[4]
 */
  __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):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0xe53e5b7:
 *         from pickle import PickleError as __pyx_PickleError
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_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)":9
 *         __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.opcounter = __pyx_state[2]; __pyx_result.output_index = __pyx_state[3]; __pyx_result.step_name = __pyx_state[4]
 *     if len(__pyx_state) > 5 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;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__pyx_unpickle_ConsumerSet__set_state", 0);
  __Pyx_TraceCall("__pyx_unpickle_ConsumerSet__set_state", __pyx_f[2], 9, 0, __PYX_ERR(2, 9, __pyx_L1_error));

  /* "(tree fragment)":10
 *     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.opcounter = __pyx_state[2]; __pyx_result.output_index = __pyx_state[3]; __pyx_result.step_name = __pyx_state[4]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 10, __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, 10, __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, 10, __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, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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)":11
 * 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.opcounter = __pyx_state[2]; __pyx_result.output_index = __pyx_state[3]; __pyx_result.step_name = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(2, 11, __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, 11, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 5) != 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, 11, __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)":12
 *     __pyx_result.coder = __pyx_state[0]; __pyx_result.consumers = __pyx_state[1]; __pyx_result.opcounter = __pyx_state[2]; __pyx_result.output_index = __pyx_state[3]; __pyx_result.step_name = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[5])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 12, __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, 12, __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, 12, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 12, __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);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 12, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":11
 * 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.opcounter = __pyx_state[2]; __pyx_result.output_index = __pyx_state[3]; __pyx_result.step_name = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  }

  /* "(tree fragment)":9
 *         __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.opcounter = __pyx_state[2]; __pyx_result.output_index = __pyx_state[3]; __pyx_result.step_name = __pyx_state[4]
 *     if len(__pyx_state) > 5 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_XDECREF(__pyx_t_9);
  __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_Operation(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0x31178f9:
 *         from pickle import PickleError as __pyx_PickleError
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_7__pyx_unpickle_Operation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_7__pyx_unpickle_Operation = {"__pyx_unpickle_Operation", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_7__pyx_unpickle_Operation, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_7__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;
  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_6__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_6__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 = NULL;
  PyObject *__pyx_v___pyx_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_TraceFrameInit(__pyx_codeobj__73)
  __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)":2
 * def __pyx_unpickle_Operation(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0x31178f9:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x31178f9 = (consumers, counter_factory, debug_logging_enabled, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, spec, state_sampler, step_name))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x31178f9) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":3
 * def __pyx_unpickle_Operation(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0x31178f9:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x31178f9 = (consumers, counter_factory, debug_logging_enabled, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, spec, state_sampler, step_name))" % __pyx_checksum)
 *     __pyx_result = Operation.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":4
 *     if __pyx_checksum != 0x31178f9:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x31178f9 = (consumers, counter_factory, debug_logging_enabled, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, spec, state_sampler, step_name))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = Operation.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x31, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    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);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(2, 4, __pyx_L1_error)

    /* "(tree fragment)":2
 * def __pyx_unpickle_Operation(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0x31178f9:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x31178f9 = (consumers, counter_factory, debug_logging_enabled, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, spec, state_sampler, step_name))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":5
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x31178f9 = (consumers, counter_factory, debug_logging_enabled, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, 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_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __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);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_INCREF(__pyx_v___pyx_type);
      __Pyx_GIVEREF(__pyx_v___pyx_type);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v___pyx_type);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v___pyx_result = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x31178f9 = (consumers, counter_factory, debug_logging_enabled, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, 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_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_7 = (__pyx_t_1 != 0);
  if (__pyx_t_7) {

    /* "(tree fragment)":7
 *     __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)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 7, __pyx_L1_error)
    __pyx_t_3 = __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_3)) __PYX_ERR(2, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x31178f9 = (consumers, counter_factory, debug_logging_enabled, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, 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)":8
 *     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.debug_logging_enabled = __pyx_state[2]; __pyx_result.metrics_container = __pyx_state[3]; __pyx_result.name_context = __pyx_state[4]; __pyx_result.operation_name = __pyx_state[5]; __pyx_result.receivers = __pyx_state[6]; __pyx_result.scoped_finish_state = __pyx_state[7]; __pyx_result.scoped_metrics_container = __pyx_state[8]; __pyx_result.scoped_process_state = __pyx_state[9]; __pyx_result.scoped_start_state = __pyx_state[10]; __pyx_result.spec = __pyx_state[11]; __pyx_result.state_sampler = __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_Operation(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0x31178f9:
 *         from pickle import PickleError as __pyx_PickleError
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_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)":9
 *         __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.debug_logging_enabled = __pyx_state[2]; __pyx_result.metrics_container = __pyx_state[3]; __pyx_result.name_context = __pyx_state[4]; __pyx_result.operation_name = __pyx_state[5]; __pyx_result.receivers = __pyx_state[6]; __pyx_result.scoped_finish_state = __pyx_state[7]; __pyx_result.scoped_metrics_container = __pyx_state[8]; __pyx_result.scoped_process_state = __pyx_state[9]; __pyx_result.scoped_start_state = __pyx_state[10]; __pyx_result.spec = __pyx_state[11]; __pyx_result.state_sampler = __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_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;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Operation__set_state", 0);
  __Pyx_TraceCall("__pyx_unpickle_Operation__set_state", __pyx_f[2], 9, 0, __PYX_ERR(2, 9, __pyx_L1_error));

  /* "(tree fragment)":10
 *     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.debug_logging_enabled = __pyx_state[2]; __pyx_result.metrics_container = __pyx_state[3]; __pyx_result.name_context = __pyx_state[4]; __pyx_result.operation_name = __pyx_state[5]; __pyx_result.receivers = __pyx_state[6]; __pyx_result.scoped_finish_state = __pyx_state[7]; __pyx_result.scoped_metrics_container = __pyx_state[8]; __pyx_result.scoped_process_state = __pyx_state[9]; __pyx_result.scoped_start_state = __pyx_state[10]; __pyx_result.spec = __pyx_state[11]; __pyx_result.state_sampler = __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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_7metrics_9execution_ScopedMetricsContainer))))) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->scoped_metrics_container);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->scoped_metrics_container));
  __pyx_v___pyx_result->scoped_metrics_container = ((struct __pyx_obj_11apache_beam_7metrics_9execution_ScopedMetricsContainer *)__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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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)":11
 * 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.debug_logging_enabled = __pyx_state[2]; __pyx_result.metrics_container = __pyx_state[3]; __pyx_result.name_context = __pyx_state[4]; __pyx_result.operation_name = __pyx_state[5]; __pyx_result.receivers = __pyx_state[6]; __pyx_result.scoped_finish_state = __pyx_state[7]; __pyx_result.scoped_metrics_container = __pyx_state[8]; __pyx_result.scoped_process_state = __pyx_state[9]; __pyx_result.scoped_start_state = __pyx_state[10]; __pyx_result.spec = __pyx_state[11]; __pyx_result.state_sampler = __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, 11, __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, 11, __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, 11, __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)":12
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.debug_logging_enabled = __pyx_state[2]; __pyx_result.metrics_container = __pyx_state[3]; __pyx_result.name_context = __pyx_state[4]; __pyx_result.operation_name = __pyx_state[5]; __pyx_result.receivers = __pyx_state[6]; __pyx_result.scoped_finish_state = __pyx_state[7]; __pyx_result.scoped_metrics_container = __pyx_state[8]; __pyx_result.scoped_process_state = __pyx_state[9]; __pyx_result.scoped_start_state = __pyx_state[10]; __pyx_result.spec = __pyx_state[11]; __pyx_result.state_sampler = __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, 12, __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, 12, __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, 12, __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, 12, __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);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 12, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":11
 * 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.debug_logging_enabled = __pyx_state[2]; __pyx_result.metrics_container = __pyx_state[3]; __pyx_result.name_context = __pyx_state[4]; __pyx_result.operation_name = __pyx_state[5]; __pyx_result.receivers = __pyx_state[6]; __pyx_result.scoped_finish_state = __pyx_state[7]; __pyx_result.scoped_metrics_container = __pyx_state[8]; __pyx_result.scoped_process_state = __pyx_state[9]; __pyx_result.scoped_start_state = __pyx_state[10]; __pyx_result.spec = __pyx_state[11]; __pyx_result.state_sampler = __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)":9
 *         __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.debug_logging_enabled = __pyx_state[2]; __pyx_result.metrics_container = __pyx_state[3]; __pyx_result.name_context = __pyx_state[4]; __pyx_result.operation_name = __pyx_state[5]; __pyx_result.receivers = __pyx_state[6]; __pyx_result.scoped_finish_state = __pyx_state[7]; __pyx_result.scoped_metrics_container = __pyx_state[8]; __pyx_result.scoped_process_state = __pyx_state[9]; __pyx_result.scoped_start_state = __pyx_state[10]; __pyx_result.spec = __pyx_state[11]; __pyx_result.state_sampler = __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_XDECREF(__pyx_t_9);
  __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):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0x31178f9:
 *         from pickle import PickleError as __pyx_PickleError
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9__pyx_unpickle_ReadOperation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9__pyx_unpickle_ReadOperation = {"__pyx_unpickle_ReadOperation", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9__pyx_unpickle_ReadOperation, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9__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;
  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_8__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_8__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 = NULL;
  PyObject *__pyx_v___pyx_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_TraceFrameInit(__pyx_codeobj__74)
  __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)":2
 * def __pyx_unpickle_ReadOperation(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0x31178f9:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x31178f9 = (consumers, counter_factory, debug_logging_enabled, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, spec, state_sampler, step_name))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x31178f9) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":3
 * def __pyx_unpickle_ReadOperation(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0x31178f9:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x31178f9 = (consumers, counter_factory, debug_logging_enabled, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, spec, state_sampler, step_name))" % __pyx_checksum)
 *     __pyx_result = ReadOperation.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":4
 *     if __pyx_checksum != 0x31178f9:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x31178f9 = (consumers, counter_factory, debug_logging_enabled, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, spec, state_sampler, step_name))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = ReadOperation.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x31, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    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);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(2, 4, __pyx_L1_error)

    /* "(tree fragment)":2
 * def __pyx_unpickle_ReadOperation(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0x31178f9:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x31178f9 = (consumers, counter_factory, debug_logging_enabled, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, spec, state_sampler, step_name))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":5
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x31178f9 = (consumers, counter_factory, debug_logging_enabled, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, 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_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __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);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_INCREF(__pyx_v___pyx_type);
      __Pyx_GIVEREF(__pyx_v___pyx_type);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v___pyx_type);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v___pyx_result = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x31178f9 = (consumers, counter_factory, debug_logging_enabled, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, 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_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_7 = (__pyx_t_1 != 0);
  if (__pyx_t_7) {

    /* "(tree fragment)":7
 *     __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)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 7, __pyx_L1_error)
    __pyx_t_3 = __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_3)) __PYX_ERR(2, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x31178f9 = (consumers, counter_factory, debug_logging_enabled, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, 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)":8
 *     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.debug_logging_enabled = __pyx_state[2]; __pyx_result.metrics_container = __pyx_state[3]; __pyx_result.name_context = __pyx_state[4]; __pyx_result.operation_name = __pyx_state[5]; __pyx_result.receivers = __pyx_state[6]; __pyx_result.scoped_finish_state = __pyx_state[7]; __pyx_result.scoped_metrics_container = __pyx_state[8]; __pyx_result.scoped_process_state = __pyx_state[9]; __pyx_result.scoped_start_state = __pyx_state[10]; __pyx_result.spec = __pyx_state[11]; __pyx_result.state_sampler = __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_ReadOperation(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0x31178f9:
 *         from pickle import PickleError as __pyx_PickleError
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_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)":9
 *         __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.debug_logging_enabled = __pyx_state[2]; __pyx_result.metrics_container = __pyx_state[3]; __pyx_result.name_context = __pyx_state[4]; __pyx_result.operation_name = __pyx_state[5]; __pyx_result.receivers = __pyx_state[6]; __pyx_result.scoped_finish_state = __pyx_state[7]; __pyx_result.scoped_metrics_container = __pyx_state[8]; __pyx_result.scoped_process_state = __pyx_state[9]; __pyx_result.scoped_start_state = __pyx_state[10]; __pyx_result.spec = __pyx_state[11]; __pyx_result.state_sampler = __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_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;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__pyx_unpickle_ReadOperation__set_state", 0);
  __Pyx_TraceCall("__pyx_unpickle_ReadOperation__set_state", __pyx_f[2], 9, 0, __PYX_ERR(2, 9, __pyx_L1_error));

  /* "(tree fragment)":10
 *     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.debug_logging_enabled = __pyx_state[2]; __pyx_result.metrics_container = __pyx_state[3]; __pyx_result.name_context = __pyx_state[4]; __pyx_result.operation_name = __pyx_state[5]; __pyx_result.receivers = __pyx_state[6]; __pyx_result.scoped_finish_state = __pyx_state[7]; __pyx_result.scoped_metrics_container = __pyx_state[8]; __pyx_result.scoped_process_state = __pyx_state[9]; __pyx_result.scoped_start_state = __pyx_state[10]; __pyx_result.spec = __pyx_state[11]; __pyx_result.state_sampler = __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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_7metrics_9execution_ScopedMetricsContainer))))) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_metrics_container);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.scoped_metrics_container));
  __pyx_v___pyx_result->__pyx_base.scoped_metrics_container = ((struct __pyx_obj_11apache_beam_7metrics_9execution_ScopedMetricsContainer *)__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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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)":11
 * 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.debug_logging_enabled = __pyx_state[2]; __pyx_result.metrics_container = __pyx_state[3]; __pyx_result.name_context = __pyx_state[4]; __pyx_result.operation_name = __pyx_state[5]; __pyx_result.receivers = __pyx_state[6]; __pyx_result.scoped_finish_state = __pyx_state[7]; __pyx_result.scoped_metrics_container = __pyx_state[8]; __pyx_result.scoped_process_state = __pyx_state[9]; __pyx_result.scoped_start_state = __pyx_state[10]; __pyx_result.spec = __pyx_state[11]; __pyx_result.state_sampler = __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, 11, __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, 11, __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, 11, __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)":12
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.debug_logging_enabled = __pyx_state[2]; __pyx_result.metrics_container = __pyx_state[3]; __pyx_result.name_context = __pyx_state[4]; __pyx_result.operation_name = __pyx_state[5]; __pyx_result.receivers = __pyx_state[6]; __pyx_result.scoped_finish_state = __pyx_state[7]; __pyx_result.scoped_metrics_container = __pyx_state[8]; __pyx_result.scoped_process_state = __pyx_state[9]; __pyx_result.scoped_start_state = __pyx_state[10]; __pyx_result.spec = __pyx_state[11]; __pyx_result.state_sampler = __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, 12, __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, 12, __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, 12, __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, 12, __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);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 12, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":11
 * 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.debug_logging_enabled = __pyx_state[2]; __pyx_result.metrics_container = __pyx_state[3]; __pyx_result.name_context = __pyx_state[4]; __pyx_result.operation_name = __pyx_state[5]; __pyx_result.receivers = __pyx_state[6]; __pyx_result.scoped_finish_state = __pyx_state[7]; __pyx_result.scoped_metrics_container = __pyx_state[8]; __pyx_result.scoped_process_state = __pyx_state[9]; __pyx_result.scoped_start_state = __pyx_state[10]; __pyx_result.spec = __pyx_state[11]; __pyx_result.state_sampler = __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)":9
 *         __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.debug_logging_enabled = __pyx_state[2]; __pyx_result.metrics_container = __pyx_state[3]; __pyx_result.name_context = __pyx_state[4]; __pyx_result.operation_name = __pyx_state[5]; __pyx_result.receivers = __pyx_state[6]; __pyx_result.scoped_finish_state = __pyx_state[7]; __pyx_result.scoped_metrics_container = __pyx_state[8]; __pyx_result.scoped_process_state = __pyx_state[9]; __pyx_result.scoped_start_state = __pyx_state[10]; __pyx_result.spec = __pyx_state[11]; __pyx_result.state_sampler = __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_XDECREF(__pyx_t_9);
  __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_DoOperation(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0x36f06cd:
 *         from pickle import PickleError as __pyx_PickleError
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11__pyx_unpickle_DoOperation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11__pyx_unpickle_DoOperation = {"__pyx_unpickle_DoOperation", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11__pyx_unpickle_DoOperation, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11__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;
  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_10__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_10__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 = NULL;
  PyObject *__pyx_v___pyx_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_TraceFrameInit(__pyx_codeobj__75)
  __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)":2
 * def __pyx_unpickle_DoOperation(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0x36f06cd:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x36f06cd = (consumers, counter_factory, debug_logging_enabled, dofn_receiver, dofn_runner, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, side_input_maps, spec, state_sampler, step_name, tagged_receivers))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x36f06cd) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":3
 * def __pyx_unpickle_DoOperation(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0x36f06cd:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x36f06cd = (consumers, counter_factory, debug_logging_enabled, dofn_receiver, dofn_runner, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, side_input_maps, spec, state_sampler, step_name, tagged_receivers))" % __pyx_checksum)
 *     __pyx_result = DoOperation.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":4
 *     if __pyx_checksum != 0x36f06cd:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x36f06cd = (consumers, counter_factory, debug_logging_enabled, dofn_receiver, dofn_runner, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, side_input_maps, spec, state_sampler, step_name, tagged_receivers))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = DoOperation.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x36, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    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);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(2, 4, __pyx_L1_error)

    /* "(tree fragment)":2
 * def __pyx_unpickle_DoOperation(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0x36f06cd:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x36f06cd = (consumers, counter_factory, debug_logging_enabled, dofn_receiver, dofn_runner, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, side_input_maps, spec, state_sampler, step_name, tagged_receivers))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":5
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x36f06cd = (consumers, counter_factory, debug_logging_enabled, dofn_receiver, dofn_runner, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, side_input_maps, spec, state_sampler, step_name, tagged_receivers))" % __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_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __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);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_INCREF(__pyx_v___pyx_type);
      __Pyx_GIVEREF(__pyx_v___pyx_type);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v___pyx_type);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v___pyx_result = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x36f06cd = (consumers, counter_factory, debug_logging_enabled, dofn_receiver, dofn_runner, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, side_input_maps, spec, state_sampler, step_name, tagged_receivers))" % __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_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_7 = (__pyx_t_1 != 0);
  if (__pyx_t_7) {

    /* "(tree fragment)":7
 *     __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)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 7, __pyx_L1_error)
    __pyx_t_3 = __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_3)) __PYX_ERR(2, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x36f06cd = (consumers, counter_factory, debug_logging_enabled, dofn_receiver, dofn_runner, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, side_input_maps, spec, state_sampler, step_name, tagged_receivers))" % __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)":8
 *     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.debug_logging_enabled = __pyx_state[2]; __pyx_result.dofn_receiver = __pyx_state[3]; __pyx_result.dofn_runner = __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_metrics_container = __pyx_state[10]; __pyx_result.scoped_process_state = __pyx_state[11]; __pyx_result.scoped_start_state = __pyx_state[12]; __pyx_result.side_input_maps = __pyx_state[13]; __pyx_result.spec = __pyx_state[14]; __pyx_result.state_sampler = __pyx_state[15]; __pyx_result.step_name = __pyx_state[16]; __pyx_result.tagged_receivers = __pyx_state[17]
 */
  __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):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0x36f06cd:
 *         from pickle import PickleError as __pyx_PickleError
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_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)":9
 *         __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.debug_logging_enabled = __pyx_state[2]; __pyx_result.dofn_receiver = __pyx_state[3]; __pyx_result.dofn_runner = __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_metrics_container = __pyx_state[10]; __pyx_result.scoped_process_state = __pyx_state[11]; __pyx_result.scoped_start_state = __pyx_state[12]; __pyx_result.side_input_maps = __pyx_state[13]; __pyx_result.spec = __pyx_state[14]; __pyx_result.state_sampler = __pyx_state[15]; __pyx_result.step_name = __pyx_state[16]; __pyx_result.tagged_receivers = __pyx_state[17]
 *     if len(__pyx_state) > 18 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;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__pyx_unpickle_DoOperation__set_state", 0);
  __Pyx_TraceCall("__pyx_unpickle_DoOperation__set_state", __pyx_f[2], 9, 0, __PYX_ERR(2, 9, __pyx_L1_error));

  /* "(tree fragment)":10
 *     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.debug_logging_enabled = __pyx_state[2]; __pyx_result.dofn_receiver = __pyx_state[3]; __pyx_result.dofn_runner = __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_metrics_container = __pyx_state[10]; __pyx_result.scoped_process_state = __pyx_state[11]; __pyx_result.scoped_start_state = __pyx_state[12]; __pyx_result.side_input_maps = __pyx_state[13]; __pyx_result.spec = __pyx_state[14]; __pyx_result.state_sampler = __pyx_state[15]; __pyx_result.step_name = __pyx_state[16]; __pyx_result.tagged_receivers = __pyx_state[17]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 18 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[18])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_11apache_beam_7runners_6common_Receiver))))) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->dofn_receiver);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->dofn_receiver));
  __pyx_v___pyx_result->dofn_receiver = ((struct __pyx_obj_11apache_beam_7runners_6common_Receiver *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 10, __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, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->dofn_runner);
  __Pyx_DECREF(__pyx_v___pyx_result->dofn_runner);
  __pyx_v___pyx_result->dofn_runner = __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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_7metrics_9execution_ScopedMetricsContainer))))) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_metrics_container);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.scoped_metrics_container));
  __pyx_v___pyx_result->__pyx_base.scoped_metrics_container = ((struct __pyx_obj_11apache_beam_7metrics_9execution_ScopedMetricsContainer *)__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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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;

  /* "(tree fragment)":11
 * 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.debug_logging_enabled = __pyx_state[2]; __pyx_result.dofn_receiver = __pyx_state[3]; __pyx_result.dofn_runner = __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_metrics_container = __pyx_state[10]; __pyx_result.scoped_process_state = __pyx_state[11]; __pyx_result.scoped_start_state = __pyx_state[12]; __pyx_result.side_input_maps = __pyx_state[13]; __pyx_result.spec = __pyx_state[14]; __pyx_result.state_sampler = __pyx_state[15]; __pyx_result.step_name = __pyx_state[16]; __pyx_result.tagged_receivers = __pyx_state[17]
 *     if len(__pyx_state) > 18 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[18])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(2, 11, __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, 11, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 18) != 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, 11, __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)":12
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.debug_logging_enabled = __pyx_state[2]; __pyx_result.dofn_receiver = __pyx_state[3]; __pyx_result.dofn_runner = __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_metrics_container = __pyx_state[10]; __pyx_result.scoped_process_state = __pyx_state[11]; __pyx_result.scoped_start_state = __pyx_state[12]; __pyx_result.side_input_maps = __pyx_state[13]; __pyx_result.spec = __pyx_state[14]; __pyx_result.state_sampler = __pyx_state[15]; __pyx_result.step_name = __pyx_state[16]; __pyx_result.tagged_receivers = __pyx_state[17]
 *     if len(__pyx_state) > 18 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[18])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 12, __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, 12, __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, 12, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 18, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 12, __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);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 12, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":11
 * 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.debug_logging_enabled = __pyx_state[2]; __pyx_result.dofn_receiver = __pyx_state[3]; __pyx_result.dofn_runner = __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_metrics_container = __pyx_state[10]; __pyx_result.scoped_process_state = __pyx_state[11]; __pyx_result.scoped_start_state = __pyx_state[12]; __pyx_result.side_input_maps = __pyx_state[13]; __pyx_result.spec = __pyx_state[14]; __pyx_result.state_sampler = __pyx_state[15]; __pyx_result.step_name = __pyx_state[16]; __pyx_result.tagged_receivers = __pyx_state[17]
 *     if len(__pyx_state) > 18 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[18])
 */
  }

  /* "(tree fragment)":9
 *         __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.debug_logging_enabled = __pyx_state[2]; __pyx_result.dofn_receiver = __pyx_state[3]; __pyx_result.dofn_runner = __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_metrics_container = __pyx_state[10]; __pyx_result.scoped_process_state = __pyx_state[11]; __pyx_result.scoped_start_state = __pyx_state[12]; __pyx_result.side_input_maps = __pyx_state[13]; __pyx_result.spec = __pyx_state[14]; __pyx_result.state_sampler = __pyx_state[15]; __pyx_result.step_name = __pyx_state[16]; __pyx_result.tagged_receivers = __pyx_state[17]
 *     if len(__pyx_state) > 18 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_XDECREF(__pyx_t_9);
  __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_CombineOperation(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0xdd72a47:
 *         from pickle import PickleError as __pyx_PickleError
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_13__pyx_unpickle_CombineOperation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_13__pyx_unpickle_CombineOperation = {"__pyx_unpickle_CombineOperation", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_13__pyx_unpickle_CombineOperation, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_13__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;
  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_12__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_12__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 = NULL;
  PyObject *__pyx_v___pyx_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_TraceFrameInit(__pyx_codeobj__76)
  __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)":2
 * def __pyx_unpickle_CombineOperation(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0xdd72a47:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xdd72a47 = (consumers, counter_factory, debug_logging_enabled, metrics_container, name_context, operation_name, phased_combine_fn, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, spec, state_sampler, step_name))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xdd72a47) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":3
 * def __pyx_unpickle_CombineOperation(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0xdd72a47:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xdd72a47 = (consumers, counter_factory, debug_logging_enabled, metrics_container, name_context, operation_name, phased_combine_fn, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, spec, state_sampler, step_name))" % __pyx_checksum)
 *     __pyx_result = CombineOperation.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":4
 *     if __pyx_checksum != 0xdd72a47:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xdd72a47 = (consumers, counter_factory, debug_logging_enabled, metrics_container, name_context, operation_name, phased_combine_fn, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, spec, state_sampler, step_name))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = CombineOperation.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xdd, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    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);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(2, 4, __pyx_L1_error)

    /* "(tree fragment)":2
 * def __pyx_unpickle_CombineOperation(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0xdd72a47:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xdd72a47 = (consumers, counter_factory, debug_logging_enabled, metrics_container, name_context, operation_name, phased_combine_fn, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, spec, state_sampler, step_name))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":5
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xdd72a47 = (consumers, counter_factory, debug_logging_enabled, metrics_container, name_context, operation_name, phased_combine_fn, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, 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_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __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);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_INCREF(__pyx_v___pyx_type);
      __Pyx_GIVEREF(__pyx_v___pyx_type);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v___pyx_type);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v___pyx_result = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xdd72a47 = (consumers, counter_factory, debug_logging_enabled, metrics_container, name_context, operation_name, phased_combine_fn, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, 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_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_7 = (__pyx_t_1 != 0);
  if (__pyx_t_7) {

    /* "(tree fragment)":7
 *     __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)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 7, __pyx_L1_error)
    __pyx_t_3 = __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_3)) __PYX_ERR(2, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xdd72a47 = (consumers, counter_factory, debug_logging_enabled, metrics_container, name_context, operation_name, phased_combine_fn, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, 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)":8
 *     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.debug_logging_enabled = __pyx_state[2]; __pyx_result.metrics_container = __pyx_state[3]; __pyx_result.name_context = __pyx_state[4]; __pyx_result.operation_name = __pyx_state[5]; __pyx_result.phased_combine_fn = __pyx_state[6]; __pyx_result.receivers = __pyx_state[7]; __pyx_result.scoped_finish_state = __pyx_state[8]; __pyx_result.scoped_metrics_container = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.spec = __pyx_state[12]; __pyx_result.state_sampler = __pyx_state[13]; __pyx_result.step_name = __pyx_state[14]
 */
  __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):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0xdd72a47:
 *         from pickle import PickleError as __pyx_PickleError
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_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)":9
 *         __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.debug_logging_enabled = __pyx_state[2]; __pyx_result.metrics_container = __pyx_state[3]; __pyx_result.name_context = __pyx_state[4]; __pyx_result.operation_name = __pyx_state[5]; __pyx_result.phased_combine_fn = __pyx_state[6]; __pyx_result.receivers = __pyx_state[7]; __pyx_result.scoped_finish_state = __pyx_state[8]; __pyx_result.scoped_metrics_container = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.spec = __pyx_state[12]; __pyx_result.state_sampler = __pyx_state[13]; __pyx_result.step_name = __pyx_state[14]
 *     if len(__pyx_state) > 15 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;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__pyx_unpickle_CombineOperation__set_state", 0);
  __Pyx_TraceCall("__pyx_unpickle_CombineOperation__set_state", __pyx_f[2], 9, 0, __PYX_ERR(2, 9, __pyx_L1_error));

  /* "(tree fragment)":10
 *     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.debug_logging_enabled = __pyx_state[2]; __pyx_result.metrics_container = __pyx_state[3]; __pyx_result.name_context = __pyx_state[4]; __pyx_result.operation_name = __pyx_state[5]; __pyx_result.phased_combine_fn = __pyx_state[6]; __pyx_result.receivers = __pyx_state[7]; __pyx_result.scoped_finish_state = __pyx_state[8]; __pyx_result.scoped_metrics_container = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.spec = __pyx_state[12]; __pyx_result.state_sampler = __pyx_state[13]; __pyx_result.step_name = __pyx_state[14]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 15 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[15])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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_7metrics_9execution_ScopedMetricsContainer))))) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_metrics_container);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.scoped_metrics_container));
  __pyx_v___pyx_result->__pyx_base.scoped_metrics_container = ((struct __pyx_obj_11apache_beam_7metrics_9execution_ScopedMetricsContainer *)__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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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)":11
 * 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.debug_logging_enabled = __pyx_state[2]; __pyx_result.metrics_container = __pyx_state[3]; __pyx_result.name_context = __pyx_state[4]; __pyx_result.operation_name = __pyx_state[5]; __pyx_result.phased_combine_fn = __pyx_state[6]; __pyx_result.receivers = __pyx_state[7]; __pyx_result.scoped_finish_state = __pyx_state[8]; __pyx_result.scoped_metrics_container = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.spec = __pyx_state[12]; __pyx_result.state_sampler = __pyx_state[13]; __pyx_result.step_name = __pyx_state[14]
 *     if len(__pyx_state) > 15 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[15])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(2, 11, __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, 11, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 15) != 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, 11, __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)":12
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.debug_logging_enabled = __pyx_state[2]; __pyx_result.metrics_container = __pyx_state[3]; __pyx_result.name_context = __pyx_state[4]; __pyx_result.operation_name = __pyx_state[5]; __pyx_result.phased_combine_fn = __pyx_state[6]; __pyx_result.receivers = __pyx_state[7]; __pyx_result.scoped_finish_state = __pyx_state[8]; __pyx_result.scoped_metrics_container = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.spec = __pyx_state[12]; __pyx_result.state_sampler = __pyx_state[13]; __pyx_result.step_name = __pyx_state[14]
 *     if len(__pyx_state) > 15 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[15])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 12, __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, 12, __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, 12, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 15, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 12, __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);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 12, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":11
 * 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.debug_logging_enabled = __pyx_state[2]; __pyx_result.metrics_container = __pyx_state[3]; __pyx_result.name_context = __pyx_state[4]; __pyx_result.operation_name = __pyx_state[5]; __pyx_result.phased_combine_fn = __pyx_state[6]; __pyx_result.receivers = __pyx_state[7]; __pyx_result.scoped_finish_state = __pyx_state[8]; __pyx_result.scoped_metrics_container = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.spec = __pyx_state[12]; __pyx_result.state_sampler = __pyx_state[13]; __pyx_result.step_name = __pyx_state[14]
 *     if len(__pyx_state) > 15 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[15])
 */
  }

  /* "(tree fragment)":9
 *         __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.debug_logging_enabled = __pyx_state[2]; __pyx_result.metrics_container = __pyx_state[3]; __pyx_result.name_context = __pyx_state[4]; __pyx_result.operation_name = __pyx_state[5]; __pyx_result.phased_combine_fn = __pyx_state[6]; __pyx_result.receivers = __pyx_state[7]; __pyx_result.scoped_finish_state = __pyx_state[8]; __pyx_result.scoped_metrics_container = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.spec = __pyx_state[12]; __pyx_result.state_sampler = __pyx_state[13]; __pyx_result.step_name = __pyx_state[14]
 *     if len(__pyx_state) > 15 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_XDECREF(__pyx_t_9);
  __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):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0xe750882:
 *         from pickle import PickleError as __pyx_PickleError
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15__pyx_unpickle_PGBKCVOperation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_15__pyx_unpickle_PGBKCVOperation = {"__pyx_unpickle_PGBKCVOperation", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_15__pyx_unpickle_PGBKCVOperation, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15__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;
  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_14__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_14__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 = NULL;
  PyObject *__pyx_v___pyx_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_TraceFrameInit(__pyx_codeobj__77)
  __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)":2
 * def __pyx_unpickle_PGBKCVOperation(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0xe750882:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xe750882 = (combine_fn, combine_fn_add_input, consumers, counter_factory, debug_logging_enabled, key_count, max_keys, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, spec, state_sampler, step_name, table))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xe750882) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":3
 * def __pyx_unpickle_PGBKCVOperation(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0xe750882:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xe750882 = (combine_fn, combine_fn_add_input, consumers, counter_factory, debug_logging_enabled, key_count, max_keys, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, spec, state_sampler, step_name, table))" % __pyx_checksum)
 *     __pyx_result = PGBKCVOperation.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":4
 *     if __pyx_checksum != 0xe750882:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xe750882 = (combine_fn, combine_fn_add_input, consumers, counter_factory, debug_logging_enabled, key_count, max_keys, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, spec, state_sampler, step_name, table))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = PGBKCVOperation.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xe7, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    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);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(2, 4, __pyx_L1_error)

    /* "(tree fragment)":2
 * def __pyx_unpickle_PGBKCVOperation(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0xe750882:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xe750882 = (combine_fn, combine_fn_add_input, consumers, counter_factory, debug_logging_enabled, key_count, max_keys, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, spec, state_sampler, step_name, table))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":5
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xe750882 = (combine_fn, combine_fn_add_input, consumers, counter_factory, debug_logging_enabled, key_count, max_keys, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, spec, state_sampler, step_name, table))" % __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_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __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);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_INCREF(__pyx_v___pyx_type);
      __Pyx_GIVEREF(__pyx_v___pyx_type);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v___pyx_type);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v___pyx_result = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xe750882 = (combine_fn, combine_fn_add_input, consumers, counter_factory, debug_logging_enabled, key_count, max_keys, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, spec, state_sampler, step_name, table))" % __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_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_7 = (__pyx_t_1 != 0);
  if (__pyx_t_7) {

    /* "(tree fragment)":7
 *     __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)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 7, __pyx_L1_error)
    __pyx_t_3 = __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_3)) __PYX_ERR(2, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xe750882 = (combine_fn, combine_fn_add_input, consumers, counter_factory, debug_logging_enabled, key_count, max_keys, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, spec, state_sampler, step_name, table))" % __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)":8
 *     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.consumers = __pyx_state[2]; __pyx_result.counter_factory = __pyx_state[3]; __pyx_result.debug_logging_enabled = __pyx_state[4]; __pyx_result.key_count = __pyx_state[5]; __pyx_result.max_keys = __pyx_state[6]; __pyx_result.metrics_container = __pyx_state[7]; __pyx_result.name_context = __pyx_state[8]; __pyx_result.operation_name = __pyx_state[9]; __pyx_result.receivers = __pyx_state[10]; __pyx_result.scoped_finish_state = __pyx_state[11]; __pyx_result.scoped_metrics_container = __pyx_state[12]; __pyx_result.scoped_process_state = __pyx_state[13]; __pyx_result.scoped_start_state = __pyx_state[14]; __pyx_result.spec = __pyx_state[15]; __pyx_result.state_sampler = __pyx_state[16]; __pyx_result.step_name = __pyx_state[17]; __pyx_result.table = __pyx_state[18]
 */
  __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):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0xe750882:
 *         from pickle import PickleError as __pyx_PickleError
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_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)":9
 *         __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.consumers = __pyx_state[2]; __pyx_result.counter_factory = __pyx_state[3]; __pyx_result.debug_logging_enabled = __pyx_state[4]; __pyx_result.key_count = __pyx_state[5]; __pyx_result.max_keys = __pyx_state[6]; __pyx_result.metrics_container = __pyx_state[7]; __pyx_result.name_context = __pyx_state[8]; __pyx_result.operation_name = __pyx_state[9]; __pyx_result.receivers = __pyx_state[10]; __pyx_result.scoped_finish_state = __pyx_state[11]; __pyx_result.scoped_metrics_container = __pyx_state[12]; __pyx_result.scoped_process_state = __pyx_state[13]; __pyx_result.scoped_start_state = __pyx_state[14]; __pyx_result.spec = __pyx_state[15]; __pyx_result.state_sampler = __pyx_state[16]; __pyx_result.step_name = __pyx_state[17]; __pyx_result.table = __pyx_state[18]
 *     if len(__pyx_state) > 19 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;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_RefNannySetupContext("__pyx_unpickle_PGBKCVOperation__set_state", 0);
  __Pyx_TraceCall("__pyx_unpickle_PGBKCVOperation__set_state", __pyx_f[2], 9, 0, __PYX_ERR(2, 9, __pyx_L1_error));

  /* "(tree fragment)":10
 *     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.consumers = __pyx_state[2]; __pyx_result.counter_factory = __pyx_state[3]; __pyx_result.debug_logging_enabled = __pyx_state[4]; __pyx_result.key_count = __pyx_state[5]; __pyx_result.max_keys = __pyx_state[6]; __pyx_result.metrics_container = __pyx_state[7]; __pyx_result.name_context = __pyx_state[8]; __pyx_result.operation_name = __pyx_state[9]; __pyx_result.receivers = __pyx_state[10]; __pyx_result.scoped_finish_state = __pyx_state[11]; __pyx_result.scoped_metrics_container = __pyx_state[12]; __pyx_result.scoped_process_state = __pyx_state[13]; __pyx_result.scoped_start_state = __pyx_state[14]; __pyx_result.spec = __pyx_state[15]; __pyx_result.state_sampler = __pyx_state[16]; __pyx_result.step_name = __pyx_state[17]; __pyx_result.table = __pyx_state[18]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 19 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[19])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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_7metrics_9execution_ScopedMetricsContainer))))) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_metrics_container);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.scoped_metrics_container));
  __pyx_v___pyx_result->__pyx_base.scoped_metrics_container = ((struct __pyx_obj_11apache_beam_7metrics_9execution_ScopedMetricsContainer *)__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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 10, __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;

  /* "(tree fragment)":11
 * 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.consumers = __pyx_state[2]; __pyx_result.counter_factory = __pyx_state[3]; __pyx_result.debug_logging_enabled = __pyx_state[4]; __pyx_result.key_count = __pyx_state[5]; __pyx_result.max_keys = __pyx_state[6]; __pyx_result.metrics_container = __pyx_state[7]; __pyx_result.name_context = __pyx_state[8]; __pyx_result.operation_name = __pyx_state[9]; __pyx_result.receivers = __pyx_state[10]; __pyx_result.scoped_finish_state = __pyx_state[11]; __pyx_result.scoped_metrics_container = __pyx_state[12]; __pyx_result.scoped_process_state = __pyx_state[13]; __pyx_result.scoped_start_state = __pyx_state[14]; __pyx_result.spec = __pyx_state[15]; __pyx_result.state_sampler = __pyx_state[16]; __pyx_result.step_name = __pyx_state[17]; __pyx_result.table = __pyx_state[18]
 *     if len(__pyx_state) > 19 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[19])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(2, 11, __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, 11, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 19) != 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, 11, __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)":12
 *     __pyx_result.combine_fn = __pyx_state[0]; __pyx_result.combine_fn_add_input = __pyx_state[1]; __pyx_result.consumers = __pyx_state[2]; __pyx_result.counter_factory = __pyx_state[3]; __pyx_result.debug_logging_enabled = __pyx_state[4]; __pyx_result.key_count = __pyx_state[5]; __pyx_result.max_keys = __pyx_state[6]; __pyx_result.metrics_container = __pyx_state[7]; __pyx_result.name_context = __pyx_state[8]; __pyx_result.operation_name = __pyx_state[9]; __pyx_result.receivers = __pyx_state[10]; __pyx_result.scoped_finish_state = __pyx_state[11]; __pyx_result.scoped_metrics_container = __pyx_state[12]; __pyx_result.scoped_process_state = __pyx_state[13]; __pyx_result.scoped_start_state = __pyx_state[14]; __pyx_result.spec = __pyx_state[15]; __pyx_result.state_sampler = __pyx_state[16]; __pyx_result.step_name = __pyx_state[17]; __pyx_result.table = __pyx_state[18]
 *     if len(__pyx_state) > 19 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[19])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 12, __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, 12, __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, 12, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 19, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 12, __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);
      }
    }
    if (!__pyx_t_9) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_7};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_7};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else
      #endif
      {
        __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 12, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL;
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_7);
        __pyx_t_7 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":11
 * 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.consumers = __pyx_state[2]; __pyx_result.counter_factory = __pyx_state[3]; __pyx_result.debug_logging_enabled = __pyx_state[4]; __pyx_result.key_count = __pyx_state[5]; __pyx_result.max_keys = __pyx_state[6]; __pyx_result.metrics_container = __pyx_state[7]; __pyx_result.name_context = __pyx_state[8]; __pyx_result.operation_name = __pyx_state[9]; __pyx_result.receivers = __pyx_state[10]; __pyx_result.scoped_finish_state = __pyx_state[11]; __pyx_result.scoped_metrics_container = __pyx_state[12]; __pyx_result.scoped_process_state = __pyx_state[13]; __pyx_result.scoped_start_state = __pyx_state[14]; __pyx_result.spec = __pyx_state[15]; __pyx_result.state_sampler = __pyx_state[16]; __pyx_result.step_name = __pyx_state[17]; __pyx_result.table = __pyx_state[18]
 *     if len(__pyx_state) > 19 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[19])
 */
  }

  /* "(tree fragment)":9
 *         __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.consumers = __pyx_state[2]; __pyx_result.counter_factory = __pyx_state[3]; __pyx_result.debug_logging_enabled = __pyx_state[4]; __pyx_result.key_count = __pyx_state[5]; __pyx_result.max_keys = __pyx_state[6]; __pyx_result.metrics_container = __pyx_state[7]; __pyx_result.name_context = __pyx_state[8]; __pyx_result.operation_name = __pyx_state[9]; __pyx_result.receivers = __pyx_state[10]; __pyx_result.scoped_finish_state = __pyx_state[11]; __pyx_result.scoped_metrics_container = __pyx_state[12]; __pyx_result.scoped_process_state = __pyx_state[13]; __pyx_result.scoped_start_state = __pyx_state[14]; __pyx_result.spec = __pyx_state[15]; __pyx_result.state_sampler = __pyx_state[16]; __pyx_result.step_name = __pyx_state[17]; __pyx_result.table = __pyx_state[18]
 *     if len(__pyx_state) > 19 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_XDECREF(__pyx_t_10);
  __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):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0x31178f9:
 *         from pickle import PickleError as __pyx_PickleError
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_17__pyx_unpickle_FlattenOperation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_17__pyx_unpickle_FlattenOperation = {"__pyx_unpickle_FlattenOperation", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_17__pyx_unpickle_FlattenOperation, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_17__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;
  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_16__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_16__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 = NULL;
  PyObject *__pyx_v___pyx_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_TraceFrameInit(__pyx_codeobj__78)
  __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)":2
 * def __pyx_unpickle_FlattenOperation(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0x31178f9:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x31178f9 = (consumers, counter_factory, debug_logging_enabled, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, spec, state_sampler, step_name))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x31178f9) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":3
 * def __pyx_unpickle_FlattenOperation(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0x31178f9:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x31178f9 = (consumers, counter_factory, debug_logging_enabled, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, spec, state_sampler, step_name))" % __pyx_checksum)
 *     __pyx_result = FlattenOperation.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":4
 *     if __pyx_checksum != 0x31178f9:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x31178f9 = (consumers, counter_factory, debug_logging_enabled, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, spec, state_sampler, step_name))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = FlattenOperation.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x31, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    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);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(2, 4, __pyx_L1_error)

    /* "(tree fragment)":2
 * def __pyx_unpickle_FlattenOperation(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0x31178f9:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x31178f9 = (consumers, counter_factory, debug_logging_enabled, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, spec, state_sampler, step_name))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":5
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x31178f9 = (consumers, counter_factory, debug_logging_enabled, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, 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_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_FlattenOperation), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __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);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_INCREF(__pyx_v___pyx_type);
      __Pyx_GIVEREF(__pyx_v___pyx_type);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v___pyx_type);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v___pyx_result = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x31178f9 = (consumers, counter_factory, debug_logging_enabled, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, 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_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_7 = (__pyx_t_1 != 0);
  if (__pyx_t_7) {

    /* "(tree fragment)":7
 *     __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)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 7, __pyx_L1_error)
    __pyx_t_3 = __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_3)) __PYX_ERR(2, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x31178f9 = (consumers, counter_factory, debug_logging_enabled, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_metrics_container, scoped_process_state, scoped_start_state, 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)":8
 *     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.debug_logging_enabled = __pyx_state[2]; __pyx_result.metrics_container = __pyx_state[3]; __pyx_result.name_context = __pyx_state[4]; __pyx_result.operation_name = __pyx_state[5]; __pyx_result.receivers = __pyx_state[6]; __pyx_result.scoped_finish_state = __pyx_state[7]; __pyx_result.scoped_metrics_container = __pyx_state[8]; __pyx_result.scoped_process_state = __pyx_state[9]; __pyx_result.scoped_start_state = __pyx_state[10]; __pyx_result.spec = __pyx_state[11]; __pyx_result.state_sampler = __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_FlattenOperation(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0x31178f9:
 *         from pickle import PickleError as __pyx_PickleError
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_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)":9
 *         __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.debug_logging_enabled = __pyx_state[2]; __pyx_result.metrics_container = __pyx_state[3]; __pyx_result.name_context = __pyx_state[4]; __pyx_result.operation_name = __pyx_state[5]; __pyx_result.receivers = __pyx_state[6]; __pyx_result.scoped_finish_state = __pyx_state[7]; __pyx_result.scoped_metrics_container = __pyx_state[8]; __pyx_result.scoped_process_state = __pyx_state[9]; __pyx_result.scoped_start_state = __pyx_state[10]; __pyx_result.spec = __pyx_state[11]; __pyx_result.state_sampler = __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_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;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__pyx_unpickle_FlattenOperation__set_state", 0);
  __Pyx_TraceCall("__pyx_unpickle_FlattenOperation__set_state", __pyx_f[2], 9, 0, __PYX_ERR(2, 9, __pyx_L1_error));

  /* "(tree fragment)":10
 *     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.debug_logging_enabled = __pyx_state[2]; __pyx_result.metrics_container = __pyx_state[3]; __pyx_result.name_context = __pyx_state[4]; __pyx_result.operation_name = __pyx_state[5]; __pyx_result.receivers = __pyx_state[6]; __pyx_result.scoped_finish_state = __pyx_state[7]; __pyx_result.scoped_metrics_container = __pyx_state[8]; __pyx_result.scoped_process_state = __pyx_state[9]; __pyx_result.scoped_start_state = __pyx_state[10]; __pyx_result.spec = __pyx_state[11]; __pyx_result.state_sampler = __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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_7metrics_9execution_ScopedMetricsContainer))))) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_metrics_container);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.scoped_metrics_container));
  __pyx_v___pyx_result->__pyx_base.scoped_metrics_container = ((struct __pyx_obj_11apache_beam_7metrics_9execution_ScopedMetricsContainer *)__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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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, 10, __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)":11
 * 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.debug_logging_enabled = __pyx_state[2]; __pyx_result.metrics_container = __pyx_state[3]; __pyx_result.name_context = __pyx_state[4]; __pyx_result.operation_name = __pyx_state[5]; __pyx_result.receivers = __pyx_state[6]; __pyx_result.scoped_finish_state = __pyx_state[7]; __pyx_result.scoped_metrics_container = __pyx_state[8]; __pyx_result.scoped_process_state = __pyx_state[9]; __pyx_result.scoped_start_state = __pyx_state[10]; __pyx_result.spec = __pyx_state[11]; __pyx_result.state_sampler = __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, 11, __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, 11, __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, 11, __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)":12
 *     __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.debug_logging_enabled = __pyx_state[2]; __pyx_result.metrics_container = __pyx_state[3]; __pyx_result.name_context = __pyx_state[4]; __pyx_result.operation_name = __pyx_state[5]; __pyx_result.receivers = __pyx_state[6]; __pyx_result.scoped_finish_state = __pyx_state[7]; __pyx_result.scoped_metrics_container = __pyx_state[8]; __pyx_result.scoped_process_state = __pyx_state[9]; __pyx_result.scoped_start_state = __pyx_state[10]; __pyx_result.spec = __pyx_state[11]; __pyx_result.state_sampler = __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, 12, __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, 12, __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, 12, __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, 12, __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);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 12, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":11
 * 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.debug_logging_enabled = __pyx_state[2]; __pyx_result.metrics_container = __pyx_state[3]; __pyx_result.name_context = __pyx_state[4]; __pyx_result.operation_name = __pyx_state[5]; __pyx_result.receivers = __pyx_state[6]; __pyx_result.scoped_finish_state = __pyx_state[7]; __pyx_result.scoped_metrics_container = __pyx_state[8]; __pyx_result.scoped_process_state = __pyx_state[9]; __pyx_result.scoped_start_state = __pyx_state[10]; __pyx_result.spec = __pyx_state[11]; __pyx_result.state_sampler = __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)":9
 *         __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.debug_logging_enabled = __pyx_state[2]; __pyx_result.metrics_container = __pyx_state[3]; __pyx_result.name_context = __pyx_state[4]; __pyx_result.operation_name = __pyx_state[5]; __pyx_result.receivers = __pyx_state[6]; __pyx_result.scoped_finish_state = __pyx_state[7]; __pyx_result.scoped_metrics_container = __pyx_state[8]; __pyx_result.scoped_process_state = __pyx_state[9]; __pyx_result.scoped_start_state = __pyx_state[10]; __pyx_result.spec = __pyx_state[11]; __pyx_result.state_sampler = __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_XDECREF(__pyx_t_9);
  __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;
}
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);
  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) && !_PyGC_FINALIZED(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);
  #if CYTHON_USE_TYPE_SLOTS
  if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  #endif
  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;
  }
  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);
  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 PyMethodDef __pyx_methods_11apache_beam_7runners_6worker_10operations_ConsumerSet[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_11__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_13__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},
  {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*/
  0, /*tp_print*/
  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_9__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_1__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
};
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->scoped_metrics_container = ((struct __pyx_obj_11apache_beam_7metrics_9execution_ScopedMetricsContainer *)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);
  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) && !_PyGC_FINALIZED(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->scoped_metrics_container);
  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_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->scoped_metrics_container) {
    e = (*v)(((PyObject *)p->scoped_metrics_container), 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;
  }
  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->scoped_metrics_container);
  p->scoped_metrics_container = ((struct __pyx_obj_11apache_beam_7metrics_9execution_ScopedMetricsContainer *)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);
  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_scoped_metrics_container(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_24scoped_metrics_container_1__get__(o);
}

static int __pyx_setprop_11apache_beam_7runners_6worker_10operations_9Operation_scoped_metrics_container(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_24scoped_metrics_container_3__set__(o, v);
  }
  else {
    return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_24scoped_metrics_container_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 PyMethodDef __pyx_methods_11apache_beam_7runners_6worker_10operations_Operation[] = {
  {"add_receiver", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_11add_receiver, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_10add_receiver},
  {"str_internal", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17str_internal, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_16str_internal},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_19__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_21__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 *)"scoped_metrics_container", __pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_scoped_metrics_container, __pyx_setprop_11apache_beam_7runners_6worker_10operations_9Operation_scoped_metrics_container, (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},
  {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*/
  0, /*tp_print*/
  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_15__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
};
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*/
  0, /*tp_print*/
  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_15__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
};
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 = Py_None; Py_INCREF(Py_None);
  p->dofn_receiver = ((struct __pyx_obj_11apache_beam_7runners_6common_Receiver *)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);
  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) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->dofn_runner);
  Py_CLEAR(p->dofn_receiver);
  Py_CLEAR(p->tagged_receivers);
  Py_CLEAR(p->side_input_maps);
  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)(p->dofn_runner, a); if (e) return e;
  }
  if (p->dofn_receiver) {
    e = (*v)(((PyObject *)p->dofn_receiver), 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;
  }
  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 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->dofn_receiver);
  p->dofn_receiver = ((struct __pyx_obj_11apache_beam_7runners_6common_Receiver *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->tagged_receivers);
  p->tagged_receivers = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->side_input_maps);
  p->side_input_maps = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

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},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_14__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_16__setstate_cython__, METH_O, 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*/
  0, /*tp_print*/
  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_15__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*/
  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_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
};
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) && !_PyGC_FINALIZED(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[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_7__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_9__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*/
  0, /*tp_print*/
  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_15__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
};
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->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) && !_PyGC_FINALIZED(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->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->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->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 PyMethodDef __pyx_methods_11apache_beam_7runners_6worker_10operations_PGBKCVOperation[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_9__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_11__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},
  {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*/
  0, /*tp_print*/
  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_15__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
};
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*/
  0, /*tp_print*/
  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_15__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
};

static struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct___read_side_inputs *__pyx_freelist_11apache_beam_7runners_6worker_10operations___pyx_scope_struct___read_side_inputs[8];
static int __pyx_freecount_11apache_beam_7runners_6worker_10operations___pyx_scope_struct___read_side_inputs = 0;

static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations___pyx_scope_struct___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___read_side_inputs > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct___read_side_inputs)))) {
    o = (PyObject*)__pyx_freelist_11apache_beam_7runners_6worker_10operations___pyx_scope_struct___read_side_inputs[--__pyx_freecount_11apache_beam_7runners_6worker_10operations___pyx_scope_struct___read_side_inputs];
    memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct___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___read_side_inputs(PyObject *o) {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct___read_side_inputs *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct___read_side_inputs *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_default);
  Py_CLEAR(p->__pyx_v_has_default);
  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___read_side_inputs < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct___read_side_inputs)))) {
    __pyx_freelist_11apache_beam_7runners_6worker_10operations___pyx_scope_struct___read_side_inputs[__pyx_freecount_11apache_beam_7runners_6worker_10operations___pyx_scope_struct___read_side_inputs++] = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct___read_side_inputs *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations___pyx_scope_struct___read_side_inputs(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct___read_side_inputs *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct___read_side_inputs *)o;
  if (p->__pyx_v_default) {
    e = (*v)(p->__pyx_v_default, a); if (e) return e;
  }
  if (p->__pyx_v_has_default) {
    e = (*v)(p->__pyx_v_has_default, 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___read_side_inputs = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.runners.worker.operations.__pyx_scope_struct___read_side_inputs", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct___read_side_inputs), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations___pyx_scope_struct___read_side_inputs, /*tp_dealloc*/
  0, /*tp_print*/
  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___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___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
};

static struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__ *__pyx_freelist_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__[8];
static int __pyx_freecount_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__ = 0;

static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__(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___init__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__)))) {
    o = (PyObject*)__pyx_freelist_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__[--__pyx_freecount_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__];
    memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__(PyObject *o) {
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__ *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__)))) {
    __pyx_freelist_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__[__pyx_freecount_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__++] = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__ *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__ *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__ *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__ *)o;
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.runners.worker.operations.__pyx_scope_struct_1___init__", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__, /*tp_dealloc*/
  0, /*tp_print*/
  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___init__, /*tp_traverse*/
  __pyx_tp_clear_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

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

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_AsSingleton, __pyx_k_AsSingleton, sizeof(__pyx_k_AsSingleton), 0, 0, 1, 1},
  {&__pyx_n_s_BatchGroupAlsoByWindowsOperation, __pyx_k_BatchGroupAlsoByWindowsOperation, sizeof(__pyx_k_BatchGroupAlsoByWindowsOperation), 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___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_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_receive, __pyx_k_ConsumerSet_receive, sizeof(__pyx_k_ConsumerSet_receive), 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_DataflowNameContext, __pyx_k_DataflowNameContext, sizeof(__pyx_k_DataflowNameContext), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnRunner, __pyx_k_DoFnRunner, sizeof(__pyx_k_DoFnRunner), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnRunnerReceiver, __pyx_k_DoFnRunnerReceiver, sizeof(__pyx_k_DoFnRunnerReceiver), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnRunnerReceiver___init, __pyx_k_DoFnRunnerReceiver___init, sizeof(__pyx_k_DoFnRunnerReceiver___init), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnRunnerReceiver_receive, __pyx_k_DoFnRunnerReceiver_receive, sizeof(__pyx_k_DoFnRunnerReceiver_receive), 0, 0, 1, 1},
  {&__pyx_n_s_DoFnState, __pyx_k_DoFnState, sizeof(__pyx_k_DoFnState), 0, 0, 1, 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__read_side_inputs, __pyx_k_DoOperation__read_side_inputs, sizeof(__pyx_k_DoOperation__read_side_inputs), 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_process, __pyx_k_DoOperation_process, sizeof(__pyx_k_DoOperation_process), 0, 0, 1, 1},
  {&__pyx_n_s_DoOperation_progress_metrics, __pyx_k_DoOperation_progress_metrics, sizeof(__pyx_k_DoOperation_progress_metrics), 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_EmulatedIterable, __pyx_k_EmulatedIterable, sizeof(__pyx_k_EmulatedIterable), 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_kp_u_Finishing_s, __pyx_k_Finishing_s, sizeof(__pyx_k_Finishing_s), 0, 1, 0, 0},
  {&__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_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_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 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_s_vs_0x31, __pyx_k_Incompatible_checksums_s_vs_0x31, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x31), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0x36, __pyx_k_Incompatible_checksums_s_vs_0x36, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x36), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0xdd, __pyx_k_Incompatible_checksums_s_vs_0xdd, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xdd), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0xe5, __pyx_k_Incompatible_checksums_s_vs_0xe5, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xe5), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0xe7, __pyx_k_Incompatible_checksums_s_vs_0xe7, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xe7), 0, 0, 1, 0},
  {&__pyx_n_s_MeanCombineFn, __pyx_k_MeanCombineFn, sizeof(__pyx_k_MeanCombineFn), 0, 0, 1, 1},
  {&__pyx_n_s_Measured, __pyx_k_Measured, sizeof(__pyx_k_Measured), 0, 0, 1, 1},
  {&__pyx_n_s_Metrics, __pyx_k_Metrics, sizeof(__pyx_k_Metrics), 0, 0, 1, 1},
  {&__pyx_n_s_MetricsContainer, __pyx_k_MetricsContainer, sizeof(__pyx_k_MetricsContainer), 0, 0, 1, 1},
  {&__pyx_n_s_NameContext, __pyx_k_NameContext, sizeof(__pyx_k_NameContext), 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_s_NotImplementedError, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1},
  {&__pyx_n_u_ONLY_OUTPUT, __pyx_k_ONLY_OUTPUT, sizeof(__pyx_k_ONLY_OUTPUT), 0, 1, 0, 1},
  {&__pyx_n_s_OUT, __pyx_k_OUT, sizeof(__pyx_k_OUT), 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_add_receiver, __pyx_k_Operation_add_receiver, sizeof(__pyx_k_Operation_add_receiver), 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_output, __pyx_k_Operation_output, sizeof(__pyx_k_Operation_output), 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_progress_metrics, __pyx_k_Operation_progress_metrics, sizeof(__pyx_k_Operation_progress_metrics), 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_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_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_PTransform, __pyx_k_PTransform, sizeof(__pyx_k_PTransform), 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_n_s_ProcessedElements, __pyx_k_ProcessedElements, sizeof(__pyx_k_ProcessedElements), 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_PropertyNames, __pyx_k_PropertyNames, sizeof(__pyx_k_PropertyNames), 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_ScopedMetricsContainer, __pyx_k_ScopedMetricsContainer, sizeof(__pyx_k_ScopedMetricsContainer), 0, 0, 1, 1},
  {&__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_SourceBundle, __pyx_k_SourceBundle, sizeof(__pyx_k_SourceBundle), 0, 0, 1, 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_StreamingGroupAlsoByWindowsOpera, __pyx_k_StreamingGroupAlsoByWindowsOpera, sizeof(__pyx_k_StreamingGroupAlsoByWindowsOpera), 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_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  {&__pyx_kp_u_Unexpected_output_name_for_opera, __pyx_k_Unexpected_output_name_for_opera, sizeof(__pyx_k_Unexpected_output_name_for_opera), 0, 1, 0, 0},
  {&__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_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  {&__pyx_n_s_WindowedValue, __pyx_k_WindowedValue, sizeof(__pyx_k_WindowedValue), 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__16, __pyx_k__16, sizeof(__pyx_k__16), 0, 1, 0, 0},
  {&__pyx_kp_u__17, __pyx_k__17, sizeof(__pyx_k__17), 0, 1, 0, 0},
  {&__pyx_kp_u__18, __pyx_k__18, sizeof(__pyx_k__18), 0, 1, 0, 0},
  {&__pyx_kp_u__19, __pyx_k__19, sizeof(__pyx_k__19), 0, 1, 0, 0},
  {&__pyx_n_u__32, __pyx_k__32, sizeof(__pyx_k__32), 0, 1, 0, 1},
  {&__pyx_kp_u__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 1, 0, 0},
  {&__pyx_kp_u__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 1, 0, 0},
  {&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 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_inputs, __pyx_k_add_inputs, sizeof(__pyx_k_add_inputs), 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_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_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_dataflow_int, __pyx_k_apache_beam_runners_dataflow_int, sizeof(__pyx_k_apache_beam_runners_dataflow_int), 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_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_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_window, __pyx_k_apache_beam_transforms_window, sizeof(__pyx_k_apache_beam_transforms_window), 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_beam_fn_api_pb2, __pyx_k_beam_fn_api_pb2, sizeof(__pyx_k_beam_fn_api_pb2), 0, 0, 1, 1},
  {&__pyx_n_s_builtins, __pyx_k_builtins, sizeof(__pyx_k_builtins), 0, 0, 1, 1},
  {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
  {&__pyx_n_s_clear, __pyx_k_clear, sizeof(__pyx_k_clear), 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_kp_u_coder_2, __pyx_k_coder_2, sizeof(__pyx_k_coder_2), 0, 1, 0, 0},
  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 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_common, __pyx_k_common, sizeof(__pyx_k_common), 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_accumulator, __pyx_k_create_accumulator, sizeof(__pyx_k_create_accumulator), 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_curry_combine_fn, __pyx_k_curry_combine_fn, sizeof(__pyx_k_curry_combine_fn), 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_default, __pyx_k_default, sizeof(__pyx_k_default), 0, 0, 1, 1},
  {&__pyx_n_u_default, __pyx_k_default, sizeof(__pyx_k_default), 0, 1, 0, 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_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_dofn_runner, __pyx_k_dofn_runner, sizeof(__pyx_k_dofn_runner), 0, 0, 1, 1},
  {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 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_end, __pyx_k_end, sizeof(__pyx_k_end), 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_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1},
  {&__pyx_n_s_filter, __pyx_k_filter, sizeof(__pyx_k_filter), 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_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_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_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_range_tracker, __pyx_k_get_range_tracker, sizeof(__pyx_k_get_range_tracker), 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_default, __pyx_k_has_default, sizeof(__pyx_k_has_default), 0, 0, 1, 1},
  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
  {&__pyx_n_u_im_func, __pyx_k_im_func, sizeof(__pyx_k_im_func), 0, 1, 0, 1},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
  {&__pyx_n_s_init___locals_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_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_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_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_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_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_measured, __pyx_k_measured, sizeof(__pyx_k_measured), 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_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_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_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_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_s_output_buffer, __pyx_k_output_buffer, sizeof(__pyx_k_output_buffer), 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_element_counts, __pyx_k_output_element_counts, sizeof(__pyx_k_output_element_counts), 0, 0, 1, 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_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_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_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_processed_elements, __pyx_k_processed_elements, sizeof(__pyx_k_processed_elements), 0, 0, 1, 1},
  {&__pyx_n_s_producer, __pyx_k_producer, sizeof(__pyx_k_producer), 0, 0, 1, 1},
  {&__pyx_n_s_progress_metrics, __pyx_k_progress_metrics, sizeof(__pyx_k_progress_metrics), 0, 0, 1, 1},
  {&__pyx_n_s_pvalue, __pyx_k_pvalue, sizeof(__pyx_k_pvalue), 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_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_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_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_reversed, __pyx_k_reversed, sizeof(__pyx_k_reversed), 0, 0, 1, 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_seconds, __pyx_k_sampled_seconds, sizeof(__pyx_k_sampled_seconds), 0, 0, 1, 1},
  {&__pyx_n_s_sampler, __pyx_k_sampler, sizeof(__pyx_k_sampler), 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_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_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_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_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_startswith, __pyx_k_startswith, sizeof(__pyx_k_startswith), 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_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_system_name, __pyx_k_system_name, sizeof(__pyx_k_system_name), 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_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_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_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
  {&__pyx_n_s_timestamp, __pyx_k_timestamp, sizeof(__pyx_k_timestamp), 0, 0, 1, 1},
  {&__pyx_n_s_to_runner_api, __pyx_k_to_runner_api, sizeof(__pyx_k_to_runner_api), 0, 0, 1, 1},
  {&__pyx_n_s_total_time_spent, __pyx_k_total_time_spent, sizeof(__pyx_k_total_time_spent), 0, 0, 1, 1},
  {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1},
  {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 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_use_setstate, __pyx_k_use_setstate, sizeof(__pyx_k_use_setstate), 0, 0, 1, 1},
  {&__pyx_n_s_user, __pyx_k_user, sizeof(__pyx_k_user), 0, 0, 1, 1},
  {&__pyx_n_s_user_name, __pyx_k_user_name, sizeof(__pyx_k_user_name), 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_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_windowed_value, __pyx_k_windowed_value, sizeof(__pyx_k_windowed_value), 0, 0, 1, 1},
  {&__pyx_n_s_windows, __pyx_k_windows, sizeof(__pyx_k_windows), 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 int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 54, __pyx_L1_error)
  __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 56, __pyx_L1_error)
  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 160, __pyx_L1_error)
  __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 241, __pyx_L1_error)
  __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 320, __pyx_L1_error)
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 368, __pyx_L1_error)
  __pyx_builtin_min = __Pyx_GetBuiltinName(__pyx_n_s_min); if (!__pyx_builtin_min) __PYX_ERR(0, 518, __pyx_L1_error)
  __pyx_builtin_max = __Pyx_GetBuiltinName(__pyx_n_s_max); if (!__pyx_builtin_max) __PYX_ERR(0, 518, __pyx_L1_error)
  __pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_n_s_sum); if (!__pyx_builtin_sum) __PYX_ERR(0, 518, __pyx_L1_error)
  __pyx_builtin_reversed = __Pyx_GetBuiltinName(__pyx_n_s_reversed); if (!__pyx_builtin_reversed) __PYX_ERR(0, 543, __pyx_L1_error)
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 643, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "apache_beam/runners/worker/operations.py":240
 * 
 *   def start(self):
 *     with self.scoped_start_state:             # <<<<<<<<<<<<<<
 *       super(ReadOperation, self).start()
 *       range_tracker = self.spec.source.source.get_range_tracker(
 */
  __pyx_tuple__23 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__23);
  __Pyx_GIVEREF(__pyx_tuple__23);

  /* "apache_beam/runners/worker/operations.py":256
 * 
 *   def process(self, o):
 *     with self.scoped_process_state:             # <<<<<<<<<<<<<<
 *       if self.debug_logging_enabled:
 *         logging.debug('Processing [%s] in %s', o, self)
 */
  __pyx_tuple__27 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__27);
  __Pyx_GIVEREF(__pyx_tuple__27);

  /* "apache_beam/runners/worker/operations.py":345
 * 
 *   def start(self):
 *     with self.scoped_start_state:             # <<<<<<<<<<<<<<
 *       super(DoOperation, self).start()
 * 
 */
  __pyx_tuple__33 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__33);
  __Pyx_GIVEREF(__pyx_tuple__33);

  /* "apache_beam/runners/worker/operations.py":391
 * 
 *   def process(self, o):
 *     with self.scoped_process_state:             # <<<<<<<<<<<<<<
 *       self.dofn_receiver.receive(o)
 * 
 */
  __pyx_tuple__35 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__35);
  __Pyx_GIVEREF(__pyx_tuple__35);

  /* "apache_beam/runners/worker/operations.py":395
 * 
 *   def finish(self):
 *     with self.scoped_finish_state:             # <<<<<<<<<<<<<<
 *       self.dofn_runner.finish()
 * 
 */
  __pyx_tuple__37 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__37);
  __Pyx_GIVEREF(__pyx_tuple__37);

  /* "apache_beam/runners/worker/operations.py":426
 *     # 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__43 = PySlice_New(Py_None, __pyx_int_3, Py_None); if (unlikely(!__pyx_slice__43)) __PYX_ERR(0, 426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__43);
  __Pyx_GIVEREF(__pyx_slice__43);

  /* "apache_beam/runners/worker/operations.py":431
 * 
 *   def process(self, o):
 *     with self.scoped_process_state:             # <<<<<<<<<<<<<<
 *       if self.debug_logging_enabled:
 *         logging.debug('Processing [%s] in %s', o, self)
 */
  __pyx_tuple__45 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__45);
  __Pyx_GIVEREF(__pyx_tuple__45);

  /* "apache_beam/runners/worker/operations.py":467
 * 
 *   def process(self, o):
 *     with self.scoped_process_state:             # <<<<<<<<<<<<<<
 *       # TODO(robertwb): Structural (hashable) values.
 *       key = o.value[0], tuple(o.windows)
 */
  __pyx_tuple__52 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__52);
  __Pyx_GIVEREF(__pyx_tuple__52);

  /* "apache_beam/runners/worker/operations.py":476
 * 
 *   def finish(self):
 *     self.flush(0)             # <<<<<<<<<<<<<<
 * 
 *   def flush(self, target):
 */
  __pyx_tuple__54 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__54);
  __Pyx_GIVEREF(__pyx_tuple__54);

  /* "apache_beam/runners/worker/operations.py":500
 *     # 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)
 *     if (getattr(fn.add_input, 'im_func', None)
 */
  __pyx_slice__56 = PySlice_New(Py_None, __pyx_int_3, Py_None); if (unlikely(!__pyx_slice__56)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__56);
  __Pyx_GIVEREF(__pyx_slice__56);

  /* "apache_beam/runners/worker/operations.py":523
 * 
 *   def process(self, wkv):
 *     with self.scoped_process_state:             # <<<<<<<<<<<<<<
 *       key, value = wkv.value
 *       # pylint: disable=unidiomatic-typecheck
 */
  __pyx_tuple__58 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__58);
  __Pyx_GIVEREF(__pyx_tuple__58);

  /* "apache_beam/runners/worker/operations.py":573
 * 
 *   def process(self, o):
 *     with self.scoped_process_state:             # <<<<<<<<<<<<<<
 *       if self.debug_logging_enabled:
 *         logging.debug('Processing [%s] in %s', o, self)
 */
  __pyx_tuple__64 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__64);
  __Pyx_GIVEREF(__pyx_tuple__64);

  /* "apache_beam/runners/worker/operations.py":680
 * 
 *   def operations(self):
 *     return self._ops[:]             # <<<<<<<<<<<<<<
 * 
 *   def execute(self):
 */
  __pyx_slice__70 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__70)) __PYX_ERR(0, 680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__70);
  __Pyx_GIVEREF(__pyx_slice__70);

  /* "apache_beam/runners/worker/operations.py":62
 * 
 * 
 * _globally_windowed_value = GlobalWindows.windowed_value(None)             # <<<<<<<<<<<<<<
 * _global_window_type = type(_globally_windowed_value.windows[0])
 * 
 */
  __pyx_tuple__79 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__79);
  __Pyx_GIVEREF(__pyx_tuple__79);

  /* "apache_beam/runners/worker/operations.py":85
 *     self.coder = coder
 * 
 *   def receive(self, windowed_value):             # <<<<<<<<<<<<<<
 *     self.update_counters_start(windowed_value)
 *     for consumer in self.consumers:
 */
  __pyx_tuple__80 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_windowed_value); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__80);
  __Pyx_GIVEREF(__pyx_tuple__80);
  __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__80, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_receive, 85, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 85, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":91
 *     self.update_counters_finish()
 * 
 *   def update_counters_start(self, windowed_value):             # <<<<<<<<<<<<<<
 *     self.opcounter.update_from(windowed_value)
 * 
 */
  __pyx_tuple__81 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_windowed_value); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__81);
  __Pyx_GIVEREF(__pyx_tuple__81);
  __pyx_codeobj__3 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__81, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_update_counters_start, 91, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__3)) __PYX_ERR(0, 91, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":94
 *     self.opcounter.update_from(windowed_value)
 * 
 *   def update_counters_finish(self):             # <<<<<<<<<<<<<<
 *     self.opcounter.update_collect()
 * 
 */
  __pyx_tuple__82 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__82);
  __Pyx_GIVEREF(__pyx_tuple__82);
  __pyx_codeobj__4 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__82, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_update_counters_finish, 94, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__4)) __PYX_ERR(0, 94, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self.coder, self.consumers, self.opcounter, self.output_index, self.step_name)
 */
  __pyx_tuple__83 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_use_setstate, __pyx_n_s_state, __pyx_n_s_dict_2); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__83);
  __Pyx_GIVEREF(__pyx_tuple__83);
  __pyx_codeobj__7 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__7)) __PYX_ERR(2, 1, __pyx_L1_error)

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_ConsumerSet, (type(self), 0xe53e5b7, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ConsumerSet__set_state(self, __pyx_state)
 */
  __pyx_tuple__84 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(2, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__84);
  __Pyx_GIVEREF(__pyx_tuple__84);
  __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__84, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 14, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(2, 14, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":149
 *     self.receivers = []
 * 
 *   def start(self):             # <<<<<<<<<<<<<<
 *     """Start operation."""
 *     self.debug_logging_enabled = logging.getLogger().isEnabledFor(logging.DEBUG)
 */
  __pyx_tuple__85 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__85);
  __Pyx_GIVEREF(__pyx_tuple__85);
  __pyx_codeobj__9 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_start, 149, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__9)) __PYX_ERR(0, 149, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":162
 *                         for i, coder in enumerate(self.spec.output_coders)]
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     """Process element in operation."""
 *     pass
 */
  __pyx_tuple__86 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_o); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__86);
  __Pyx_GIVEREF(__pyx_tuple__86);
  __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_process, 162, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 162, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":166
 *     pass
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     """Finish operation."""
 *     pass
 */
  __pyx_tuple__87 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__87);
  __Pyx_GIVEREF(__pyx_tuple__87);
  __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__87, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_finish, 166, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) __PYX_ERR(0, 166, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":170
 *     pass
 * 
 *   def output(self, windowed_value, output_index=0):             # <<<<<<<<<<<<<<
 *     cython.cast(Receiver, self.receivers[output_index]).receive(windowed_value)
 * 
 */
  __pyx_tuple__88 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_windowed_value, __pyx_n_s_output_index); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__88);
  __Pyx_GIVEREF(__pyx_tuple__88);
  __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__88, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_output, 170, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 170, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":173
 *     cython.cast(Receiver, self.receivers[output_index]).receive(windowed_value)
 * 
 *   def add_receiver(self, operation, output_index=0):             # <<<<<<<<<<<<<<
 *     """Adds a receiver operation for the specified output."""
 *     self.consumers[output_index].append(operation)
 */
  __pyx_tuple__89 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_operation, __pyx_n_s_output_index); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__89);
  __Pyx_GIVEREF(__pyx_tuple__89);
  __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__89, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_add_receiver, 173, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(0, 173, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":177
 *     self.consumers[output_index].append(operation)
 * 
 *   def progress_metrics(self):             # <<<<<<<<<<<<<<
 *     return beam_fn_api_pb2.Metrics.PTransform(
 *         processed_elements=beam_fn_api_pb2.Metrics.PTransform.ProcessedElements(
 */
  __pyx_tuple__90 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(0, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__90);
  __Pyx_GIVEREF(__pyx_tuple__90);
  __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__90, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_progress_metrics, 177, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 177, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":209
 *     return self.str_internal()
 * 
 *   def str_internal(self, is_recursive=False):             # <<<<<<<<<<<<<<
 *     """Internal helper for __str__ that supports recursion.
 * 
 */
  __pyx_tuple__91 = 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__91)) __PYX_ERR(0, 209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__91);
  __Pyx_GIVEREF(__pyx_tuple__91);
  __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__91, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_str_internal, 209, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) __PYX_ERR(0, 209, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, self.spec, self.state_sampler, self.step_name)
 */
  __pyx_tuple__92 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_use_setstate, __pyx_n_s_state, __pyx_n_s_dict_2); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__92);
  __Pyx_GIVEREF(__pyx_tuple__92);
  __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__92, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(2, 1, __pyx_L1_error)

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_Operation, (type(self), 0x31178f9, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Operation__set_state(self, __pyx_state)
 */
  __pyx_tuple__93 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(2, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__93);
  __Pyx_GIVEREF(__pyx_tuple__93);
  __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__93, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 14, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(2, 14, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":239
 * class ReadOperation(Operation):
 * 
 *   def start(self):             # <<<<<<<<<<<<<<
 *     with self.scoped_start_state:
 *       super(ReadOperation, self).start()
 */
  __pyx_tuple__94 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__94);
  __Pyx_GIVEREF(__pyx_tuple__94);
  __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__94, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_start, 239, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 239, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, self.spec, self.state_sampler, self.step_name)
 */
  __pyx_tuple__95 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_use_setstate, __pyx_n_s_state, __pyx_n_s_dict_2); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__95);
  __Pyx_GIVEREF(__pyx_tuple__95);
  __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__95, __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)":14
 *     else:
 *         return __pyx_unpickle_ReadOperation, (type(self), 0x31178f9, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ReadOperation__set_state(self, __pyx_state)
 */
  __pyx_tuple__96 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(2, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__96);
  __Pyx_GIVEREF(__pyx_tuple__96);
  __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__96, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 14, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__25)) __PYX_ERR(2, 14, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":255
 *   """A write operation that will write to an in-memory sink."""
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     with self.scoped_process_state:
 *       if self.debug_logging_enabled:
 */
  __pyx_tuple__97 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_o); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__97);
  __Pyx_GIVEREF(__pyx_tuple__97);
  __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__97, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_process, 255, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 255, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":265
 * class _TaggedReceivers(dict):
 * 
 *   def __init__(self, counter_factory, step_name):             # <<<<<<<<<<<<<<
 *     self._counter_factory = counter_factory
 *     self._step_name = step_name
 */
  __pyx_tuple__98 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_counter_factory, __pyx_n_s_step_name); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(0, 265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__98);
  __Pyx_GIVEREF(__pyx_tuple__98);
  __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__98, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_init, 265, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 265, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":269
 *     self._step_name = step_name
 * 
 *   def __missing__(self, tag):             # <<<<<<<<<<<<<<
 *     self[tag] = receiver = ConsumerSet(
 *         self._counter_factory, self._step_name, tag, [], None)
 */
  __pyx_tuple__99 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_receiver); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(0, 269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__99);
  __Pyx_GIVEREF(__pyx_tuple__99);
  __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__99, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_missing, 269, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 269, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":284
 *     self.tagged_receivers = None
 * 
 *   def _read_side_inputs(self, tags_and_types):             # <<<<<<<<<<<<<<
 *     """Generator reading side inputs in the order prescribed by tags_and_types.
 * 
 */
  __pyx_tuple__100 = PyTuple_Pack(12, __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_iterator_fn, __pyx_n_s_has_default, __pyx_n_s_default); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__100);
  __Pyx_GIVEREF(__pyx_tuple__100);
  __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(2, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__100, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_read_side_inputs, 284, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 284, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":344
 *           view_class, view_options, sideinputs.EmulatedIterable(iterator_fn))
 * 
 *   def start(self):             # <<<<<<<<<<<<<<
 *     with self.scoped_start_state:
 *       super(DoOperation, self).start()
 */
  __pyx_tuple__101 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(0, 344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__101);
  __Pyx_GIVEREF(__pyx_tuple__101);
  __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__101, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_start, 344, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(0, 344, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":390
 *       self.dofn_runner.start()
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     with self.scoped_process_state:
 *       self.dofn_receiver.receive(o)
 */
  __pyx_tuple__102 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_o); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(0, 390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__102);
  __Pyx_GIVEREF(__pyx_tuple__102);
  __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__102, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_process, 390, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 390, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":394
 *       self.dofn_receiver.receive(o)
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     with self.scoped_finish_state:
 *       self.dofn_runner.finish()
 */
  __pyx_tuple__103 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(0, 394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__103);
  __Pyx_GIVEREF(__pyx_tuple__103);
  __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__103, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_finish, 394, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 394, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":398
 *       self.dofn_runner.finish()
 * 
 *   def progress_metrics(self):             # <<<<<<<<<<<<<<
 *     metrics = super(DoOperation, self).progress_metrics()
 *     if self.tagged_receivers:
 */
  __pyx_tuple__104 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(0, 398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__104);
  __Pyx_GIVEREF(__pyx_tuple__104);
  __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__104, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_progress_metrics, 398, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 398, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.dofn_receiver, self.dofn_runner, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, self.side_input_maps, self.spec, self.state_sampler, self.step_name, self.tagged_receivers)
 */
  __pyx_tuple__105 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_use_setstate, __pyx_n_s_state, __pyx_n_s_dict_2); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__105);
  __Pyx_GIVEREF(__pyx_tuple__105);
  __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__105, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(2, 1, __pyx_L1_error)

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_DoOperation, (type(self), 0x36f06cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DoOperation__set_state(self, __pyx_state)
 */
  __pyx_tuple__106 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(2, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__106);
  __Pyx_GIVEREF(__pyx_tuple__106);
  __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 14, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(2, 14, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":410
 * class DoFnRunnerReceiver(Receiver):
 * 
 *   def __init__(self, dofn_runner):             # <<<<<<<<<<<<<<
 *     self.dofn_runner = dofn_runner
 * 
 */
  __pyx_tuple__107 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_dofn_runner); if (unlikely(!__pyx_tuple__107)) __PYX_ERR(0, 410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__107);
  __Pyx_GIVEREF(__pyx_tuple__107);
  __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__107, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_init, 410, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 410, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":413
 *     self.dofn_runner = dofn_runner
 * 
 *   def receive(self, windowed_value):             # <<<<<<<<<<<<<<
 *     self.dofn_runner.process(windowed_value)
 * 
 */
  __pyx_tuple__108 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_windowed_value); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__108);
  __Pyx_GIVEREF(__pyx_tuple__108);
  __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__108, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_receive, 413, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 413, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":430
 *         PhasedCombineFnExecutor(self.spec.phase, fn, args, kwargs))
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     with self.scoped_process_state:
 *       if self.debug_logging_enabled:
 */
  __pyx_tuple__109 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_o); if (unlikely(!__pyx_tuple__109)) __PYX_ERR(0, 430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__109);
  __Pyx_GIVEREF(__pyx_tuple__109);
  __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__109, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_process, 430, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 430, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":438
 *           o.with_value((key, self.phased_combine_fn.apply(values))))
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     logging.debug('Finishing %s', self)
 * 
 */
  __pyx_tuple__110 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(0, 438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__110);
  __Pyx_GIVEREF(__pyx_tuple__110);
  __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__110, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_finish, 438, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 438, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.metrics_container, self.name_context, self.operation_name, self.phased_combine_fn, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, self.spec, self.state_sampler, self.step_name)
 */
  __pyx_tuple__111 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_use_setstate, __pyx_n_s_state, __pyx_n_s_dict_2); if (unlikely(!__pyx_tuple__111)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__111);
  __Pyx_GIVEREF(__pyx_tuple__111);
  __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__111, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(2, 1, __pyx_L1_error)

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_CombineOperation, (type(self), 0xdd72a47, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CombineOperation__set_state(self, __pyx_state)
 */
  __pyx_tuple__112 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__112)) __PYX_ERR(2, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__112);
  __Pyx_GIVEREF(__pyx_tuple__112);
  __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__112, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 14, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(2, 14, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":442
 * 
 * 
 * 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__113 = 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__113)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__113);
  __Pyx_GIVEREF(__pyx_tuple__113);
  __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__113, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_create_pgbk_op, 442, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(0, 442, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":457
 *   """
 * 
 *   def __init__(self, name_context, spec, counter_factory, state_sampler):             # <<<<<<<<<<<<<<
 *     super(PGBKOperation, self).__init__(
 *         name_context, spec, counter_factory, state_sampler)
 */
  __pyx_tuple__114 = 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__114)) __PYX_ERR(0, 457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__114);
  __Pyx_GIVEREF(__pyx_tuple__114);
  __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__114, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_init, 457, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(0, 457, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":466
 *     self.max_size = 10 * 1000
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     with self.scoped_process_state:
 *       # TODO(robertwb): Structural (hashable) values.
 */
  __pyx_tuple__115 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_o, __pyx_n_s_key); if (unlikely(!__pyx_tuple__115)) __PYX_ERR(0, 466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__115);
  __Pyx_GIVEREF(__pyx_tuple__115);
  __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__115, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_process, 466, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(0, 466, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":475
 *         self.flush(9 * self.max_size // 10)
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     self.flush(0)
 * 
 */
  __pyx_tuple__116 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__116)) __PYX_ERR(0, 475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__116);
  __Pyx_GIVEREF(__pyx_tuple__116);
  __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__116, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_finish, 475, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(0, 475, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":478
 *     self.flush(0)
 * 
 *   def flush(self, target):             # <<<<<<<<<<<<<<
 *     limit = self.size - target
 *     for ix, (kw, vs) in enumerate(self.table.items()):
 */
  __pyx_tuple__117 = 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__117)) __PYX_ERR(0, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__117);
  __Pyx_GIVEREF(__pyx_tuple__117);
  __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(2, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__117, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_flush, 478, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(0, 478, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":522
 *     self.table = {}
 * 
 *   def process(self, wkv):             # <<<<<<<<<<<<<<
 *     with self.scoped_process_state:
 *       key, value = wkv.value
 */
  __pyx_tuple__118 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_wkv); if (unlikely(!__pyx_tuple__118)) __PYX_ERR(0, 522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__118);
  __Pyx_GIVEREF(__pyx_tuple__118);
  __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__118, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_process, 522, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(0, 522, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":551
 *       entry[0] = self.combine_fn_add_input(entry[0], value)
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     for wkey, value in self.table.items():
 *       self.output_key(wkey, value[0])
 */
  __pyx_tuple__119 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__119)) __PYX_ERR(0, 551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__119);
  __Pyx_GIVEREF(__pyx_tuple__119);
  __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__119, __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__59)) __PYX_ERR(0, 551, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":557
 *     self.key_count = 0
 * 
 *   def output_key(self, wkey, value):             # <<<<<<<<<<<<<<
 *     windows, key = wkey
 *     if windows is 0:
 */
  __pyx_tuple__120 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_wkey, __pyx_n_s_value); if (unlikely(!__pyx_tuple__120)) __PYX_ERR(0, 557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__120);
  __Pyx_GIVEREF(__pyx_tuple__120);
  __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__120, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_output_key, 557, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 557, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self.combine_fn, self.combine_fn_add_input, self.consumers, self.counter_factory, self.debug_logging_enabled, self.key_count, self.max_keys, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, self.spec, self.state_sampler, self.step_name, self.table)
 */
  __pyx_tuple__121 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_use_setstate, __pyx_n_s_state, __pyx_n_s_dict_2); if (unlikely(!__pyx_tuple__121)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__121);
  __Pyx_GIVEREF(__pyx_tuple__121);
  __pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__121, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(2, 1, __pyx_L1_error)

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_PGBKCVOperation, (type(self), 0xe750882, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_PGBKCVOperation__set_state(self, __pyx_state)
 */
  __pyx_tuple__122 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__122)) __PYX_ERR(2, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__122);
  __Pyx_GIVEREF(__pyx_tuple__122);
  __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__122, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 14, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(2, 14, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":572
 *   """
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     with self.scoped_process_state:
 *       if self.debug_logging_enabled:
 */
  __pyx_tuple__123 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_o); if (unlikely(!__pyx_tuple__123)) __PYX_ERR(0, 572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__123);
  __Pyx_GIVEREF(__pyx_tuple__123);
  __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__123, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_process, 572, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(0, 572, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, self.spec, self.state_sampler, self.step_name)
 */
  __pyx_tuple__124 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_use_setstate, __pyx_n_s_state, __pyx_n_s_dict_2); if (unlikely(!__pyx_tuple__124)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__124);
  __Pyx_GIVEREF(__pyx_tuple__124);
  __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__124, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(2, 1, __pyx_L1_error)

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_FlattenOperation, (type(self), 0x31178f9, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_FlattenOperation__set_state(self, __pyx_state)
 */
  __pyx_tuple__125 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__125)) __PYX_ERR(2, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__125);
  __Pyx_GIVEREF(__pyx_tuple__125);
  __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__125, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 14, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(2, 14, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":579
 * 
 * 
 * def create_operation(name_context, spec, counter_factory, step_name,             # <<<<<<<<<<<<<<
 *                      state_sampler, test_shuffle_source=None,
 *                      test_shuffle_sink=None, is_streaming=False):
 */
  __pyx_tuple__126 = 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__126)) __PYX_ERR(0, 579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__126);
  __Pyx_GIVEREF(__pyx_tuple__126);
  __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(8, 0, 17, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__126, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_create_operation, 579, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 579, __pyx_L1_error)
  __pyx_tuple__127 = PyTuple_Pack(3, ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__127)) __PYX_ERR(0, 579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__127);
  __Pyx_GIVEREF(__pyx_tuple__127);

  /* "apache_beam/runners/worker/operations.py":655
 *   """
 * 
 *   def __init__(             # <<<<<<<<<<<<<<
 *       self, map_task, counter_factory, state_sampler,
 *       test_shuffle_source=None, test_shuffle_sink=None):
 */
  __pyx_tuple__128 = 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__128)) __PYX_ERR(0, 655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__128);
  __Pyx_GIVEREF(__pyx_tuple__128);
  __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__128, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_init, 655, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(0, 655, __pyx_L1_error)
  __pyx_tuple__129 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__129)) __PYX_ERR(0, 655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__129);
  __Pyx_GIVEREF(__pyx_tuple__129);

  /* "apache_beam/runners/worker/operations.py":679
 *     self._test_shuffle_sink = test_shuffle_sink
 * 
 *   def operations(self):             # <<<<<<<<<<<<<<
 *     return self._ops[:]
 * 
 */
  __pyx_tuple__130 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__130)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__130);
  __Pyx_GIVEREF(__pyx_tuple__130);
  __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__130, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_operations, 679, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(0, 679, __pyx_L1_error)

  /* "apache_beam/runners/worker/operations.py":682
 *     return self._ops[:]
 * 
 *   def execute(self):             # <<<<<<<<<<<<<<
 *     """Executes all the operation_specs.Worker* instructions in a map task.
 * 
 */
  __pyx_tuple__131 = 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__131)) __PYX_ERR(0, 682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__131);
  __Pyx_GIVEREF(__pyx_tuple__131);
  __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__131, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_runners_worker_opera_2, __pyx_n_s_execute, 682, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(0, 682, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __pyx_unpickle_ConsumerSet(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0xe53e5b7:
 *         from pickle import PickleError as __pyx_PickleError
 */
  __pyx_tuple__132 = 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__132)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__132);
  __Pyx_GIVEREF(__pyx_tuple__132);
  __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_ConsumerSet, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(2, 1, __pyx_L1_error)
  __pyx_tuple__133 = 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__133)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__133);
  __Pyx_GIVEREF(__pyx_tuple__133);
  __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__133, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Operation, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(2, 1, __pyx_L1_error)
  __pyx_tuple__134 = 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__134)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__134);
  __Pyx_GIVEREF(__pyx_tuple__134);
  __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__134, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_ReadOperation, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(2, 1, __pyx_L1_error)
  __pyx_tuple__135 = 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__135)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__135);
  __Pyx_GIVEREF(__pyx_tuple__135);
  __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DoOperation, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) __PYX_ERR(2, 1, __pyx_L1_error)
  __pyx_tuple__136 = 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__136)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__136);
  __Pyx_GIVEREF(__pyx_tuple__136);
  __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__136, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_CombineOperation, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(2, 1, __pyx_L1_error)
  __pyx_tuple__137 = 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__137)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__137);
  __Pyx_GIVEREF(__pyx_tuple__137);
  __pyx_codeobj__77 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__137, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_PGBKCVOperation, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__77)) __PYX_ERR(2, 1, __pyx_L1_error)
  __pyx_tuple__138 = 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__138)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__138);
  __Pyx_GIVEREF(__pyx_tuple__138);
  __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__138, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_FlattenOperation, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_InitGlobals(void) {
  __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_10000 = PyInt_FromLong(10000L); if (unlikely(!__pyx_int_10000)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_51476729 = PyInt_FromLong(51476729L); if (unlikely(!__pyx_int_51476729)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_57607885 = PyInt_FromLong(57607885L); if (unlikely(!__pyx_int_57607885)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_232204871 = PyInt_FromLong(232204871L); if (unlikely(!__pyx_int_232204871)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_240379319 = PyInt_FromLong(240379319L); if (unlikely(!__pyx_int_240379319)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_242550914 = PyInt_FromLong(242550914L); if (unlikely(!__pyx_int_242550914)) __PYX_ERR(0, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static int __Pyx_modinit_global_init_code(void); /*proto*/
static int __Pyx_modinit_variable_export_code(void); /*proto*/
static int __Pyx_modinit_function_export_code(void); /*proto*/
static int __Pyx_modinit_type_init_code(void); /*proto*/
static int __Pyx_modinit_type_import_code(void); /*proto*/
static int __Pyx_modinit_variable_import_code(void); /*proto*/
static 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
  __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
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  __pyx_ptype_11apache_beam_7runners_6common_Receiver = __Pyx_ImportType("apache_beam.runners.common", "Receiver", sizeof(struct __pyx_obj_11apache_beam_7runners_6common_Receiver), 1); if (unlikely(!__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.__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_11ConsumerSet_receive;
  __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_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, 66, __pyx_L1_error)
  __pyx_type_11apache_beam_7runners_6worker_10operations_ConsumerSet.tp_print = 0;
  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, 66, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "ConsumerSet", (PyObject *)&__pyx_type_11apache_beam_7runners_6worker_10operations_ConsumerSet) < 0) __PYX_ERR(0, 66, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_7runners_6worker_10operations_ConsumerSet) < 0) __PYX_ERR(0, 66, __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_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.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.progress_metrics = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_progress_metrics;
  if (PyType_Ready(&__pyx_type_11apache_beam_7runners_6worker_10operations_Operation) < 0) __PYX_ERR(0, 103, __pyx_L1_error)
  __pyx_type_11apache_beam_7runners_6worker_10operations_Operation.tp_print = 0;
  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_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_11apache_beam_7runners_6worker_10operations_Operation, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 103, __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_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_11apache_beam_7runners_6worker_10operations_Operation, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 103, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_11apache_beam_7runners_6worker_10operations_9Operation_14__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_11apache_beam_7runners_6worker_10operations_9Operation_14__str__.doc = __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_14__str__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_11apache_beam_7runners_6worker_10operations_9Operation_14__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, 103, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "Operation", (PyObject *)&__pyx_type_11apache_beam_7runners_6worker_10operations_Operation) < 0) __PYX_ERR(0, 103, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_7runners_6worker_10operations_Operation) < 0) __PYX_ERR(0, 103, __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, 237, __pyx_L1_error)
  __pyx_type_11apache_beam_7runners_6worker_10operations_ReadOperation.tp_print = 0;
  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, 237, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "ReadOperation", (PyObject *)&__pyx_type_11apache_beam_7runners_6worker_10operations_ReadOperation) < 0) __PYX_ERR(0, 237, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_7runners_6worker_10operations_ReadOperation) < 0) __PYX_ERR(0, 237, __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_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.progress_metrics = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_progress_metrics;
  __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, 275, __pyx_L1_error)
  __pyx_type_11apache_beam_7runners_6worker_10operations_DoOperation.tp_print = 0;
  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, 275, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "DoOperation", (PyObject *)&__pyx_type_11apache_beam_7runners_6worker_10operations_DoOperation) < 0) __PYX_ERR(0, 275, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_7runners_6worker_10operations_DoOperation) < 0) __PYX_ERR(0, 275, __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_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_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, 417, __pyx_L1_error)
  __pyx_type_11apache_beam_7runners_6worker_10operations_CombineOperation.tp_print = 0;
  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, 417, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "CombineOperation", (PyObject *)&__pyx_type_11apache_beam_7runners_6worker_10operations_CombineOperation) < 0) __PYX_ERR(0, 417, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_7runners_6worker_10operations_CombineOperation) < 0) __PYX_ERR(0, 417, __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.output_key = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *, 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, 492, __pyx_L1_error)
  __pyx_type_11apache_beam_7runners_6worker_10operations_PGBKCVOperation.tp_print = 0;
  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, 492, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "PGBKCVOperation", (PyObject *)&__pyx_type_11apache_beam_7runners_6worker_10operations_PGBKCVOperation) < 0) __PYX_ERR(0, 492, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_7runners_6worker_10operations_PGBKCVOperation) < 0) __PYX_ERR(0, 492, __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, 565, __pyx_L1_error)
  __pyx_type_11apache_beam_7runners_6worker_10operations_FlattenOperation.tp_print = 0;
  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, 565, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "FlattenOperation", (PyObject *)&__pyx_type_11apache_beam_7runners_6worker_10operations_FlattenOperation) < 0) __PYX_ERR(0, 565, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_7runners_6worker_10operations_FlattenOperation) < 0) __PYX_ERR(0, 565, __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___read_side_inputs) < 0) __PYX_ERR(0, 284, __pyx_L1_error)
  __pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct___read_side_inputs.tp_print = 0;
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct___read_side_inputs.tp_dictoffset && __pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct___read_side_inputs.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct___read_side_inputs.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct___read_side_inputs = &__pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct___read_side_inputs;
  if (PyType_Ready(&__pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__) < 0) __PYX_ERR(0, 494, __pyx_L1_error)
  __pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__.tp_print = 0;
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__.tp_dictoffset && __pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__ = &__pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1___init__;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue = __Pyx_ImportType("apache_beam.utils.windowed_value", "WindowedValue", sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue), 1); if (unlikely(!__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue)) __PYX_ERR(3, 25, __pyx_L1_error)
  __pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedValue = (struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedValue*)__Pyx_GetVtable(__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue->tp_dict); if (unlikely(!__pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedValue)) __PYX_ERR(3, 25, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer = __Pyx_ImportType("apache_beam.metrics.execution", "MetricsContainer", sizeof(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer), 1); if (unlikely(!__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer)) __PYX_ERR(4, 21, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7metrics_9execution_ScopedMetricsContainer = __Pyx_ImportType("apache_beam.metrics.execution", "ScopedMetricsContainer", sizeof(struct __pyx_obj_11apache_beam_7metrics_9execution_ScopedMetricsContainer), 1); if (unlikely(!__pyx_ptype_11apache_beam_7metrics_9execution_ScopedMetricsContainer)) __PYX_ERR(4, 28, __pyx_L1_error)
  __pyx_vtabptr_11apache_beam_7metrics_9execution_ScopedMetricsContainer = (struct __pyx_vtabstruct_11apache_beam_7metrics_9execution_ScopedMetricsContainer*)__Pyx_GetVtable(__pyx_ptype_11apache_beam_7metrics_9execution_ScopedMetricsContainer->tp_dict); if (unlikely(!__pyx_vtabptr_11apache_beam_7metrics_9execution_ScopedMetricsContainer)) __PYX_ERR(4, 28, __pyx_L1_error)
  __pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter = __Pyx_ImportType("apache_beam.transforms.cy_dataflow_distribution_counter", "DataflowDistributionCounter", sizeof(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter), 1); if (unlikely(!__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_ptype_11apache_beam_7runners_6common_MethodWrapper = __Pyx_ImportType("apache_beam.runners.common", "MethodWrapper", sizeof(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper), 1); if (unlikely(!__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper)) __PYX_ERR(6, 34, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6common_DoFnSignature = __Pyx_ImportType("apache_beam.runners.common", "DoFnSignature", sizeof(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature), 1); if (unlikely(!__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature)) __PYX_ERR(6, 40, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker = __Pyx_ImportType("apache_beam.runners.common", "DoFnInvoker", sizeof(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker), 1); if (unlikely(!__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker)) __PYX_ERR(6, 51, __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, 51, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker = __Pyx_ImportType("apache_beam.runners.common", "SimpleInvoker", sizeof(struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker), 1); if (unlikely(!__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker)) __PYX_ERR(6, 67, __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, 67, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker = __Pyx_ImportType("apache_beam.runners.common", "PerWindowInvoker", sizeof(struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker), 1); if (unlikely(!__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker)) __PYX_ERR(6, 71, __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, 71, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6common_DoFnRunner = __Pyx_ImportType("apache_beam.runners.common", "DoFnRunner", sizeof(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner), 1); if (unlikely(!__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner)) __PYX_ERR(6, 82, __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, 82, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6common_OutputProcessor = __Pyx_ImportType("apache_beam.runners.common", "OutputProcessor", sizeof(struct __pyx_obj_11apache_beam_7runners_6common_OutputProcessor), 1); if (unlikely(!__pyx_ptype_11apache_beam_7runners_6common_OutputProcessor)) __PYX_ERR(6, 91, __pyx_L1_error)
  __pyx_vtabptr_11apache_beam_7runners_6common_OutputProcessor = (struct __pyx_vtabstruct_11apache_beam_7runners_6common_OutputProcessor*)__Pyx_GetVtable(__pyx_ptype_11apache_beam_7runners_6common_OutputProcessor->tp_dict); if (unlikely(!__pyx_vtabptr_11apache_beam_7runners_6common_OutputProcessor)) __PYX_ERR(6, 91, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6common__OutputProcessor = __Pyx_ImportType("apache_beam.runners.common", "_OutputProcessor", sizeof(struct __pyx_obj_11apache_beam_7runners_6common__OutputProcessor), 1); if (unlikely(!__pyx_ptype_11apache_beam_7runners_6common__OutputProcessor)) __PYX_ERR(6, 97, __pyx_L1_error)
  __pyx_vtabptr_11apache_beam_7runners_6common__OutputProcessor = (struct __pyx_vtabstruct_11apache_beam_7runners_6common__OutputProcessor*)__Pyx_GetVtable(__pyx_ptype_11apache_beam_7runners_6common__OutputProcessor->tp_dict); if (unlikely(!__pyx_vtabptr_11apache_beam_7runners_6common__OutputProcessor)) __PYX_ERR(6, 97, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6common_DoFnContext = __Pyx_ImportType("apache_beam.runners.common", "DoFnContext", sizeof(struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext), 1); if (unlikely(!__pyx_ptype_11apache_beam_7runners_6common_DoFnContext)) __PYX_ERR(6, 106, __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, 106, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6common__ReceiverAdapter = __Pyx_ImportType("apache_beam.runners.common", "_ReceiverAdapter", sizeof(struct __pyx_obj_11apache_beam_7runners_6common__ReceiverAdapter), 1); if (unlikely(!__pyx_ptype_11apache_beam_7runners_6common__ReceiverAdapter)) __PYX_ERR(6, 113, __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, 113, __pyx_L1_error)
  __pyx_ptype_11apache_beam_5utils_8counters_Counter = __Pyx_ImportType("apache_beam.utils.counters", "Counter", sizeof(struct __pyx_obj_11apache_beam_5utils_8counters_Counter), 1); if (unlikely(!__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("apache_beam.utils.counters", "AccumulatorCombineFnCounter", sizeof(struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter), 1); if (unlikely(!__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_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", 
  #if CYTHON_COMPILING_IN_PYPY
  sizeof(PyTypeObject),
  #else
  sizeof(PyHeapTypeObject),
  #endif
  0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) __PYX_ERR(8, 9, __pyx_L1_error)
  __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), 0); if (unlikely(!__pyx_ptype_7cpython_4bool_bool)) __PYX_ERR(9, 8, __pyx_L1_error)
  __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), 0); if (unlikely(!__pyx_ptype_7cpython_7complex_complex)) __PYX_ERR(10, 15, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler = __Pyx_ImportType("apache_beam.runners.worker.statesampler_fast", "StateSampler", sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler), 1); if (unlikely(!__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler)) __PYX_ERR(11, 25, __pyx_L1_error)
  __pyx_vtabptr_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler = (struct __pyx_vtabstruct_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler*)__Pyx_GetVtable(__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler->tp_dict); if (unlikely(!__pyx_vtabptr_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler)) __PYX_ERR(11, 25, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState = __Pyx_ImportType("apache_beam.runners.worker.statesampler_fast", "ScopedState", sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState), 1); if (unlikely(!__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState)) __PYX_ERR(11, 49, __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(11, 49, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter = __Pyx_ImportType("apache_beam.runners.worker.opcounters", "TransformIOCounter", sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter), 1); if (unlikely(!__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter)) __PYX_ERR(12, 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(12, 25, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter = __Pyx_ImportType("apache_beam.runners.worker.opcounters", "NoOpTransformIOCounter", sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter), 1); if (unlikely(!__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter)) __PYX_ERR(12, 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(12, 38, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter = __Pyx_ImportType("apache_beam.runners.worker.opcounters", "SideInputReadCounter", sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter), 1); if (unlikely(!__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter)) __PYX_ERR(12, 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(12, 42, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SumAccumulator = __Pyx_ImportType("apache_beam.runners.worker.opcounters", "SumAccumulator", sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator), 1); if (unlikely(!__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SumAccumulator)) __PYX_ERR(12, 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(12, 47, __pyx_L1_error)
  __pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters = __Pyx_ImportType("apache_beam.runners.worker.opcounters", "OperationCounters", sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters), 1); if (unlikely(!__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters)) __PYX_ERR(12, 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(12, 53, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_variable_import_code(void) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __pyx_t_1 = __Pyx_ImportModule("apache_beam.utils.windowed_value"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportVoidPtr(__pyx_t_1, "Timestamp", (void **)&__pyx_vp_11apache_beam_5utils_14windowed_value_Timestamp, "PyTypeObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_ImportModule("apache_beam.runners.common"); if (!__pyx_t_2) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportVoidPtr(__pyx_t_2, "TaggedOutput", (void **)&__pyx_vp_11apache_beam_7runners_6common_TaggedOutput, "PyTypeObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportVoidPtr(__pyx_t_2, "TimestampedValue", (void **)&__pyx_vp_11apache_beam_7runners_6common_TimestampedValue, "PyTypeObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_function_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}


#if PY_MAJOR_VERSION < 3
#ifdef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC void
#else
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#endif
#else
#ifdef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC PyObject *
#else
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#endif
#endif
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
    #define CYTHON_SMALL_CODE
#elif defined(__GNUC__)
    #define CYTHON_SMALL_CODE __attribute__((optimize("Os")))
#else
    #define CYTHON_SMALL_CODE
#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 int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name) {
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        result = PyDict_SetItemString(moddict, to_name, value);
        Py_DECREF(value);
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Clear();
    } else {
        result = -1;
    }
    return result;
}
static PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    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__") < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__") < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__") < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__") < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


static int __pyx_pymod_exec_operations(PyObject *__pyx_pyinit_module) CYTHON_SMALL_CODE 
#endif
#endif
{
  __Pyx_TraceDeclarations
  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;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m && __pyx_m == __pyx_pyinit_module) return 0;
  #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)
  __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(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  #ifdef WITH_THREAD /* Python build with threading support? */
  PyEval_InitThreads();
  #endif
  #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)
  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  #if CYTHON_COMPILING_IN_PYPY
  Py_INCREF(__pyx_b);
  #endif
  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_SetAttrString(__pyx_m, "__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)) goto __pyx_L1_error;
  (void)__Pyx_modinit_function_export_code();
  if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error;
  if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error;
  if (unlikely(__Pyx_modinit_variable_import_code() != 0)) goto __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":25
 * from __future__ import absolute_import
 * 
 * import collections             # <<<<<<<<<<<<<<
 * import logging
 * from builtins import filter
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_collections, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_collections, __pyx_t_1) < 0) __PYX_ERR(0, 25, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":26
 * 
 * import collections
 * import logging             # <<<<<<<<<<<<<<
 * from builtins import filter
 * from builtins import object
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_logging, 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_logging, __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
 * from builtins import filter             # <<<<<<<<<<<<<<
 * from builtins import object
 * from builtins import zip
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_filter);
  __Pyx_GIVEREF(__pyx_n_s_filter);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_filter);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_builtins, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27, __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_filter); 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_filter, __pyx_t_1) < 0) __PYX_ERR(0, 27, __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":28
 * import logging
 * from builtins import filter
 * from builtins import object             # <<<<<<<<<<<<<<
 * from builtins import zip
 * 
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_object);
  __Pyx_GIVEREF(__pyx_n_s_object);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_object);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_builtins, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __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_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_object, __pyx_t_2) < 0) __PYX_ERR(0, 28, __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":29
 * from builtins import filter
 * from builtins import object
 * from builtins import zip             # <<<<<<<<<<<<<<
 * 
 * from apache_beam import pvalue
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_zip);
  __Pyx_GIVEREF(__pyx_n_s_zip);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_zip);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_builtins, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __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_zip); 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_zip, __pyx_t_1) < 0) __PYX_ERR(0, 29, __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
 * from builtins import zip
 * 
 * from apache_beam import pvalue             # <<<<<<<<<<<<<<
 * 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, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_pvalue);
  __Pyx_GIVEREF(__pyx_n_s_pvalue);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_pvalue);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam, __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_pvalue); 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_pvalue, __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 apache_beam import pvalue
 * from apache_beam.internal import pickler             # <<<<<<<<<<<<<<
 * from apache_beam.io import iobase
 * from apache_beam.metrics.execution import MetricsContainer
 */
  __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_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, 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_pickler); 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_pickler, __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 apache_beam import pvalue
 * from apache_beam.internal import pickler
 * from apache_beam.io import iobase             # <<<<<<<<<<<<<<
 * from apache_beam.metrics.execution import MetricsContainer
 * from apache_beam.metrics.execution import ScopedMetricsContainer
 */
  __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_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, 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_iobase); 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_iobase, __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 apache_beam.internal import pickler
 * from apache_beam.io import iobase
 * from apache_beam.metrics.execution import MetricsContainer             # <<<<<<<<<<<<<<
 * from apache_beam.metrics.execution import ScopedMetricsContainer
 * from apache_beam.portability.api import beam_fn_api_pb2
 */
  __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_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, 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_MetricsContainer); 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_MetricsContainer, __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 apache_beam.io import iobase
 * from apache_beam.metrics.execution import MetricsContainer
 * from apache_beam.metrics.execution import ScopedMetricsContainer             # <<<<<<<<<<<<<<
 * from apache_beam.portability.api import beam_fn_api_pb2
 * from apache_beam.runners import common
 */
  __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_ScopedMetricsContainer);
  __Pyx_GIVEREF(__pyx_n_s_ScopedMetricsContainer);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_ScopedMetricsContainer);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_metrics_execution, __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_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":36
 * from apache_beam.metrics.execution import MetricsContainer
 * from apache_beam.metrics.execution import ScopedMetricsContainer
 * from apache_beam.portability.api import beam_fn_api_pb2             # <<<<<<<<<<<<<<
 * from apache_beam.runners import common
 * from apache_beam.runners.common import Receiver
 */
  __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_beam_fn_api_pb2);
  __Pyx_GIVEREF(__pyx_n_s_beam_fn_api_pb2);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_beam_fn_api_pb2);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_portability_api, __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_beam_fn_api_pb2); 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_beam_fn_api_pb2, __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 apache_beam.metrics.execution import ScopedMetricsContainer
 * from apache_beam.portability.api import beam_fn_api_pb2
 * from apache_beam.runners import common             # <<<<<<<<<<<<<<
 * from apache_beam.runners.common import Receiver
 * from apache_beam.runners.dataflow.internal.names import PropertyNames
 */
  __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_common);
  __Pyx_GIVEREF(__pyx_n_s_common);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_common);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_runners, __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_common); 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_common, __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 apache_beam.portability.api import beam_fn_api_pb2
 * from apache_beam.runners import common
 * from apache_beam.runners.common import Receiver             # <<<<<<<<<<<<<<
 * from apache_beam.runners.dataflow.internal.names import PropertyNames
 * from apache_beam.runners.worker import opcounters
 */
  __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_Receiver);
  __Pyx_GIVEREF(__pyx_n_s_Receiver);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Receiver);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_runners_common, __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_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":39
 * from apache_beam.runners import common
 * from apache_beam.runners.common import Receiver
 * from apache_beam.runners.dataflow.internal.names import PropertyNames             # <<<<<<<<<<<<<<
 * 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, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_PropertyNames);
  __Pyx_GIVEREF(__pyx_n_s_PropertyNames);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PropertyNames);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_runners_dataflow_int, __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_PropertyNames); 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_PropertyNames, __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 apache_beam.runners.common import Receiver
 * from apache_beam.runners.dataflow.internal.names import PropertyNames
 * 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, 40, __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, 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_opcounters); 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_opcounters, __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 apache_beam.runners.dataflow.internal.names import PropertyNames
 * 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.transforms import sideinputs as apache_sideinputs
 */
  __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_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, 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_operation_specs); 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_operation_specs, __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 apache_beam.runners.worker import opcounters
 * from apache_beam.runners.worker import operation_specs
 * from apache_beam.runners.worker import sideinputs             # <<<<<<<<<<<<<<
 * from apache_beam.transforms import sideinputs as apache_sideinputs
 * from apache_beam.transforms import combiners
 */
  __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_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, 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_sideinputs); 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_sideinputs, __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":43
 * from apache_beam.runners.worker import operation_specs
 * from apache_beam.runners.worker import sideinputs
 * from apache_beam.transforms import sideinputs as apache_sideinputs             # <<<<<<<<<<<<<<
 * from apache_beam.transforms import combiners
 * from apache_beam.transforms import core
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_sideinputs);
  __Pyx_GIVEREF(__pyx_n_s_sideinputs);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_sideinputs);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_transforms, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_sideinputs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_apache_sideinputs, __pyx_t_2) < 0) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":44
 * from apache_beam.runners.worker import sideinputs
 * 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.combiners import PhasedCombineFnExecutor
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_combiners);
  __Pyx_GIVEREF(__pyx_n_s_combiners);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_combiners);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_transforms, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_combiners); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_combiners, __pyx_t_1) < 0) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":45
 * 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.combiners import PhasedCombineFnExecutor
 * from apache_beam.transforms.combiners import curry_combine_fn
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_core);
  __Pyx_GIVEREF(__pyx_n_s_core);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_core);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_transforms, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_core); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_core, __pyx_t_2) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":46
 * from apache_beam.transforms import combiners
 * from apache_beam.transforms import core
 * 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_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_PhasedCombineFnExecutor);
  __Pyx_GIVEREF(__pyx_n_s_PhasedCombineFnExecutor);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PhasedCombineFnExecutor);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_transforms_combiners, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_PhasedCombineFnExecutor); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PhasedCombineFnExecutor, __pyx_t_1) < 0) __PYX_ERR(0, 46, __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":47
 * from apache_beam.transforms import core
 * 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.utils.windowed_value import WindowedValue
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_curry_combine_fn);
  __Pyx_GIVEREF(__pyx_n_s_curry_combine_fn);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_curry_combine_fn);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_transforms_combiners, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_curry_combine_fn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_curry_combine_fn, __pyx_t_2) < 0) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":48
 * 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.utils.windowed_value import WindowedValue
 * 
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_GlobalWindows);
  __Pyx_GIVEREF(__pyx_n_s_GlobalWindows);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_GlobalWindows);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_transforms_window, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_GlobalWindows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_GlobalWindows, __pyx_t_1) < 0) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/runners/worker/operations.py":49
 * from apache_beam.transforms.combiners import curry_combine_fn
 * from apache_beam.transforms.window import GlobalWindows
 * from apache_beam.utils.windowed_value import WindowedValue             # <<<<<<<<<<<<<<
 * 
 * # Allow some "pure mode" declarations.
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_WindowedValue);
  __Pyx_GIVEREF(__pyx_n_s_WindowedValue);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_WindowedValue);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_utils_windowed_value, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __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":52
 * 
 * # Allow some "pure mode" declarations.
 * try:             # <<<<<<<<<<<<<<
 *   import cython
 * except ImportError:
 */
  {
    (void)__pyx_t_3; (void)__pyx_t_4; (void)__pyx_t_5; /* mark used */
    /*try:*/ {

      /* "apache_beam/runners/worker/operations.py":53
 * # Allow some "pure mode" declarations.
 * try:
 *   import cython             # <<<<<<<<<<<<<<
 * except ImportError:
 *   class FakeCython(object):
 */
    }
  }

  /* "apache_beam/runners/worker/operations.py":62
 * 
 * 
 * _globally_windowed_value = GlobalWindows.windowed_value(None)             # <<<<<<<<<<<<<<
 * _global_window_type = type(_globally_windowed_value.windows[0])
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_GlobalWindows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_windowed_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__79, NULL); 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;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue))))) __PYX_ERR(0, 62, __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_1));
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":63
 * 
 * _globally_windowed_value = GlobalWindows.windowed_value(None)
 * _global_window_type = type(_globally_windowed_value.windows[0])             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __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_1)) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_t_1)));
  __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_1))));
  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_t_1)));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":85
 *     self.coder = coder
 * 
 *   def receive(self, windowed_value):             # <<<<<<<<<<<<<<
 *     self.update_counters_start(windowed_value)
 *     for consumer in self.consumers:
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_3receive, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ConsumerSet_receive, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet->tp_dict, __pyx_n_s_receive, __pyx_t_1) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet);

  /* "apache_beam/runners/worker/operations.py":91
 *     self.update_counters_finish()
 * 
 *   def update_counters_start(self, windowed_value):             # <<<<<<<<<<<<<<
 *     self.opcounter.update_from(windowed_value)
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5update_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__3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet->tp_dict, __pyx_n_s_update_counters_start, __pyx_t_1) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet);

  /* "apache_beam/runners/worker/operations.py":94
 *     self.opcounter.update_from(windowed_value)
 * 
 *   def update_counters_finish(self):             # <<<<<<<<<<<<<<
 *     self.opcounter.update_collect()
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_7update_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__4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet->tp_dict, __pyx_n_s_update_counters_finish, __pyx_t_1) < 0) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self.coder, self.consumers, self.opcounter, self.output_index, self.step_name)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_11__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__7)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_ConsumerSet, (type(self), 0xe53e5b7, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ConsumerSet__set_state(self, __pyx_state)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_13__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__8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(2, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":149
 *     self.receivers = []
 * 
 *   def start(self):             # <<<<<<<<<<<<<<
 *     """Start operation."""
 *     self.debug_logging_enabled = logging.getLogger().isEnabledFor(logging.DEBUG)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_3start, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Operation_start, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__9)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation->tp_dict, __pyx_n_s_start, __pyx_t_1) < 0) __PYX_ERR(0, 149, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation);

  /* "apache_beam/runners/worker/operations.py":162
 *                         for i, coder in enumerate(self.spec.output_coders)]
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     """Process element in operation."""
 *     pass
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_5process, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Operation_process, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation->tp_dict, __pyx_n_s_process, __pyx_t_1) < 0) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation);

  /* "apache_beam/runners/worker/operations.py":166
 *     pass
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     """Finish operation."""
 *     pass
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_7finish, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Operation_finish, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation->tp_dict, __pyx_n_s_finish, __pyx_t_1) < 0) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation);

  /* "apache_beam/runners/worker/operations.py":170
 *     pass
 * 
 *   def output(self, windowed_value, output_index=0):             # <<<<<<<<<<<<<<
 *     cython.cast(Receiver, self.receivers[output_index]).receive(windowed_value)
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_9output, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Operation_output, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__12)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation->tp_dict, __pyx_n_s_output, __pyx_t_1) < 0) __PYX_ERR(0, 170, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation);

  /* "apache_beam/runners/worker/operations.py":173
 *     cython.cast(Receiver, self.receivers[output_index]).receive(windowed_value)
 * 
 *   def add_receiver(self, operation, output_index=0):             # <<<<<<<<<<<<<<
 *     """Adds a receiver operation for the specified output."""
 *     self.consumers[output_index].append(operation)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_11add_receiver, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Operation_add_receiver, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__13)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation->tp_dict, __pyx_n_s_add_receiver, __pyx_t_1) < 0) __PYX_ERR(0, 173, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation);

  /* "apache_beam/runners/worker/operations.py":177
 *     self.consumers[output_index].append(operation)
 * 
 *   def progress_metrics(self):             # <<<<<<<<<<<<<<
 *     return beam_fn_api_pb2.Metrics.PTransform(
 *         processed_elements=beam_fn_api_pb2.Metrics.PTransform.ProcessedElements(
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_13progress_metrics, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Operation_progress_metrics, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__14)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation->tp_dict, __pyx_n_s_progress_metrics, __pyx_t_1) < 0) __PYX_ERR(0, 177, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation);

  /* "apache_beam/runners/worker/operations.py":209
 *     return self.str_internal()
 * 
 *   def str_internal(self, is_recursive=False):             # <<<<<<<<<<<<<<
 *     """Internal helper for __str__ that supports recursion.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_17str_internal, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Operation_str_internal, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__15)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation->tp_dict, __pyx_n_s_str_internal, __pyx_t_1) < 0) __PYX_ERR(0, 209, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, self.spec, self.state_sampler, self.step_name)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_19__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__20)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_Operation, (type(self), 0x31178f9, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Operation__set_state(self, __pyx_state)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_21__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__21)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(2, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":239
 * class ReadOperation(Operation):
 * 
 *   def start(self):             # <<<<<<<<<<<<<<
 *     with self.scoped_start_state:
 *       super(ReadOperation, self).start()
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__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__22)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation->tp_dict, __pyx_n_s_start, __pyx_t_1) < 0) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, self.spec, self.state_sampler, self.step_name)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__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__24)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_ReadOperation, (type(self), 0x31178f9, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ReadOperation__set_state(self, __pyx_state)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__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__25)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(2, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":252
 * 
 * 
 * class InMemoryWriteOperation(Operation):             # <<<<<<<<<<<<<<
 *   """A write operation that will write to an in-memory sink."""
 * 
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __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_1, 0, ((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation));
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __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_6)) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "apache_beam/runners/worker/operations.py":255
 *   """A write operation that will write to an in-memory sink."""
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     with self.scoped_process_state:
 *       if self.debug_logging_enabled:
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__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__26)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_process, __pyx_t_7) < 0) __PYX_ERR(0, 255, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "apache_beam/runners/worker/operations.py":252
 * 
 * 
 * class InMemoryWriteOperation(Operation):             # <<<<<<<<<<<<<<
 *   """A write operation that will write to an in-memory sink."""
 * 
 */
  __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_InMemoryWriteOperation, __pyx_t_1, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_InMemoryWriteOperation, __pyx_t_7) < 0) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":263
 * 
 * 
 * class _TaggedReceivers(dict):             # <<<<<<<<<<<<<<
 * 
 *   def __init__(self, counter_factory, step_name):
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)(&PyDict_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyDict_Type)));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)(&PyDict_Type)));
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_TaggedReceivers, __pyx_n_s_TaggedReceivers, (PyObject *) NULL, __pyx_n_s_apache_beam_runners_worker_opera, (PyObject *) NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "apache_beam/runners/worker/operations.py":265
 * class _TaggedReceivers(dict):
 * 
 *   def __init__(self, counter_factory, step_name):             # <<<<<<<<<<<<<<
 *     self._counter_factory = counter_factory
 *     self._step_name = step_name
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__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__28)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_init, __pyx_t_7) < 0) __PYX_ERR(0, 265, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "apache_beam/runners/worker/operations.py":269
 *     self._step_name = step_name
 * 
 *   def __missing__(self, tag):             # <<<<<<<<<<<<<<
 *     self[tag] = receiver = ConsumerSet(
 *         self._counter_factory, self._step_name, tag, [], None)
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__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__29)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_missing, __pyx_t_7) < 0) __PYX_ERR(0, 269, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "apache_beam/runners/worker/operations.py":263
 * 
 * 
 * class _TaggedReceivers(dict):             # <<<<<<<<<<<<<<
 * 
 *   def __init__(self, counter_factory, step_name):
 */
  __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_TaggedReceivers, __pyx_t_1, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TaggedReceivers, __pyx_t_7) < 0) __PYX_ERR(0, 263, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":284
 *     self.tagged_receivers = None
 * 
 *   def _read_side_inputs(self, tags_and_types):             # <<<<<<<<<<<<<<
 *     """Generator reading side inputs in the order prescribed by tags_and_types.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__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__30)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation->tp_dict, __pyx_n_s_read_side_inputs, __pyx_t_1) < 0) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation);

  /* "apache_beam/runners/worker/operations.py":344
 *           view_class, view_options, sideinputs.EmulatedIterable(iterator_fn))
 * 
 *   def start(self):             # <<<<<<<<<<<<<<
 *     with self.scoped_start_state:
 *       super(DoOperation, self).start()
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_6start, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoOperation_start, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation->tp_dict, __pyx_n_s_start, __pyx_t_1) < 0) __PYX_ERR(0, 344, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation);

  /* "apache_beam/runners/worker/operations.py":390
 *       self.dofn_runner.start()
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     with self.scoped_process_state:
 *       self.dofn_receiver.receive(o)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_8process, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoOperation_process, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__34)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation->tp_dict, __pyx_n_s_process, __pyx_t_1) < 0) __PYX_ERR(0, 390, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation);

  /* "apache_beam/runners/worker/operations.py":394
 *       self.dofn_receiver.receive(o)
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     with self.scoped_finish_state:
 *       self.dofn_runner.finish()
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_10finish, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoOperation_finish, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__36)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation->tp_dict, __pyx_n_s_finish, __pyx_t_1) < 0) __PYX_ERR(0, 394, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation);

  /* "apache_beam/runners/worker/operations.py":398
 *       self.dofn_runner.finish()
 * 
 *   def progress_metrics(self):             # <<<<<<<<<<<<<<
 *     metrics = super(DoOperation, self).progress_metrics()
 *     if self.tagged_receivers:
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_12progress_metrics, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DoOperation_progress_metrics, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__38)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation->tp_dict, __pyx_n_s_progress_metrics, __pyx_t_1) < 0) __PYX_ERR(0, 398, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.dofn_receiver, self.dofn_runner, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, self.side_input_maps, self.spec, self.state_sampler, self.step_name, self.tagged_receivers)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_14__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__39)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_DoOperation, (type(self), 0x36f06cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DoOperation__set_state(self, __pyx_state)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_16__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__40)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(2, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":408
 * 
 * 
 * class DoFnRunnerReceiver(Receiver):             # <<<<<<<<<<<<<<
 * 
 *   def __init__(self, dofn_runner):
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_Receiver));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_Receiver));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_ptype_11apache_beam_7runners_6common_Receiver));
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_DoFnRunnerReceiver, __pyx_n_s_DoFnRunnerReceiver, (PyObject *) NULL, __pyx_n_s_apache_beam_runners_worker_opera, (PyObject *) NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "apache_beam/runners/worker/operations.py":410
 * class DoFnRunnerReceiver(Receiver):
 * 
 *   def __init__(self, dofn_runner):             # <<<<<<<<<<<<<<
 *     self.dofn_runner = dofn_runner
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_18DoFnRunnerReceiver_1__init__, 0, __pyx_n_s_DoFnRunnerReceiver___init, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__41)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_init, __pyx_t_7) < 0) __PYX_ERR(0, 410, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "apache_beam/runners/worker/operations.py":413
 *     self.dofn_runner = dofn_runner
 * 
 *   def receive(self, windowed_value):             # <<<<<<<<<<<<<<
 *     self.dofn_runner.process(windowed_value)
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_18DoFnRunnerReceiver_3receive, 0, __pyx_n_s_DoFnRunnerReceiver_receive, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__42)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_receive, __pyx_t_7) < 0) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "apache_beam/runners/worker/operations.py":408
 * 
 * 
 * class DoFnRunnerReceiver(Receiver):             # <<<<<<<<<<<<<<
 * 
 *   def __init__(self, dofn_runner):
 */
  __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_DoFnRunnerReceiver, __pyx_t_1, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DoFnRunnerReceiver, __pyx_t_7) < 0) __PYX_ERR(0, 408, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":430
 *         PhasedCombineFnExecutor(self.spec.phase, fn, args, kwargs))
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     with self.scoped_process_state:
 *       if self.debug_logging_enabled:
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_16CombineOperation_3process, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CombineOperation_process, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation->tp_dict, __pyx_n_s_process, __pyx_t_1) < 0) __PYX_ERR(0, 430, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation);

  /* "apache_beam/runners/worker/operations.py":438
 *           o.with_value((key, self.phased_combine_fn.apply(values))))
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     logging.debug('Finishing %s', self)
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_16CombineOperation_5finish, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CombineOperation_finish, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation->tp_dict, __pyx_n_s_finish, __pyx_t_1) < 0) __PYX_ERR(0, 438, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.metrics_container, self.name_context, self.operation_name, self.phased_combine_fn, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, self.spec, self.state_sampler, self.step_name)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_16CombineOperation_7__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__47)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_CombineOperation, (type(self), 0xdd72a47, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CombineOperation__set_state(self, __pyx_state)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_16CombineOperation_9__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__48)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(2, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":442
 * 
 * 
 * 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_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_1create_pgbk_op, 0, __pyx_n_s_create_pgbk_op, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__49)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_create_pgbk_op, __pyx_t_1) < 0) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":449
 * 
 * 
 * class PGBKOperation(Operation):             # <<<<<<<<<<<<<<
 *   """Partial group-by-key operation.
 * 
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __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_1, 0, ((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation));
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __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_6)) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "apache_beam/runners/worker/operations.py":457
 *   """
 * 
 *   def __init__(self, name_context, spec, counter_factory, state_sampler):             # <<<<<<<<<<<<<<
 *     super(PGBKOperation, self).__init__(
 *         name_context, spec, counter_factory, state_sampler)
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__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__50)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_init, __pyx_t_7) < 0) __PYX_ERR(0, 457, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "apache_beam/runners/worker/operations.py":466
 *     self.max_size = 10 * 1000
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     with self.scoped_process_state:
 *       # TODO(robertwb): Structural (hashable) values.
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__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__51)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_process, __pyx_t_7) < 0) __PYX_ERR(0, 466, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "apache_beam/runners/worker/operations.py":475
 *         self.flush(9 * self.max_size // 10)
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     self.flush(0)
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__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__53)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_finish, __pyx_t_7) < 0) __PYX_ERR(0, 475, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "apache_beam/runners/worker/operations.py":478
 *     self.flush(0)
 * 
 *   def flush(self, target):             # <<<<<<<<<<<<<<
 *     limit = self.size - target
 *     for ix, (kw, vs) in enumerate(self.table.items()):
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__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__55)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_flush, __pyx_t_7) < 0) __PYX_ERR(0, 478, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "apache_beam/runners/worker/operations.py":449
 * 
 * 
 * class PGBKOperation(Operation):             # <<<<<<<<<<<<<<
 *   """Partial group-by-key operation.
 * 
 */
  __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_PGBKOperation, __pyx_t_1, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PGBKOperation, __pyx_t_7) < 0) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":522
 *     self.table = {}
 * 
 *   def process(self, wkv):             # <<<<<<<<<<<<<<
 *     with self.scoped_process_state:
 *       key, value = wkv.value
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_3process, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PGBKCVOperation_process, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__57)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation->tp_dict, __pyx_n_s_process, __pyx_t_1) < 0) __PYX_ERR(0, 522, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation);

  /* "apache_beam/runners/worker/operations.py":551
 *       entry[0] = self.combine_fn_add_input(entry[0], value)
 * 
 *   def finish(self):             # <<<<<<<<<<<<<<
 *     for wkey, value in self.table.items():
 *       self.output_key(wkey, value[0])
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_5finish, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PGBKCVOperation_finish, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__59)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation->tp_dict, __pyx_n_s_finish, __pyx_t_1) < 0) __PYX_ERR(0, 551, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation);

  /* "apache_beam/runners/worker/operations.py":557
 *     self.key_count = 0
 * 
 *   def output_key(self, wkey, value):             # <<<<<<<<<<<<<<
 *     windows, key = wkey
 *     if windows is 0:
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_7output_key, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PGBKCVOperation_output_key, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation->tp_dict, __pyx_n_s_output_key, __pyx_t_1) < 0) __PYX_ERR(0, 557, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self.combine_fn, self.combine_fn_add_input, self.consumers, self.counter_factory, self.debug_logging_enabled, self.key_count, self.max_keys, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, self.spec, self.state_sampler, self.step_name, self.table)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_9__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__61)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_PGBKCVOperation, (type(self), 0xe750882, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_PGBKCVOperation__set_state(self, __pyx_state)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_11__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__62)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(2, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":572
 *   """
 * 
 *   def process(self, o):             # <<<<<<<<<<<<<<
 *     with self.scoped_process_state:
 *       if self.debug_logging_enabled:
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__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__63)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_7runners_6worker_10operations_FlattenOperation->tp_dict, __pyx_n_s_process, __pyx_t_1) < 0) __PYX_ERR(0, 572, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_7runners_6worker_10operations_FlattenOperation);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self.consumers, self.counter_factory, self.debug_logging_enabled, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_metrics_container, self.scoped_process_state, self.scoped_start_state, self.spec, self.state_sampler, self.step_name)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__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__65)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_FlattenOperation, (type(self), 0x31178f9, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_FlattenOperation__set_state(self, __pyx_state)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__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__66)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(2, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":579
 * 
 * 
 * def create_operation(name_context, spec, counter_factory, step_name,             # <<<<<<<<<<<<<<
 *                      state_sampler, test_shuffle_source=None,
 *                      test_shuffle_sink=None, is_streaming=False):
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_3create_operation, 0, __pyx_n_s_create_operation, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__127);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_create_operation, __pyx_t_1) < 0) __PYX_ERR(0, 579, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/runners/worker/operations.py":648
 * 
 * 
 * class SimpleMapTaskExecutor(object):             # <<<<<<<<<<<<<<
 *   """An executor for map tasks.
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_object); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __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_6)) __PYX_ERR(0, 648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "apache_beam/runners/worker/operations.py":655
 *   """
 * 
 *   def __init__(             # <<<<<<<<<<<<<<
 *       self, map_task, counter_factory, state_sampler,
 *       test_shuffle_source=None, test_shuffle_sink=None):
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__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__68)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_tuple__129);
  if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_init, __pyx_t_7) < 0) __PYX_ERR(0, 655, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "apache_beam/runners/worker/operations.py":679
 *     self._test_shuffle_sink = test_shuffle_sink
 * 
 *   def operations(self):             # <<<<<<<<<<<<<<
 *     return self._ops[:]
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__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__69)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_operations, __pyx_t_7) < 0) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "apache_beam/runners/worker/operations.py":682
 *     return self._ops[:]
 * 
 *   def execute(self):             # <<<<<<<<<<<<<<
 *     """Executes all the operation_specs.Worker* instructions in a map task.
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__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__71)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_execute, __pyx_t_7) < 0) __PYX_ERR(0, 682, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "apache_beam/runners/worker/operations.py":648
 * 
 * 
 * class SimpleMapTaskExecutor(object):             # <<<<<<<<<<<<<<
 *   """An executor for map tasks.
 * 
 */
  __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_SimpleMapTaskExecutor, __pyx_t_2, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SimpleMapTaskExecutor, __pyx_t_7) < 0) __PYX_ERR(0, 648, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_ConsumerSet(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0xe53e5b7:
 *         from pickle import PickleError as __pyx_PickleError
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_5__pyx_unpickle_ConsumerSet, 0, __pyx_n_s_pyx_unpickle_ConsumerSet, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__72)); 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)":9
 *         __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.opcounter = __pyx_state[2]; __pyx_result.output_index = __pyx_state[3]; __pyx_result.step_name = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_7__pyx_unpickle_Operation, 0, __pyx_n_s_pyx_unpickle_Operation, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__73)); 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):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0x31178f9:
 *         from pickle import PickleError as __pyx_PickleError
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9__pyx_unpickle_ReadOperation, 0, __pyx_n_s_pyx_unpickle_ReadOperation, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__74)); 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)":9
 *         __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.debug_logging_enabled = __pyx_state[2]; __pyx_result.metrics_container = __pyx_state[3]; __pyx_result.name_context = __pyx_state[4]; __pyx_result.operation_name = __pyx_state[5]; __pyx_result.receivers = __pyx_state[6]; __pyx_result.scoped_finish_state = __pyx_state[7]; __pyx_result.scoped_metrics_container = __pyx_state[8]; __pyx_result.scoped_process_state = __pyx_state[9]; __pyx_result.scoped_start_state = __pyx_state[10]; __pyx_result.spec = __pyx_state[11]; __pyx_result.state_sampler = __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_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11__pyx_unpickle_DoOperation, 0, __pyx_n_s_pyx_unpickle_DoOperation, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__75)); 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)":1
 * def __pyx_unpickle_CombineOperation(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0xdd72a47:
 *         from pickle import PickleError as __pyx_PickleError
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_13__pyx_unpickle_CombineOperation, 0, __pyx_n_s_pyx_unpickle_CombineOperation, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__76)); 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)":9
 *         __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.debug_logging_enabled = __pyx_state[2]; __pyx_result.metrics_container = __pyx_state[3]; __pyx_result.name_context = __pyx_state[4]; __pyx_result.operation_name = __pyx_state[5]; __pyx_result.phased_combine_fn = __pyx_state[6]; __pyx_result.receivers = __pyx_state[7]; __pyx_result.scoped_finish_state = __pyx_state[8]; __pyx_result.scoped_metrics_container = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.spec = __pyx_state[12]; __pyx_result.state_sampler = __pyx_state[13]; __pyx_result.step_name = __pyx_state[14]
 *     if len(__pyx_state) > 15 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_15__pyx_unpickle_PGBKCVOperation, 0, __pyx_n_s_pyx_unpickle_PGBKCVOperation, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__77)); 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)":1
 * def __pyx_unpickle_FlattenOperation(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0x31178f9:
 *         from pickle import PickleError as __pyx_PickleError
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_17__pyx_unpickle_FlattenOperation, 0, __pyx_n_s_pyx_unpickle_FlattenOperation, NULL, __pyx_n_s_apache_beam_runners_worker_opera, __pyx_d, ((PyObject *)__pyx_codeobj__78)); 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;
  __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_6);
  __Pyx_XDECREF(__pyx_t_7);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init apache_beam.runners.worker.operations", 0, __pyx_lineno, __pyx_filename);
    }
    Py_DECREF(__pyx_m); __pyx_m = 0;
  } 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((char *)modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* PyObjectGetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
    if (unlikely(!result)) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

/* RaiseArgTupleInvalid */
static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

/* RaiseDoubleKeywords */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

/* ParseKeywords */
static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_CheckExact(key)) || 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
                    (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(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
                        (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

/* PyErrFetchRestore */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
}
#endif

/* Profile */
#if CYTHON_PROFILE
static int __Pyx_TraceSetupAndCall(PyCodeObject** code,
                                   PyFrameObject** frame,
                                   PyThreadState* tstate,
                                   const char *funcname,
                                   const char *srcfile,
                                   int firstlineno) {
    PyObject *type, *value, *traceback;
    int retval;
    if (*frame == NULL || !CYTHON_PROFILE_REUSE_FRAME) {
        if (*code == NULL) {
            *code = __Pyx_createFrameCodeObject(funcname, srcfile, firstlineno);
            if (*code == NULL) return 0;
        }
        *frame = PyFrame_New(
            tstate,                          /*PyThreadState *tstate*/
            *code,                           /*PyCodeObject *code*/
            __pyx_d,                  /*PyObject *globals*/
            0                                /*PyObject *locals*/
        );
        if (*frame == NULL) return 0;
        if (CYTHON_TRACE && (*frame)->f_trace == NULL) {
            Py_INCREF(Py_None);
            (*frame)->f_trace = Py_None;
        }
#if PY_VERSION_HEX < 0x030400B1
    } else {
        (*frame)->f_tstate = tstate;
#endif
    }
      __Pyx_PyFrame_SetLineNumber(*frame, firstlineno);
    retval = 1;
    tstate->tracing++;
    tstate->use_tracing = 0;
    __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;
    tstate->use_tracing = (tstate->c_profilefunc ||
                           (CYTHON_TRACE && tstate->c_tracefunc));
    tstate->tracing--;
    if (retval) {
        __Pyx_ErrRestoreInState(tstate, type, value, traceback);
        return tstate->use_tracing && 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) {
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    PyCodeObject *py_code = 0;
    #if PY_MAJOR_VERSION < 3
    py_funcname = PyString_FromString(funcname);
    py_srcfile = PyString_FromString(srcfile);
    #else
    py_funcname = PyUnicode_FromString(funcname);
    py_srcfile = PyUnicode_FromString(srcfile);
    #endif
    if (!py_funcname | !py_srcfile) goto bad;
    py_code = PyCode_New(
        0,
        #if PY_MAJOR_VERSION >= 3
        0,
        #endif
        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);
    return py_code;
}
#endif

/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = func->ob_type->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

/* 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)));
    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)meth)) (self, args, nargs, NULL);
    } else {
        return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs);
    }
}
#endif

/* PyFunctionFastCall */
#if CYTHON_FAST_PYCALL
#include "frameobject.h"
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 = f->f_localsplus;
    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, int 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, nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif
#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

/* 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 (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
            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

/* ArgTypeTest */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
{
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    else if (exact) {
        #if PY_MAJOR_VERSION == 2
        if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
        #endif
    }
    else {
        if (likely(__Pyx_TypeCheck(obj, type))) return 1;
    }
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
        name, type->tp_name, Py_TYPE(obj)->tp_name);
    return 0;
}

/* PyObjectCallNoArg */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, NULL, 0);
    }
#endif
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || __Pyx_TypeCheck(func, __pyx_CyFunctionType))) {
#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

/* 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
    {
        uval = NULL;
        PyObject *sign = NULL, *padding = 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_FromSize_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 */
  #ifdef _MSC_VER
    #ifndef _MSC_STDINT_H_
        #if _MSC_VER < 1300
           typedef unsigned short    uint16_t;
        #else
           typedef unsigned __int16  uint16_t;
        #endif
    #endif
#else
   #include <stdint.h>
#endif
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 ulength;
    int length, prepend_sign, last_one_off;
    Py_ssize_t remaining;
    const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0;
    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;
            *(uint16_t*)dpos = ((uint16_t*)DIGIT_PAIRS_8)[digit_pos];
            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;
            *(uint16_t*)dpos = ((uint16_t*)DIGIT_PAIRS_10)[digit_pos];
            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, 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, 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 */
  static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
    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);
    if (likely(result)) {
        Py_INCREF(result);
    } else if (unlikely(PyErr_Occurred())) {
        result = NULL;
    } else {
#else
    result = PyDict_GetItem(__pyx_d, name);
    if (likely(result)) {
        Py_INCREF(result);
    } else {
#endif
#else
    result = PyObject_GetItem(__pyx_d, name);
    if (!result) {
        PyErr_Clear();
#endif
        result = __Pyx_GetBuiltinName(name);
    }
    return result;
}

/* PyIntBinop */
      #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
    #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

/* 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((0 <= wrapped_i) & (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((0 <= wrapped_i) & (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((n >= 0) & (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((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return NULL;
                    PyErr_Clear();
                }
            }
            return m->sq_item(o, i);
        }
    }
#else
    if (is_list || PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

/* ObjectGetItem */
      #if CYTHON_USE_TYPE_SLOTS
static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
    PyObject *runerr;
    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

/* PyObjectCallMethod1 */
      static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
    PyObject *result = NULL;
#if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(method))) {
        PyObject *self = PyMethod_GET_SELF(method);
        if (likely(self)) {
            PyObject *args;
            PyObject *function = PyMethod_GET_FUNCTION(method);
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(function)) {
                PyObject *args[2] = {self, arg};
                result = __Pyx_PyFunction_FastCall(function, args, 2);
                goto done;
            }
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(function)) {
                PyObject *args[2] = {self, arg};
                result = __Pyx_PyCFunction_FastCall(function, args, 2);
                goto done;
            }
            #endif
            args = PyTuple_New(2);
            if (unlikely(!args)) goto done;
            Py_INCREF(self);
            PyTuple_SET_ITEM(args, 0, self);
            Py_INCREF(arg);
            PyTuple_SET_ITEM(args, 1, arg);
            Py_INCREF(function);
            result = __Pyx_PyObject_Call(function, args, NULL);
            Py_DECREF(args);
            Py_DECREF(function);
            return result;
        }
    }
#endif
    result = __Pyx_PyObject_CallOneArg(method, arg);
    goto done;
done:
    return result;
}
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
    PyObject *method, *result;
    method = __Pyx_PyObject_GetAttrStr(obj, method_name);
    if (unlikely(!method)) return NULL;
    result = __Pyx__PyObject_CallMethod1(method, arg);
    Py_DECREF(method);
    return result;
}

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

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

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

/* SaveResetException */
      #if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    #if PY_VERSION_HEX >= 0x030700A2
    *type = tstate->exc_state.exc_type;
    *value = tstate->exc_state.exc_value;
    *tb = tstate->exc_state.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 PY_VERSION_HEX >= 0x030700A2
    tmp_type = tstate->exc_state.exc_type;
    tmp_value = tstate->exc_state.exc_value;
    tmp_tb = tstate->exc_state.exc_traceback;
    tstate->exc_state.exc_type = type;
    tstate->exc_state.exc_value = value;
    tstate->exc_state.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 PY_VERSION_HEX >= 0x030700A2
    tmp_type = tstate->exc_state.exc_type;
    tmp_value = tstate->exc_state.exc_value;
    tmp_tb = tstate->exc_state.exc_traceback;
    tstate->exc_state.exc_type = local_type;
    tstate->exc_state.exc_value = local_value;
    tstate->exc_state.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;
}

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

/* None */
        static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
}

/* RaiseTooManyValuesToUnpack */
        static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

/* RaiseNeedMoreValuesToUnpack */
        static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                 index, (index == 1) ? "" : "s");
}

/* IterFinish */
        static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_FAST_THREAD_STATE
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
            PyObject *exc_value, *exc_tb;
            exc_value = tstate->curexc_value;
            exc_tb = tstate->curexc_traceback;
            tstate->curexc_type = 0;
            tstate->curexc_value = 0;
            tstate->curexc_traceback = 0;
            Py_DECREF(exc_type);
            Py_XDECREF(exc_value);
            Py_XDECREF(exc_tb);
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#else
    if (unlikely(PyErr_Occurred())) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#endif
}

/* UnpackItemEndCheck */
        static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    } else {
        return __Pyx_IterFinish();
    }
    return 0;
}

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

/* CythonFunction */
        #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)
{
    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)
{
    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)
{
    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)
{
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value)
{
    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)
{
    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)
{
    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)
{
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op)
{
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op)
{
    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) {
    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) {
    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) {
    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) {
    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) {
    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) {
    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
    return PyUnicode_FromString(m->func.m_ml->ml_name);
#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_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
    if (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 = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    PyObject_GC_Track(op);
    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)
{
    __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;
    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)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);
            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
};
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;
    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);
}

/* 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_COMPILING_IN_PYPY
        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);
#else
        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);
        }
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#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;
}

/* PyObjectCallMethod0 */
            static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
    PyObject *method, *result = NULL;
    method = __Pyx_PyObject_GetAttrStr(obj, method_name);
    if (unlikely(!method)) goto bad;
#if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(method))) {
        PyObject *self = PyMethod_GET_SELF(method);
        if (likely(self)) {
            PyObject *function = PyMethod_GET_FUNCTION(method);
            result = __Pyx_PyObject_CallOneArg(function, self);
            Py_DECREF(method);
            return result;
        }
    }
#endif
    result = __Pyx_PyObject_CallNoArg(method);
    Py_DECREF(method);
bad:
    return result;
}

/* RaiseNoneIterError */
            static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

/* UnpackTupleError */
            static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
    if (t == Py_None) {
      __Pyx_RaiseNoneNotIterableError();
    } else if (PyTuple_GET_SIZE(t) < index) {
      __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t));
    } else {
      __Pyx_RaiseTooManyValuesError(index);
    }
}

/* UnpackTuple2 */
            static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
        PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) {
    PyObject *value1 = NULL, *value2 = NULL;
#if CYTHON_COMPILING_IN_PYPY
    value1 = PySequence_ITEM(tuple, 0);  if (unlikely(!value1)) goto bad;
    value2 = PySequence_ITEM(tuple, 1);  if (unlikely(!value2)) goto bad;
#else
    value1 = PyTuple_GET_ITEM(tuple, 0);  Py_INCREF(value1);
    value2 = PyTuple_GET_ITEM(tuple, 1);  Py_INCREF(value2);
#endif
    if (decref_tuple) {
        Py_DECREF(tuple);
    }
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
#if CYTHON_COMPILING_IN_PYPY
bad:
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
#endif
}
static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2,
                                       int has_known_size, int decref_tuple) {
    Py_ssize_t index;
    PyObject *value1 = NULL, *value2 = NULL, *iter = NULL;
    iternextfunc iternext;
    iter = PyObject_GetIter(tuple);
    if (unlikely(!iter)) goto bad;
    if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; }
    iternext = Py_TYPE(iter)->tp_iternext;
    value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; }
    value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; }
    if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad;
    Py_DECREF(iter);
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
unpacking_failed:
    if (!has_known_size && __Pyx_IterFinish() == 0)
        __Pyx_RaiseNeedMoreValuesError(index);
bad:
    Py_XDECREF(iter);
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
}

/* dict_iter */
            static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_source_is_dict) {
    is_dict = is_dict || likely(PyDict_CheckExact(iterable));
    *p_source_is_dict = is_dict;
    if (is_dict) {
#if !CYTHON_COMPILING_IN_PYPY
        *p_orig_length = PyDict_Size(iterable);
        Py_INCREF(iterable);
        return iterable;
#elif PY_MAJOR_VERSION >= 3
        static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL;
        PyObject **pp = NULL;
        if (method_name) {
            const char *name = PyUnicode_AsUTF8(method_name);
            if (strcmp(name, "iteritems") == 0) pp = &py_items;
            else if (strcmp(name, "iterkeys") == 0) pp = &py_keys;
            else if (strcmp(name, "itervalues") == 0) pp = &py_values;
            if (pp) {
                if (!*pp) {
                    *pp = PyUnicode_FromString(name + 4);
                    if (!*pp)
                        return NULL;
                }
                method_name = *pp;
            }
        }
#endif
    }
    *p_orig_length = 0;
    if (method_name) {
        PyObject* iter;
        iterable = __Pyx_PyObject_CallMethod0(iterable, method_name);
        if (!iterable)
            return NULL;
#if !CYTHON_COMPILING_IN_PYPY
        if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable))
            return iterable;
#endif
        iter = PyObject_GetIter(iterable);
        Py_DECREF(iterable);
        return iter;
    }
    return PyObject_GetIter(iterable);
}
static CYTHON_INLINE int __Pyx_dict_iter_next(
        PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos,
        PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) {
    PyObject* next_item;
#if !CYTHON_COMPILING_IN_PYPY
    if (source_is_dict) {
        PyObject *key, *value;
        if (unlikely(orig_length != PyDict_Size(iter_obj))) {
            PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration");
            return -1;
        }
        if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) {
            return 0;
        }
        if (pitem) {
            PyObject* tuple = PyTuple_New(2);
            if (unlikely(!tuple)) {
                return -1;
            }
            Py_INCREF(key);
            Py_INCREF(value);
            PyTuple_SET_ITEM(tuple, 0, key);
            PyTuple_SET_ITEM(tuple, 1, value);
            *pitem = tuple;
        } else {
            if (pkey) {
                Py_INCREF(key);
                *pkey = key;
            }
            if (pvalue) {
                Py_INCREF(value);
                *pvalue = value;
            }
        }
        return 1;
    } else if (PyTuple_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyTuple_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else if (PyList_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyList_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else
#endif
    {
        next_item = PyIter_Next(iter_obj);
        if (unlikely(!next_item)) {
            return __Pyx_IterFinish();
        }
    }
    if (pitem) {
        *pitem = next_item;
    } else if (pkey && pvalue) {
        if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1))
            return -1;
    } else if (pkey) {
        *pkey = next_item;
    } else {
        *pvalue = next_item;
    }
    return 1;
}

/* PyIntBinop */
            #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_FloorDivideObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            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);
            }
        }
                {
                    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);
    }
#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)cfunc->func)(self, &arg, 1);
            } else {
                return (*(__Pyx_PyCFunctionFastWithKeywords)cfunc->func)(self, &arg, 1, NULL);
            }
        } else if (PY_VERSION_HEX >= 0x030700A0 && flag == (METH_FASTCALL | METH_KEYWORDS)) {
            return (*(__Pyx_PyCFunctionFastWithKeywords)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)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)cfunc->func)(self, args, 2);
            #else
            return (*(__Pyx_PyCFunctionFastWithKeywords)cfunc->func)(self, args, 2, NULL);
            #endif
        }
        #if PY_VERSION_HEX >= 0x030700A0
        if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
            return (*(__Pyx_PyCFunctionFastWithKeywords)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)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;
}

/* None */
            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((n >= 0) & (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 (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, 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;
}

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

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

/* 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_reduce_ex = NULL;
    PyObject *reduce = NULL;
    PyObject *reduce_ex = NULL;
    PyObject *reduce_cython = NULL;
    PyObject *setstate = NULL;
    PyObject *setstate_cython = NULL;
#if CYTHON_USE_PYTYPE_LOOKUP
    if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD;
#else
    if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD;
#endif
#if CYTHON_USE_PYTYPE_LOOKUP
    object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
#else
    object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
#endif
    reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto 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 BAD;
#else
        object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
#endif
        reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD;
        if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
            reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD;
            ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD;
            ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto 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_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD;
                ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD;
                ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD;
            }
            PyType_Modified((PyTypeObject*)type_obj);
        }
    }
    goto GOOD;
BAD:
    if (!PyErr_Occurred())
        PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
    ret = -1;
GOOD:
#if !CYTHON_USE_PYTYPE_LOOKUP
    Py_XDECREF(object_reduce);
    Py_XDECREF(object_reduce_ex);
#endif
    Py_XDECREF(reduce);
    Py_XDECREF(reduce_ex);
    Py_XDECREF(reduce_cython);
    Py_XDECREF(setstate);
    Py_XDECREF(setstate_cython);
    return ret;
}

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

/* 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
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
      use_cline = __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;
        PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
    }
    else if (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"
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(filename);
    #else
    py_srcfile = PyUnicode_FromString(filename);
    #endif
    if (!py_srcfile) goto bad;
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        #else
        py_funcname = PyUnicode_FromString(funcname);
        #endif
    }
    if (!py_funcname) goto bad;
    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);
    Py_DECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    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) {
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) goto bad;
        __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);
}

/* CIntToPy */
              static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
    const long neg_one = (long) -1, const_zero = (long) 0;
    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);
    }
}

/* 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_int(int value) {
    const int neg_one = (int) -1, const_zero = (int) 0;
    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);
    }
}

/* CIntFromPy */
              static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
    const long neg_one = (long) -1, const_zero = (long) 0;
    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
            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) {
    const int neg_one = (int) -1, const_zero = (int) 0;
    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
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* FastTypeChecks */
              #if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = a->tp_base;
        if (a == b)
            return 1;
    }
    return b == &PyBaseObject_Type;
}
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (a == b) return 1;
    mro = a->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(a, b);
}
#if PY_MAJOR_VERSION == 2
static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
    PyObject *exception, *value, *tb;
    int res;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&exception, &value, &tb);
    res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
    if (unlikely(res == -1)) {
        PyErr_WriteUnraisable(err);
        res = 0;
    }
    if (!res) {
        res = PyObject_IsSubclass(err, exc_type2);
        if (unlikely(res == -1)) {
            PyErr_WriteUnraisable(err);
            res = 0;
        }
    }
    __Pyx_ErrRestore(exception, value, tb);
    return res;
}
#else
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
    if (!res) {
        res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
    return res;
}
#endif
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *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

/* 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 PY_VERSION_HEX >= 0x030700A2
    tmp_type = tstate->exc_state.exc_type;
    tmp_value = tstate->exc_state.exc_value;
    tmp_tb = tstate->exc_state.exc_traceback;
    tstate->exc_state.exc_type = *type;
    tstate->exc_state.exc_value = *value;
    tstate->exc_state.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

/* CoroutineBase */
              #include <structmember.h>
#include <frameobject.h>
#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_CoroutineObject *self) {
    PyObject *exc_type = self->exc_type;
    PyObject *exc_value = self->exc_value;
    PyObject *exc_traceback = self->exc_traceback;
    self->exc_type = NULL;
    self->exc_value = NULL;
    self->exc_traceback = NULL;
    Py_XDECREF(exc_type);
    Py_XDECREF(exc_value);
    Py_XDECREF(exc_traceback);
}
#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;
    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
    if (self->exc_type) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
#else
        if (self->exc_traceback) {
            PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
            PyFrameObject *f = tb->tb_frame;
            Py_XINCREF(tstate->frame);
            assert(f->f_back == NULL);
            f->f_back = tstate->frame;
        }
#endif
        __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
                            &self->exc_traceback);
    } else {
        __Pyx_Coroutine_ExceptionClear(self);
        __Pyx_ExceptionSave(&self->exc_type, &self->exc_value, &self->exc_traceback);
    }
    self->is_running = 1;
    retval = self->body((PyObject *) self, tstate, value);
    self->is_running = 0;
    return retval;
}
static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__pyx_CoroutineObject *self) {
    if (likely(self->exc_traceback)) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
#else
        PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
        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;
}
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 = _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 = _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);
        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 = _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(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 int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
    Py_VISIT(gen->closure);
    Py_VISIT(gen->classobj);
    Py_VISIT(gen->yieldfrom);
    Py_VISIT(gen->exc_type);
    Py_VISIT(gen->exc_value);
    Py_VISIT(gen->exc_traceback);
    return 0;
}
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);
    Py_CLEAR(gen->exc_type);
    Py_CLEAR(gen->exc_value);
    Py_CLEAR(gen->exc_traceback);
#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_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 (self->ob_refcnt > 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);
    self->ob_refcnt = 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(self->ob_refcnt > 0);
    if (--self->ob_refcnt == 0) {
        return;
    }
    {
        Py_ssize_t refcnt = self->ob_refcnt;
        _Py_NewReference(self);
        self->ob_refcnt = refcnt;
    }
#if CYTHON_COMPILING_IN_CPYTHON
    assert(PyType_IS_GC(self->ob_type) &&
           _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)
{
    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)
{
    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)
{
    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)
{
    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 __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->exc_type = NULL;
    gen->exc_value = NULL;
    gen->exc_traceback = NULL;
    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;
    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, 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},
    {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
};
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[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        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;
}

/* ModuleImport */
                  #ifndef __PYX_HAVE_RT_ImportModule
#define __PYX_HAVE_RT_ImportModule
static PyObject *__Pyx_ImportModule(const char *name) {
    PyObject *py_name = 0;
    PyObject *py_module = 0;
    py_name = __Pyx_PyIdentifier_FromString(name);
    if (!py_name)
        goto bad;
    py_module = PyImport_Import(py_name);
    Py_DECREF(py_name);
    return py_module;
bad:
    Py_XDECREF(py_name);
    return 0;
}
#endif

/* TypeImport */
                  #ifndef __PYX_HAVE_RT_ImportType
#define __PYX_HAVE_RT_ImportType
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
    size_t size, int strict)
{
    PyObject *py_module = 0;
    PyObject *result = 0;
    PyObject *py_name = 0;
    char warning[200];
    Py_ssize_t basicsize;
#ifdef Py_LIMITED_API
    PyObject *py_basicsize;
#endif
    py_module = __Pyx_ImportModule(module_name);
    if (!py_module)
        goto bad;
    py_name = __Pyx_PyIdentifier_FromString(class_name);
    if (!py_name)
        goto bad;
    result = PyObject_GetAttr(py_module, py_name);
    Py_DECREF(py_name);
    py_name = 0;
    Py_DECREF(py_module);
    py_module = 0;
    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;
#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;
#endif
    if (!strict && (size_t)basicsize > size) {
        PyOS_snprintf(warning, sizeof(warning),
            "%s.%s size changed, may indicate binary incompatibility. Expected %zd, got %zd",
            module_name, class_name, basicsize, size);
        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
    }
    else if ((size_t)basicsize != size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s has the wrong size, try recompiling. Expected %zd, got %zd",
            module_name, class_name, basicsize, size);
        goto bad;
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(py_module);
    Py_XDECREF(result);
    return NULL;
}
#endif

/* VoidPtrImport */
                  #ifndef __PYX_HAVE_RT_ImportVoidPtr
#define __PYX_HAVE_RT_ImportVoidPtr
static int __Pyx_ImportVoidPtr(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 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(x);
  }
#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 PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


#endif /* Py_PYTHON_H */
